Yaniv Bronhaim 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 <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/28511
Reviewed-by: Dan Kenigsberg <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/31671
Reviewed-by: Vinzenz Feenstra <[email protected]>
Reviewed-by: Yaniv Bronhaim <[email protected]>
---
M vdsm/virt/vm.py
1 file changed, 28 insertions(+), 10 deletions(-)

Approvals:
  Yaniv Bronhaim: Looks good to me, approved
  Vinzenz Feenstra: Looks good to me, but someone else must approve
  Francesco Romani: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I451c2a940693842e9bf7c63ccc117e75026bb11b
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Francesco Romani <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to