Change in vdsm[master]: Removing hack for stopping libvirt-guests as conflict service

ybronhei at redhat.com ybronhei at redhat.com
Wed Nov 13 09:35:26 UTC 2013


Yaniv Bronhaim has uploaded a new change for review.

Change subject: Removing hack for stopping libvirt-guests as conflict service
......................................................................

Removing hack for stopping libvirt-guests as conflict service

Due to recent fix in libvirt, libvirt-guests daemon now returns right
error code when checking its status. Thanks to that we can treat
libvirt-guests as all other daemons.

Change-Id: I61b274587e811edfbe63a02d762764700acd3eec
Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
---
M init/sysvinit/vdsmd.init.in
M vdsm.spec.in
2 files changed, 10 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/05/21205/1

diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in
index ea1ea85..6ef5718 100755
--- a/init/sysvinit/vdsmd.init.in
+++ b/init/sysvinit/vdsmd.init.in
@@ -48,25 +48,16 @@
     local conflicting_services="$1"
 
     for srv in ${conflicting_services}; do
-        if [ "$srv" == "libvirt-guests" ]; then
-            # `service libvirt-guests stop` tries to access libvirtd and
-            # requires sasl authentication. Instead, removing the lockfile
-            # signifies to libvirt-guests that it has stopped.
-            # TODO: This condition needs to be removed when BZ 1011981 fix will
-            # be available.
-            "@RM_PATH@" -f /var/lock/subsys/libvirt-guests >/dev/null 2>&1
-        else
-            if initctl status "${srv}" >/dev/null 2>&1; then
-                # When srv is Upstart service, status srv always returns 0
-                initctl stop "${srv}" || : # stop fails when already down
-                initctl status "${srv}" | grep -q stop/waiting
-            elif [ -x "/etc/init.d/${srv}" ]; then
-                if service "${srv}" status >/dev/null 2>&1; then
-                    service "${srv}" stop
-                fi
-            else
-                true
+        if initctl status "${srv}" >/dev/null 2>&1; then
+            # When srv is Upstart service, status srv always returns 0
+            initctl stop "${srv}" || : # stop fails when already down
+            initctl status "${srv}" | grep -q stop/waiting
+        elif [ -x "/etc/init.d/${srv}" ]; then
+            if service "${srv}" status >/dev/null 2>&1; then
+                service "${srv}" stop
             fi
+        else
+            true
         fi
         ret_val=$?
         if [ "${ret_val}" -ne 0 ]; then
diff --git a/vdsm.spec.in b/vdsm.spec.in
index cdb5af7..22e36b8 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -121,7 +121,7 @@
 Requires: libvirt-daemon-driver-qemu
 %else
 %if 0%{?rhel}
-Requires: libvirt >= 0.10.2-18.el6_4.10
+Requires: libvirt >= 0.10.2-18.el6_4.15
 %else
 Requires: libvirt >= 1.0.2-1
 %endif


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61b274587e811edfbe63a02d762764700acd3eec
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>


More information about the vdsm-patches mailing list