Skip to content
Commit 44a5ba2a authored by Daniel P. Berrangé's avatar Daniel P. Berrangé
Browse files

storage: acquire a pidfile in the driver root directory



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/storage/driver.pid

In unprivileged libvirtd this ends up locking

  /run/user/$UID/libvirt/storage/run/driver.pid

NB, the latter can vary depending on $XDG_RUNTIME_DIR

Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
parent c03aef7c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment