You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.5 KiB
56 lines
1.5 KiB
7 years ago
|
From 83f291bd475f3d11abaf1f7346732f75af585ed8 Mon Sep 17 00:00:00 2001
|
||
|
From: Chris Leech <cleech@redhat.com>
|
||
|
Date: Wed, 26 Feb 2014 16:33:48 -0800
|
||
|
Subject: update handling of boot sessions
|
||
|
|
||
|
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
|
||
|
index 157be62..d106ac6 100644
|
||
|
--- 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 ] || [ "$transport" = qedi ]; 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
|
||
|
|
||
|
--
|
||
|
1.8.3.1
|
||
|
|