[iscsi-initiator-utils/f19: 13/15] host0 being treated as an invalid in the host stats command
Chris Leech
cleech at fedoraproject.org
Mon Apr 14 18:21:31 UTC 2014
commit 4b292f8a07bc65c69eb6394cf8f946f1bd14373f
Author: Chris Leech <cleech at redhat.com>
Date: Tue Feb 25 21:31:25 2014 -0800
host0 being treated as an invalid in the host stats command
revert change to return code when calling login_portal for sessions that
already exist, as it impacts users scripting around iscsiadm
Resolves: #1049710 #1015563
...x-the-hostno-check-for-stats-submode-of-h.patch | 30 +++++++++++++++++
0132-iscsiadm-Fix-the-compile-time-warning.patch | 31 +++++++++++++++++
...rt-iscsiadm-return-error-when-login-fails.patch | 35 ++++++++++++++++++++
...-version-string-to-match-RPM-package-vers.patch | 2 +-
iscsi-initiator-utils.spec | 13 +++++++-
5 files changed, 109 insertions(+), 2 deletions(-)
---
diff --git a/0131-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch b/0131-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch
new file mode 100644
index 0000000..64ce02b
--- /dev/null
+++ b/0131-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch
@@ -0,0 +1,30 @@
+From 8de8ce551cbdb1250b696a5eedc5cff2b68e71e8 Mon Sep 17 00:00:00 2001
+From: Chris Leech <cleech at redhat.com>
+Date: Mon, 24 Feb 2014 03:14:17 -0500
+Subject: [PATCH] iscsiadm: Fix the hostno check for stats submode of host mode
+
+This fixes the condition where hostno value of 0 was being treated
+as invalid.
+
+Signed-off-by: Chris Leech <cleech at redhat.com>
+Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi at qlogic.com>
+---
+ usr/iscsiadm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
+index 3cde8d1..36617ab 100644
+--- a/usr/iscsiadm.c
++++ b/usr/iscsiadm.c
+@@ -3470,7 +3470,7 @@ main(int argc, char **argv)
+ ¶ms);
+ break;
+ case MODE_HOST_STATS:
+- if (!host_no) {
++ if (host_no > MAX_HOST_NO) {
+ log_error("STATS mode requires host no");
+ rc = ISCSI_ERR_INVAL;
+ break;
+--
+1.8.3.1
+
diff --git a/0132-iscsiadm-Fix-the-compile-time-warning.patch b/0132-iscsiadm-Fix-the-compile-time-warning.patch
new file mode 100644
index 0000000..b6fc868
--- /dev/null
+++ b/0132-iscsiadm-Fix-the-compile-time-warning.patch
@@ -0,0 +1,31 @@
+From 0e6cb00eac013c270741ee2bdb9427ccc62ad705 Mon Sep 17 00:00:00 2001
+From: Adheer Chandravanshi <adheer.chandravanshi at qlogic.com>
+Date: Mon, 24 Feb 2014 03:14:18 -0500
+Subject: [PATCH] iscsiadm: Fix the compile time warning
+
+This fixes the following compile time warning message:
+
+iscsiadm.c:2248: warning: passing argument 1 of 'print_host_stats' from incompatible pointer type
+
+Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi at qlogic.com>
+---
+ usr/iscsiadm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
+index 36617ab..389f4b8 100644
+--- a/usr/iscsiadm.c
++++ b/usr/iscsiadm.c
+@@ -2245,7 +2245,8 @@ static int exec_host_stats_op(int op, int info_level, uint32_t host_no)
+ goto exit_host_stats;
+ }
+
+- print_host_stats(req_buf + sizeof(struct iscsi_uevent));
++ print_host_stats((struct iscsi_offload_host_stats *)(req_buf +
++ sizeof(struct iscsi_uevent)));
+
+ ipc->ctldev_close();
+
+--
+1.8.3.1
+
diff --git a/0167-Revert-iscsiadm-return-error-when-login-fails.patch b/0167-Revert-iscsiadm-return-error-when-login-fails.patch
new file mode 100644
index 0000000..64c9af8
--- /dev/null
+++ b/0167-Revert-iscsiadm-return-error-when-login-fails.patch
@@ -0,0 +1,35 @@
+From 1c0f37a8ae48daa3ae1c37cdac7c0789299180eb Mon Sep 17 00:00:00 2001
+From: Chris Leech <cleech at redhat.com>
+Date: Mon, 24 Feb 2014 09:33:33 -0800
+Subject: [PATCH] Revert "iscsiadm: return error when login fails"
+
+This reverts commit fc2a8e9a2911bc76f961fe3e4a159fab9b8b9691.
+
+Done to address RHBZ #1015563
+
+---
+ usr/session_mgmt.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/usr/session_mgmt.c b/usr/session_mgmt.c
+index 87b8e00..3815b1d 100644
+--- a/usr/session_mgmt.c
++++ b/usr/session_mgmt.c
+@@ -178,12 +178,12 @@ int iscsi_login_portal(void *data, struct list_head *list, struct node_rec *rec)
+ goto done;
+ }
+ if (session_count >= rec->session.nr_sessions) {
+- log_warning("%s: %d session%s requested, but %d "
++ log_debug(1, "%s: %d session%s requested, but %d "
+ "already present.",
+ rec->iface.name, rec->session.nr_sessions,
+ rec->session.nr_sessions == 1 ? "" : "s",
+ session_count);
+- rc = ISCSI_ERR_SESS_EXISTS;
++ rc = 0;
+ goto done;
+ }
+
+--
+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 c6398b1..7f910ef 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-14"
++#define ISCSI_VERSION_STR "6.2.0.873-20"
#define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version"
#endif
diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec
index c835c5f..c015334 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: 19%{?dist}
+Release: 20%{?dist}
Group: System Environment/Daemons
License: GPLv2+
URL: http://www.open-iscsi.org
@@ -83,6 +83,8 @@ Patch69: 0069-Add-missing-DESTDIR.patch
Patch70: 0070-iscsi-tools-set-non-negotiated-params-early.patch
# not (yet) upstream merged
+Patch131: 0131-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch
+Patch132: 0132-iscsiadm-Fix-the-compile-time-warning.patch
Patch143: 0143-idmb_rec_write-check-for-tpgt-first.patch
Patch145: 0145-idbm_rec_write-seperate-old-and-new-style-writes.patch
Patch146: 0146-idbw_rec_write-pick-tpgt-from-existing-record.patch
@@ -104,6 +106,7 @@ Patch163: 0163-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch
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
# version string, needs to be updated with each build
Patch199: 0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch
@@ -213,6 +216,8 @@ developing applications that use %{name}.
%patch69 -p1
%patch70 -p1
# pending upstream merge
+%patch131 -p1
+%patch132 -p1
%patch143 -p1
%patch145 -p1
%patch146 -p1
@@ -234,6 +239,7 @@ developing applications that use %{name}.
%patch164 -p1
%patch165 -p1
%patch166 -p1
+%patch167 -p1
# version string
%patch199 -p1
@@ -393,6 +399,11 @@ fi
%{_includedir}/libiscsi.h
%changelog
+* Tue Feb 25 2014 Chris Leech <cleech at redhat.com> - 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
+ that already exist, as it impacts users scripting around iscsiadm
+
* Mon Feb 17 2014 Chris Leech <cleech at redhat.com> - 6.2.0.873-19
- 1007388 fixes for iscsiadm to support qla4xxx
- refresh boot session info patches to final version from upstream,
More information about the scm-commits
mailing list