Change in vdsm[ovirt-3.3]: sysvinit: Ensure that iscsid is started

nsoffer at redhat.com nsoffer at redhat.com
Mon Jan 27 23:05:54 UTC 2014


Hello Dan Kenigsberg,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/23778

to review the following change.

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

sysvinit: Ensure that iscsid is started

vdsm is starting the iscsid daemon when it starts, but iscsid "start"
command may silently *not* start the iscsid daemon, because vdsm is
configuring it's nodes to login manually. When iscsid daemon is not
running and vdsm is connecting to a storage server, iscsiadm starts
iscsid daemon. This works when /etc/iscsi/iscsi.conf contains:

    iscsid.startup = /etc/rc.d/init.d/iscsid force-start

This is the default configuration on a fresh install of EL 6, and is
common on developers machines. However when this option is missing,
iscsiadm fails and iscsi storage is not available. According to the
comments on the bug, the missing configuration is common in the field.

This patch starts iscsid using "force-start" command, ensuring that
iscsid daemon is started and removing the dependency on iscsi.startup
configuration. This restores the behavior from commit 0233b5e952 in Nov
2011 until commit 3c0adf791e in May 2013. The behavior was changed to
make systemd-based deployment (which has no "force-start") start iscsid,
but now that we have an independent systemd service, it can be safely
avoided.

This change does not effect the deployment for systemd or upstart.

Change-Id: Idb5c3de4f8dccb1d8344182d5016feabcf86a7df
Relates-To: http://gerrit.ovirt.org/14630
Bug-Url: https://bugzilla.redhat.com/1056948
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/23601
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M init/sysvinit/vdsmd.init.in
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/23778/1

diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in
index dc7847e..8e9cf3f 100755
--- a/init/sysvinit/vdsmd.init.in
+++ b/init/sysvinit/vdsmd.init.in
@@ -29,7 +29,7 @@
 RESPAWNPIDFILE=@VDSMRUNDIR@/respawn.pid
 CORE_DUMP_PATH="/var/log/core/core.%p.%t.dump"
 CORE_PATTERN="/proc/sys/kernel/core_pattern"
-NEEDED_SERVICES="iscsid multipathd rpcbind ntpd wdmd sanlock network libvirtd
+NEEDED_SERVICES="multipathd rpcbind ntpd wdmd sanlock network libvirtd
                  supervdsmd"
 CONFLICTING_SERVICES="libvirt-guests ksmtuned"
 LOCK_FILE="/var/lock/subsys/vdsmd"
@@ -129,6 +129,12 @@
     fi
     shutdown_conflicting_srv "${CONFLICTING_SERVICES}" || return 1
     start_needed_srv "${NEEDED_SERVICES}" || return 1
+
+    # "service iscsid start" may not start becasue we configure node.startup to
+    # manual. See /etc/init.d/iscsid.
+    service iscsid status >/dev/null 2>&1 || service iscsid force-start \
+        || return 1
+
     "${VDSMD_INIT_COMMON}" --pre-start || return 1
 
     echo $"Starting up vdsm daemon: "


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb5c3de4f8dccb1d8344182d5016feabcf86a7df
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>


More information about the vdsm-patches mailing list