Francesco Romani has posted comments on this change. Change subject: vm: Libvirt quering after disk detach operation addition. ......................................................................
Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/45138/1//COMMIT_MSG Commit Message: Line 6: Line 7: vm: Libvirt quering after disk detach operation addition. Line 8: Line 9: As stated in libvirt documentary, after detaching a device using the API Line 10: we need to verify that this device has actually been detached. > If libvirt crash or restart, vdsm will panic and the operation will fail in We have event dispatching/listening code. Short version: - Libvirt accepts event callback (one) - VDSM sets event handling callback in clientif (check clientIF.dispatchLibvirtEvents) - clientif route the event to the right VM - VM exports event handler. Simple example: VM.onRTCUpdate I see no obvious flaws in do what Nir suggests: - add threading.Event() with explicit timeout - set event in the libvirt event callback Finally, I also prefer to avoid polling unless the event based approach has obvious unfixable flaws. Line 11: Line 12: Not doing so can cause various problems, as hotunplugDisk could return a Line 13: success result while it did not actually succeeds to detach the disk. Line 14: -- To view, visit https://gerrit.ovirt.org/45138 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I393ce55dd761ac825cb96bd499976fd74c366b09 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Amit Aviram <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Amit Aviram <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
