From patchwork Tue Mar 15 21:10:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 63895 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp925848lbc; Tue, 15 Mar 2016 14:22:50 -0700 (PDT) X-Received: by 10.140.20.39 with SMTP id 36mr314673qgi.15.1458076970162; Tue, 15 Mar 2016 14:22:50 -0700 (PDT) Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com. [209.132.183.39]) by mx.google.com with ESMTPS id k92si88400qgk.39.2016.03.15.14.22.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Mar 2016 14:22:50 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2FLEaR3021212; Tue, 15 Mar 2016 17:14:37 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u2FLEZAC014148 for ; Tue, 15 Mar 2016 17:14:35 -0400 Received: from colepc.redhat.com (ovpn-113-66.phx2.redhat.com [10.3.113.66]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2FLEYnC027629; Tue, 15 Mar 2016 17:14:34 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Tue, 15 Mar 2016 17:10:48 -0400 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: Michal Privoznik Subject: [libvirt] [PATCH] rpc: wait longer for session daemon to start up X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com 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 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(-) -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list 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);