Dan Kenigsberg has posted comments on this change.
Change subject: Bugfix update device hooks: after_update_device failure.
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(1 inline comment)
....................................................
File vdsm/vm.py
Line 2988: vnicXML =
hooks.before_update_device(vnicXML.toprettyxml(
Line 2989:
encoding='utf-8'),
Line 2990: self.conf)
Line 2991: except Exception as e:
Line 2992: self.log.debug('Hook script failed',
exc_info=True)
why is this helpful? flow of control would still reach line 3000 with vnicXML
undefined.
You should first avoid overwriting vnicXML (which was a minidom object) with a
string. That's bad style and leads to our bug.
Then, you can even take the before_update_device() call out of the try-block,
so its failure won't trigger the "except" clause.
Line 2993: raise
Line 2994:
Line 2995: self._dom.updateDeviceFlags(vnicXML,
Line 2996:
libvirt.VIR_DOMAIN_AFFECT_LIVE)
--
To view, visit http://gerrit.ovirt.org/15982
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0ab64f88e697e48ad2a3552d1361742846871ed8
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches