Antoni Segura Puimedon has posted comments on this change.

Change subject: Fix crash on vm start with netdevs w/out some info
......................................................................


Patch Set 2: (2 inline comments)

....................................................
File vdsm/libvirtvm.py
Line 2964:         ifsxml = _domParseStr(self._lastXMLDesc).childNodes[0]. \
Line 2965:             getElementsByTagName('devices')[0]. \
Line 2966:             getElementsByTagName('interface')
Line 2967:         for x in ifsxml:
Line 2968:             devType = x.getAttribute('type')
Good idea.
Line 2969:             try:
Line 2970:                 name = 
x.getElementsByTagName('target')[0].getAttribute('dev')
Line 2971:             except IndexError:
Line 2972:                 name = ''


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')
Totally right. I have been doing some tests with libvirt and indeed what we get 
is:
<interface type='hostdev' managed='yes'>
      <mac address='52:54:00:47:ed:f0'/>
      <source>
        <address type='pci' domain='0x0000' bus='0x02' slot='0x10' 
function='0x2'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' 
function='0x0'/>
</interface>
Line 2975:             except IndexError:
Line 2976:                 alias = ''
Line 2977:             try:
Line 2978:                 model = 
x.getElementsByTagName('model')[0].getAttribute('type')


--
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 <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Dan Yasny <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to