Hello Vinzenz Feenstra, Assaf Muller, Michal Skrivanek,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/17685
to review the following change.
Change subject: Crash fix for migrations that involve devices with no aliases
......................................................................
Crash fix for migrations that involve devices with no aliases
The destination host updates the device XML cache for every
device by scanning the VM's XML that was received from
the source host, breaking it apart and placing each device's
XML into its Device class instance. The identification
of devices is done via the alias pulled from the VM conf. Some
devices don't have aliases pulled from libvirt. In any case,
migrations should succeed (instead of crashing VDSM) and
devices with no aliases should be dealt with in a separate patch.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988065
Change-Id: I3f05a945c2f3507d5571ac3f3b212e59a30bdfae
Signed-off-by: Assaf Muller <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/17515
Reviewed-by: Michal Skrivanek <[email protected]>
Reviewed-by: Vinzenz Feenstra <[email protected]>
Tested-by: Vinzenz Feenstra <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M vdsm/vm.py
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/85/17685/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 4333170..eefbccd 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -4763,7 +4763,12 @@
aliasToDevice = {}
for devType in self._devices:
for dev in self._devices[devType]:
- aliasToDevice[dev.alias] = dev
+ if hasattr(dev, 'alias'):
+ aliasToDevice[dev.alias] = dev
+ else:
+ self.log.error("Alias not found for device type %s "
+ "during migration at destination host" %
+ devType)
devices = _domParseStr(xml).childNodes[0]. \
getElementsByTagName('devices')[0]
--
To view, visit http://gerrit.ovirt.org/17685
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f05a945c2f3507d5571ac3f3b212e59a30bdfae
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches