Change in vdsm[master]: sysvinit: Ensure that iscsid is started

nsoffer at redhat.com nsoffer at redhat.com
Wed Jan 22 18:34:36 UTC 2014


Nir Soffer has uploaded a new change for review.

Change subject: sysvinit: Ensure that iscsid is started
......................................................................

sysvinit: Ensure that iscsid is started

Since commit 3c0adf791e, we start iscsid service using the "start"
command like other services. This works fine the iscsi.startup option is
configured in /etc/iscsi/iscsi.conf, and this seem to be common on our
machines. However if the configuration is missing, we must start iscsid
using the "force-start" command.

Commit 3c0adf791e suggests that "force-start" is not supported. Testing
show that not only this option is supported, it is required to start
iscsid, because we set node.startup option to "manual", and iscsi
"start" may sliently not start if nodes.startup in this case.

This patch fixes the startup on sysvinit by using "force-start" for
iscsid and "start" for other services.

Change-Id: Idb5c3de4f8dccb1d8344182d5016feabcf86a7df
Bug-Url: TBD
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M init/sysvinit/vdsmd.init.in
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/23601/1

diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in
index 6ef5718..7167761 100755
--- a/init/sysvinit/vdsmd.init.in
+++ b/init/sysvinit/vdsmd.init.in
@@ -79,7 +79,15 @@
             initctl start "${srv}" || : # start fails when already running
             initctl status "${srv}" | grep -q start/running
         else
-            service "${srv}" status >/dev/null 2>&1 || service "${srv}" start
+            if ! service "${srv}" status >/dev/null 2>&1; then
+                if [ "${srv}" = "iscsid" ]; then
+                    # "service iscsid start" may not start becasue we configure
+                    # node.startup to manual. See /etc/init.d/iscsid.
+                    service "${srv}" force-start
+                else
+                    service "${srv}" start
+                fi
+            fi
         fi
         ret_val=$?
         if [ "${ret_val}" -ne 0 ]; then


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb5c3de4f8dccb1d8344182d5016feabcf86a7df
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list