Amit Aviram has uploaded a new change for review.
Change subject: vm.py: State saving in hotunplugDisk.
......................................................................
vm.py: State saving in hotunplugDisk.
VM's state was saved before detatching a disk in hotunplugDisk.
Saving vm's state should be performed only AFTER vdsm is actually detaching
the disk, otherwise the disk will remain in xmlDesc and be calculated in
the vm's hash.
This causes a bug in the engine's VM monitoring: the engine
gets the same hash as before the disk was unplugged, thus does not
update the disk's status.
Change-Id: I2cf18186cbba33d7e74fd15651ffec3149c98e1d
Bug-Url:https://bugzilla.redhat.com/1206696
Bug-Url:
https://bugzilla.redhat.com/1044466
Signed-off-by: Amit Aviram <aaviram(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/45077/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 0eff29a..cb354f0 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -2631,12 +2631,11 @@
diskDev = dev
break
- self.saveState()
-
hooks.before_disk_hotunplug(driveXml, self.conf,
params=drive.custom)
try:
self._dom.detachDevice(driveXml)
+ self.saveState()
except libvirt.libvirtError as e:
self.log.exception("Hotunplug failed")
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
--
To view, visit
https://gerrit.ovirt.org/45077
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cf18186cbba33d7e74fd15651ffec3149c98e1d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <aaviram(a)redhat.com>