2015-10-06 00:26:08 +00:00
|
|
|
From c769948e31e7d6239e792ed4e8f60b293811421b Mon Sep 17 00:00:00 2001
|
2014-02-27 00:52:52 +00:00
|
|
|
From: Chris Leech <cleech@redhat.com>
|
|
|
|
Date: Wed, 26 Feb 2014 16:33:48 -0800
|
2015-06-10 06:11:22 +00:00
|
|
|
Subject: [PATCH] update handling of boot sessions
|
2014-02-27 00:52:52 +00:00
|
|
|
|
|
|
|
force start iscsiuio if needed, socket activation does not seem to be
|
|
|
|
working for recovery
|
|
|
|
---
|
|
|
|
etc/systemd/iscsi-mark-root-nodes | 29 +++++++++++++++++++++++------
|
|
|
|
1 file changed, 23 insertions(+), 6 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/etc/systemd/iscsi-mark-root-nodes b/etc/systemd/iscsi-mark-root-nodes
|
2015-06-10 06:11:22 +00:00
|
|
|
index 157be62..60dcd70 100644
|
2014-02-27 00:52:52 +00:00
|
|
|
--- a/etc/systemd/iscsi-mark-root-nodes
|
|
|
|
+++ b/etc/systemd/iscsi-mark-root-nodes
|
|
|
|
@@ -1,13 +1,30 @@
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
ISCSIADM=/sbin/iscsiadm
|
|
|
|
+start_iscsid=0
|
|
|
|
+start_iscsiuio=0
|
|
|
|
|
|
|
|
-$ISCSIADM -m session >/dev/null 2>&1 || exit 0
|
|
|
|
+while read t num p target flash; do
|
|
|
|
+ # strip tag number from portal, keep "ip:port"
|
|
|
|
+ portal=${p%,*}
|
|
|
|
+ transport=${t%:}
|
|
|
|
|
|
|
|
-$ISCSIADM -m session | while read t num i target; do
|
|
|
|
- ip=${i%:*}
|
|
|
|
- $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot
|
|
|
|
-done
|
|
|
|
+ $ISCSIADM -m node -p $portal -T $target -o update -n node.startup -v onboot
|
|
|
|
|
|
|
|
-systemctl start iscsid.service
|
|
|
|
+ start_iscsid=1
|
|
|
|
+
|
|
|
|
+ if [ "$transport" = bnx2i ]; then
|
|
|
|
+ start_iscsiuio=1
|
|
|
|
+ fi
|
|
|
|
+done < <( $ISCSIADM -m session )
|
|
|
|
+
|
|
|
|
+# force iscsid and iscsiuio to start if needed for
|
|
|
|
+# recovering sessions created in the initrd
|
|
|
|
+
|
|
|
|
+if [ "$start_iscsid" -eq 1 ]; then
|
|
|
|
+ systemctl --no-block start iscsid.service
|
|
|
|
+fi
|
|
|
|
+if [ "$start_iscsiuio" -eq 1 ]; then
|
|
|
|
+ systemctl --no-block start iscsiuio.service
|
|
|
|
+fi
|
|
|
|
|
|
|
|
--
|
2015-06-10 06:11:22 +00:00
|
|
|
2.1.0
|
2014-02-27 00:52:52 +00:00
|
|
|
|