Change in vdsm[master]: vm: Libvirt quering after disk detach operation addition.

fromani at redhat.com fromani at redhat.com
Mon Aug 31 07:43:07 UTC 2015


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 <aaviram at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list