Change in vdsm[master]: BZ#811807 Libvirt service engagement workaround

masayag at redhat.com masayag at redhat.com
Mon Aug 20 21:56:16 UTC 2012


Moti Asayag has uploaded a new change for review.

Change subject: BZ#811807 Libvirt service engagement workaround
......................................................................

BZ#811807 Libvirt service engagement workaround

The patch intended to bypass a false report of libvirt service as
started (when started with initctl). Instead of relying on initctl,
vdsm awaits few seconds till the service is reported with its allocated
process id (by 'pgrep').

Change-Id: I7f6fb1ef12caeca3a47adec206b653932026634f
Signed-off-by: Moti Asayag <masayag at redhat.com>
---
M vdsm/vdsmd.init.in
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/7361/1

diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index d34b48d..fd09394 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -440,6 +440,20 @@
     startout=`/sbin/initctl start libvirtd 2>&1`
     if [[ "$?" -eq 0 || "$startout" =~ .*already\ running.* ]];
     then
+
+        # Begin workaround
+        # Libvirt reports its service status as responsive despite its socket
+        # is not yet ready. Once issue fixed on libvirt, this WA shouls be removed.
+        for i in {1..20}
+        do
+            if pgrep libvirtd > /dev/null 2>&1;
+            then
+                return 0
+            fi
+            sleep 1
+        done
+        # End workaround
+
         return 0
     else
         echo "$startout" >&2


--
To view, visit http://gerrit.ovirt.org/7361
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f6fb1ef12caeca3a47adec206b653932026634f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <masayag at redhat.com>


More information about the vdsm-patches mailing list