Change in vdsm[master]: vm.py: State saving in hotunplugDisk.

danken at redhat.com danken at redhat.com
Wed Sep 2 06:44:59 UTC 2015


Dan Kenigsberg has submitted this change and it was merged.

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.

Due to a possible race while hotunplugging, where VM monitoring starts
updating the VM devices while the disk is still plugged- then
hotplugging is performed and succeeds, then monitoring is resumed and
sets the disk to be still plugged, this patch is critical for the
engine to be synced with the actual state of the VM's disks.

Please note that this patch is partial, as detachDevice is async. That
means that still the hash can be calculated wrong in case the disk was
not detached yet. This fix will be included in a following patch.

Change-Id: I2cf18186cbba33d7e74fd15651ffec3149c98e1d
Bug-Url:https://bugzilla.redhat.com/1206696
Signed-off-by: Amit Aviram <aaviram at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/45077
Reviewed-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-by: Francesco Romani <fromani at redhat.com>
Continuous-Integration: Jenkins CI
---
M vdsm/virt/vm.py
1 file changed, 10 insertions(+), 19 deletions(-)

Approvals:
  Nir Soffer: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Amit Aviram: Verified
  Francesco Romani: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2cf18186cbba33d7e74fd15651ffec3149c98e1d
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list