diff --git a/storage/iscsi-tools/open-iscsi/patches/login-scan-manual.patch b/storage/iscsi-tools/open-iscsi/patches/login-scan-manual.patch new file mode 100644 index 00000000..40521f6a --- /dev/null +++ b/storage/iscsi-tools/open-iscsi/patches/login-scan-manual.patch @@ -0,0 +1,34 @@ +# https://github.com/open-iscsi/open-iscsi/pull/485 +# https://patch-diff.githubusercontent.com/raw/open-iscsi/open-iscsi/pull/485.patch +From c96f3788ff82c58b843a4412e91b8e1ce30d0a0f Mon Sep 17 00:00:00 2001 +From: Mike Christie +Date: Fri, 18 Oct 2024 18:07:30 -0500 +Subject: [PATCH] iscsid: Fix hang during login with scan=manual + +This fixes a regressions added in: + +48e683c ('iscsid: Rescan devices on relogin (#444) + +For scan=manual we were not sending a response to callers like +iscsiadm so they would hang. This has us send the response like +before. +--- + usr/initiator.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/usr/initiator.c b/usr/initiator.c +index bac4a1d2..0fe959bc 100644 +--- a/usr/initiator.c ++++ b/usr/initiator.c +@@ -1023,8 +1023,10 @@ static void session_scan_host(struct iscsi_session *session, int hostno, + { + pid_t pid; + +- if (!rescan && !idbm_session_autoscan(session)) ++ if (!rescan && !idbm_session_autoscan(session)) { ++ mgmt_ipc_write_rsp(qtask, ISCSI_SUCCESS); + return; ++ } + + pid = iscsi_sysfs_scan_host(hostno, session->id, 1, rescan); + if (pid == 0) { diff --git a/storage/iscsi-tools/open-iscsi/pkg.yaml b/storage/iscsi-tools/open-iscsi/pkg.yaml index d8a857fe..2fe00e53 100644 --- a/storage/iscsi-tools/open-iscsi/pkg.yaml +++ b/storage/iscsi-tools/open-iscsi/pkg.yaml @@ -32,6 +32,7 @@ steps: ln -s /toolchain/bin/pkg-config /usr/bin/pkg-config ln -s /toolchain/bin/file /usr/bin/file + patch -p1 < /pkg/patches/login-scan-manual.patch patch -p1 < /pkg/patches/musl-fixes.patch patch -p1 < /pkg/patches/add-missing-headers.patch patch -p1 < /pkg/patches/dont-use-lib64.patch diff --git a/storage/iscsi-tools/vars.yaml b/storage/iscsi-tools/vars.yaml index 808fa848..9da50661 100644 --- a/storage/iscsi-tools/vars.yaml +++ b/storage/iscsi-tools/vars.yaml @@ -1,4 +1,4 @@ -VERSION: v0.1.5 +VERSION: v0.1.6 # renovate: datasource=github-tags depName=open-iscsi/open-iscsi OPEN_ISCSI_VERSION: 2.1.10 # renovate: datasource=github-tags extractVersion=^v(?.*)$ depName=open-iscsi/open-isns