On Thu, Jan 18, 2018 at 17:04:32 +0100, Michal Privoznik wrote:
> QEMU added support for SCSI persistent reservations. The way QEMU
> implemented that makes it slightly harder for libvirt to adapt to - it's
> a small binary that needs to start before qemu so that it can connect to
> it. Basically, what libvirt does is:
> 
> 1) start qemu-pr-helper (the small binary from above),
> 2) records its PID for tracking purposes
> 3) start qemu
> 
> and when shutting down a domain the process is reversed:
> 
> 1) shut down qemu process,
> 2) kill qemu-pr-helper (PID was saved earlier).
> 
> Now, here also lies the last missing piece to he puzzle - what if
> qemu-pr-helper dies while qemu is running? After some discussion with
> Paolo it was agreed that qemu will emit an event for libvirt so that we
> can respawn the process. Anyway, that shouldn't be a show stopper for
> these patches (if it was the patch set might get too big).

Well, in general we should not allow these patches without that
sub-feature so that we don't have a version of libvirt out there which
will not handle that part.

> 
> Please test, review and comment.
> 
> As usual, you can find the patches on my github too:
> 
> https://github.com/zippy2/libvirt/tree/pr
> 
> Michal Privoznik (14):
>   virstoragefile: Introduce virStoragePRDef
>   qemuDomainDiskChangeSupported: Deny changing reservations
>   qemu: Introduce pr-manager-helper capability
>   qemu_domain: Introduce qemuDomainDiskPRObject
>   qemu: Generate alias for pr-helper
>   qemu: Store prAlias and prPath in status XML
>   qemu: Generate cmd line at startup
>   qemu: Introduce pr_helper to qemu.conf
>   qemu: Start PR daemons on domain startup
>   qemu: Track PR daemons PIDs in status XML
>   qemu_domain: Introduce qemuDomainGetPRUsageCount
>   qemu_process.c: Introduce qemuProcessSetupPRDaemon
>   qemu_hotplug: Hotplug of reservations
>   qemu_hotplug: Hotunplug of reservations

Ordering of the patches should be modified in such way, that the feature
can be enabled only once all the supporting code is already in.

E.g. hotplug should be fixed prior to enabling it, or command line
generators should not allow formatting it prior to libvirtd being able
to start the PR daemon.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to