Mark Wu 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)
....................................................
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')
I suggest to determine whether to fetch info about target dev and model
according to the devType. If it's 'hostdev', then we could skip it.
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')
The 'alias' entry should be also available for SRIOV device. Something like:
<alias name='hostdev0'/>
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