Change in vdsm[master]: vm: make _set_lastStatus safer

danken at redhat.com danken at redhat.com
Fri Dec 5 17:58:55 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: vm: make _set_lastStatus safer
......................................................................


vm: make _set_lastStatus safer

It is not safe to set concurrently state of a VM, because
the function which does that is not-trivial and racy.

This is a concrete risk in the case of QEMU dying
(or being killed, like in rhbz#1142776) unexpectedly
on Migration Source.

In this case, the race between the libvirt event handler
and the migration.SourceThread becomes evident, and
could end up in messing the Vm state.

This patch introduces a lock to make concurrent invocations
of _set_lastStatus safe(r).

Change-Id: I172c6a4d4bae156294f7f8944912c877f55ab5a0
Bug-Url: https://bugzilla.redhat.com/1142776
Signed-off-by: Francesco Romani <fromani at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/35896
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 21 insertions(+), 14 deletions(-)

Approvals:
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Verified



-- 
To view, visit http://gerrit.ovirt.org/35896
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I172c6a4d4bae156294f7f8944912c877f55ab5a0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Vitor de Lima <vdelima at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list