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

Michal Privoznik posted 1 patch 1 week ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/b3ea2b8e28b6935e24cb20cc0b9680d4ae42dec5.1574778697.git.mprivozn@redhat.com
src/network/bridge_driver.c  | 2 +-
src/storage/storage_driver.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

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

Posted by Michal Privoznik 1 week ago
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@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

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

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

Posted by Ján Tomko 1 week ago
On Tue, Nov 26, 2019 at 03:31:37PM +0100, Michal Privoznik wrote:
>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.

Please rephrase the last sentence to separate the commit identification
from the period, e.g.

Commit v5.6.0-rc1~207 missed this.

  or

Fixes: v5.6.0-rc1~207

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

Reviewed-by: Ján Tomko <jtomko@redhat.com>

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

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

Posted by Daniel P. Berrangé 1 week ago
On Tue, Nov 26, 2019 at 03:31:37PM +0100, Michal Privoznik wrote:
> 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@redhat.com>
> ---
>  src/network/bridge_driver.c  | 2 +-
>  src/storage/storage_driver.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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