diff --git a/0168-update-handling-of-boot-sessions.patch b/0168-update-handling-of-boot-sessions.patch new file mode 100644 index 0000000..badbdb0 --- /dev/null +++ b/0168-update-handling-of-boot-sessions.patch @@ -0,0 +1,55 @@ +From 83f291bd475f3d11abaf1f7346732f75af585ed8 Mon Sep 17 00:00:00 2001 +From: Chris Leech +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 ]; 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 + diff --git a/0169-update-iscsi.service-for-boot-session-recovery.patch b/0169-update-iscsi.service-for-boot-session-recovery.patch new file mode 100644 index 0000000..f7a2f79 --- /dev/null +++ b/0169-update-iscsi.service-for-boot-session-recovery.patch @@ -0,0 +1,34 @@ +From 969e26197c792ec5377d2c261a934a9c907e82f0 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Fri, 14 Mar 2014 09:22:21 -0700 +Subject: [PATCH] update iscsi.service for boot session recovery + +--- + etc/systemd/iscsi.service | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service +index d5712bd..3de76c5 100644 +--- a/etc/systemd/iscsi.service ++++ b/etc/systemd/iscsi.service +@@ -5,14 +5,15 @@ DefaultDependencies=no + Conflicts=shutdown.target + After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service + Before=remote-fs-pre.target +-ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes ++ConditionDirectoryNotEmpty=|/var/lib/iscsi/nodes ++ConditionDirectoryNotEmpty=|/sys/class/iscsi_session + + [Service] + Type=oneshot + RemainAfterExit=true + ExecStart=/usr/libexec/iscsi-mark-root-nodes ++SuccessExitStatus=21 + ExecStart=/sbin/iscsiadm -m node --loginall=automatic +-ExecStop=/bin/sync + ExecStop=/sbin/iscsiadm -m node --logoutall=automatic + ExecReload=/sbin/iscsiadm -m node --loginall=automatic + +-- +1.8.3.1 + diff --git a/0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch b/0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch index 7f910ef..1af14f0 100644 --- a/0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch +++ b/0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch @@ -16,7 +16,7 @@ index a090522..aef0c3d 100644 * some other maintainer could merge a patch without going through us */ -#define ISCSI_VERSION_STR "2.0-873" -+#define ISCSI_VERSION_STR "6.2.0.873-20" ++#define ISCSI_VERSION_STR "6.2.0.873-21" #define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version" #endif diff --git a/04-iscsi b/04-iscsi index f142e34..864ade7 100755 --- a/04-iscsi +++ b/04-iscsi @@ -2,6 +2,6 @@ case "$2" in up|vpn-up) - /bin/systemctl reload iscsi.service || : + /bin/systemctl --no-block reload iscsi.service || : ;; esac diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec index c015334..be98cd6 100644 --- a/iscsi-initiator-utils.spec +++ b/iscsi-initiator-utils.spec @@ -4,7 +4,7 @@ Summary: iSCSI daemon and utility programs Name: iscsi-initiator-utils Version: 6.%{open_iscsi_version}.%{open_iscsi_build} -Release: 20%{?dist} +Release: 21%{?dist} Group: System Environment/Daemons License: GPLv2+ URL: http://www.open-iscsi.org @@ -107,6 +107,8 @@ Patch164: 0164-libiscsi-fix-incorrect-strncpy-use.patch Patch165: 0165-fix-hardened-build-of-iscsiuio.patch Patch166: 0166-start-socket-listeners-on-iscsiadm-command.patch Patch167: 0167-Revert-iscsiadm-return-error-when-login-fails.patch +Patch168: 0168-update-handling-of-boot-sessions.patch +Patch169: 0169-update-iscsi.service-for-boot-session-recovery.patch # version string, needs to be updated with each build Patch199: 0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch @@ -240,6 +242,8 @@ developing applications that use %{name}. %patch165 -p1 %patch166 -p1 %patch167 -p1 +%patch168 -p1 +%patch169 -p1 # version string %patch199 -p1 @@ -399,6 +403,16 @@ fi %{_includedir}/libiscsi.h %changelog +* Tue Mar 18 2014 Chris Leech - 6.2.0.873-21 +- 1069825 +- boot session handling improvements +- Fix iscsi-mark-root for changed iscsiadm output +- Make sure iscsiuio is running for boot session recovery when using the + bnx2i transport by forcing iscsiuio.service start +- Make NM dispatch triggered re-check for autostart sessions async +- Accept exit code 21, no records, from iscsiadm as success in + iscsi.service + * Tue Feb 25 2014 Chris Leech - 6.2.0.873-20 - 1049710 host0 being treated as an invalid in the host stats command - 1015563 revert change to return code when calling login_portal for sessions