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
This commit is contained in:
parent
eb7ab1cb09
commit
4b292f8a07
@ -0,0 +1,30 @@
|
||||
From 8de8ce551cbdb1250b696a5eedc5cff2b68e71e8 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@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@redhat.com>
|
||||
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@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
|
||||
|
31
0132-iscsiadm-Fix-the-compile-time-warning.patch
Normal file
31
0132-iscsiadm-Fix-the-compile-time-warning.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 0e6cb00eac013c270741ee2bdb9427ccc62ad705 Mon Sep 17 00:00:00 2001
|
||||
From: Adheer Chandravanshi <adheer.chandravanshi@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@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
|
||||
|
35
0167-Revert-iscsiadm-return-error-when-login-fails.patch
Normal file
35
0167-Revert-iscsiadm-return-error-when-login-fails.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 1c0f37a8ae48daa3ae1c37cdac7c0789299180eb Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@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
|
||||
|
@ -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
|
||||
|
@ -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@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@redhat.com> - 6.2.0.873-19
|
||||
- 1007388 fixes for iscsiadm to support qla4xxx
|
||||
- refresh boot session info patches to final version from upstream,
|
||||
|
Loading…
Reference in New Issue
Block a user