[libvirt] [PATCH 05/12] nodedev: acquire a pidfile in the driver root directory
Michal Privoznik
mprivozn at redhat.com
Wed Jul 10 17:02:08 UTC 2019
On 7/10/19 5:47 PM, Daniel P. Berrangé wrote:
> When we allow multiple instances of the driver for the same user
> account, using a separate root directory, we need to ensure mutual
> exclusion. Use a pidfile to guarantee this.
>
> In privileged libvirtd this ends up locking
>
> /var/run/libvirt/nodedev/driver.pid
>
> In unprivileged libvirtd this ends up locking
>
> /run/user/$UID/libvirt/nodedev/run/driver.pid
>
> NB, the latter can vary depending on $XDG_RUNTIME_DIR
>
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
> src/conf/virnodedeviceobj.h | 5 +++++
> src/node_device/node_device_hal.c | 31 +++++++++++++++++++++++++++++
> src/node_device/node_device_udev.c | 32 ++++++++++++++++++++++++++++++
> 3 files changed, 68 insertions(+)
Side note, isn't it time to finally kill hal backend? Is somebody still
using it?
Michal
More information about the libvir-list
mailing list