Change in vdsm[master]: vm: detect migration completed on recovery

danken at redhat.com danken at redhat.com
Tue Aug 19 10:32:10 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: vm: detect migration completed on recovery
......................................................................


vm: detect migration completed on recovery

If VDSM is down when a migration completes, it will
miss the migration completion event on the
onLibvirtLifeCycleEvent callback, and thus needlessly
wait the full migration timeout before actually
asking libvirt for the domain state and get back in sync.

BZ1104733 provided a quite complex demonstration
of the fact this scenario is unlikely, but possible.

To handle this situation, we
- connect early to the domain, on recovery.
  We know this is safe because on recovery we iterate on
  very domain list libvirt provided to us moments before,
  so the domain will be present.
- inspect the domain state *before* waiting for migration
  termination, and skip the wait if the domain is detected
  running.

A nice side-effect of this patch is also to clarify a tiny bit the
creation flows in Vm._run().

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

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I451c2a940693842e9bf7c63ccc117e75026bb11b
Gerrit-PatchSet: 17
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani 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: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list