[libvirt] [PATCH] all: don't wait for driver lock during startup

Michal Privoznik mprivozn at redhat.com
Tue Nov 26 14:31:37 UTC 2019


There are two daemons that wait for acquiring their pid files:
virtnetworkd and virtstoraged. This is undesirable as the idea
is to quit early if unable to acquire the pid file. This was
missed in v5.6.0-rc1~207.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/network/bridge_driver.c  | 2 +-
 src/storage/storage_driver.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 07dba8cfe4..e360645969 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -761,7 +761,7 @@ networkStateInitialize(bool privileged,
 
     if ((network_driver->lockFD =
          virPidFileAcquire(network_driver->stateDir, "driver",
-                           true, getpid())) < 0)
+                           false, getpid())) < 0)
         goto error;
 
     /* if this fails now, it will be retried later with dnsmasqCapsRefresh() */
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index d8355d3c3c..580a5e6f15 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -296,7 +296,7 @@ storageStateInitialize(bool privileged,
 
     if ((driver->lockFD =
          virPidFileAcquire(driver->stateDir, "driver",
-                           true, getpid())) < 0)
+                           false, getpid())) < 0)
         goto error;
 
     if (virStoragePoolObjLoadAllState(driver->pools,
-- 
2.23.0




More information about the libvir-list mailing list