Change in vdsm[master]: virt: Fix of uninitialized variable access in Vm.setLinkAndN...

fromani at redhat.com fromani at redhat.com
Wed Feb 3 17:04:05 UTC 2016


Francesco Romani has posted comments on this change.

Change subject: virt: Fix of uninitialized variable access in Vm.setLinkAndNetwork()
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/53061/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 2145:         source.setAttribute('bridge', networkValue)
Line 2146:         try:
Line 2147:             link = vnicXML.getElementsByTagName('link')[0]
Line 2148:         except IndexError:
Line 2149:             link = vnicXML.appendChildWithArgs('link')
Yes, this change seems correct. But I wonder why this didn't explode before. Have you seen this fail? If so, on which flow? Just wondering how to trigger the bug.
Line 2150:         link.setAttribute('state', linkValue)
Line 2151:         if (specParams and
Line 2152:                 ('inbound' in specParams or 'outbound' in specParams)):
Line 2153:             oldBandwidths = vnicXML.getElementsByTagName('bandwidth')


-- 
To view, visit https://gerrit.ovirt.org/53061
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I04b44a1599593e825cc83f8df6edd4965ff43707
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list