Change in vdsm[master]: vm: restoring correct vm nic device after HotunplugTimeout

danken at redhat.com danken at redhat.com
Thu Dec 31 09:02:52 UTC 2015


Dan Kenigsberg has posted comments on this change.

Change subject: vm: restoring correct vm nic device after HotunplugTimeout
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

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

Line 2316:             if nic:
Line 2317:                 self._devices[hwclass.NIC].append(nic)
Line 2318:             self.saveState()
Line 2319:             hooks.after_nic_hotunplug_fail(nicXml, self.conf,
Line 2320:                                            params=nic.custom)
this code repetition is dangerous. please extract to a helper function, to be called when handling HotunplugTimeout and other exception.
Line 2321:             return response.error('hotunplugNic', "%s" % e)
Line 2322:         except libvirt.libvirtError as e:
Line 2323:             self.log.exception("Hotunplug failed")
Line 2324:             if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1055a9c6b19143edf98da7f82459d96f3a406712
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken 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