[PATCH] rpc: wait longer for session daemon to start up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1271183

We only wait .5 seconds for the session daemon to start up and present
its socket, which isn't sufficient for many users. Bump up the sleep
interval and retry amount so we wait for a total of 5 seconds.
---
danpb suggests dropping the reverting this:

commit be78814ae07f092d9c4e71fd82dd1947aba2f029
Author: Michal Privoznik <mprivozn@xxxxxxxxxx>
Date:   Thu Apr 2 14:41:17 2015 +0200

    virNetSocketNewConnectUNIX: Use flocks when spawning a daemon


Prior to that we didn't need the retry logic at all... but that's a
bit more involved and boxes users are suffering with this issue in
the meantime


 src/rpc/virnetsocket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index b0d5b1c..d909b94 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -614,7 +614,7 @@ int virNetSocketNewConnectUNIX(const char *path,
     char *lockpath = NULL;
     int lockfd = -1;
     int fd = -1;
-    int retries = 100;
+    int retries = 500;
     virSocketAddr localAddr;
     virSocketAddr remoteAddr;
     char *rundir = NULL;
@@ -707,7 +707,7 @@ int virNetSocketNewConnectUNIX(const char *path,
             daemonLaunched = true;
         }
 
-        usleep(5000);
+        usleep(10000);
     }
 
     localAddr.len = sizeof(localAddr.data);
-- 
2.5.0

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]