Change in vdsm[master]: Fix crash on vm start with netdevs w/out some info
danken at redhat.com
danken at redhat.com
Wed Apr 3 11:37:02 UTC 2013
Dan Kenigsberg has posted comments on this change.
Change subject: Fix crash on vm start with netdevs w/out some info
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(2 inline comments)
Mark, you have good comments. Please use your -1 powers to make them more visible.
....................................................
File vdsm/libvirtvm.py
Line 2970: name = x.getElementsByTagName('target')[0].getAttribute('dev')
Line 2971: except IndexError:
Line 2972: name = ''
Line 2973: try:
Line 2974: alias = x.getElementsByTagName('alias')[0].getAttribute('name')
yes, "alias" is my favorite key into the device list. Let's not ignore it if possible.
Line 2975: except IndexError:
Line 2976: alias = ''
Line 2977: try:
Line 2978: model = x.getElementsByTagName('model')[0].getAttribute('type')
Line 2999: # Get nic address
Line 3000: address = self._getUnderlyingDeviceAddress(x)
Line 3001: for nic in self._devices[vm.NIC_DEVICES]:
Line 3002: if nic.macAddr.lower() == mac.lower():
Line 3003: nic.name = name
I have a feeling that it would be better not to set the nic name, over putting a false empty string here. Remember that the "name" is used as a key into nic statistics dictionary. Who knows what would happen if you have two sriov cards per VM.
Line 3004: nic.alias = alias
Line 3005: nic.address = address
Line 3006: nic.linkActive = linkActive
Line 3007: # Update vm's conf with address for known nic devices
--
To view, visit http://gerrit.ovirt.org/13540
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5a90fba21075ab2c7ecb0cb75f14ca07f090829e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dan Yasny <dyasny at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list