update to upstream v2.1.0
This commit is contained in:
parent
e806329da6
commit
bda814b469
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
|||||||
/open-iscsi-86e8892.tar.gz
|
/open-iscsi-86e8892.tar.gz
|
||||||
/open-iscsi-4ef9261.tar.gz
|
/open-iscsi-4ef9261.tar.gz
|
||||||
/open-iscsi-f3c8e90.tar.gz
|
/open-iscsi-f3c8e90.tar.gz
|
||||||
|
/open-iscsi-4440e57.tar.gz
|
||||||
|
146
0001-service-file-tweaks.patch
Normal file
146
0001-service-file-tweaks.patch
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
From 2d84ee02e9ac69928261b38b5876bebb2349bd65 Mon Sep 17 00:00:00 2001
|
||||||
|
From: rpm-build <rpm-build>
|
||||||
|
Date: Tue, 4 Jun 2019 13:23:32 -0700
|
||||||
|
Subject: [PATCH] service file tweaks
|
||||||
|
|
||||||
|
---
|
||||||
|
etc/systemd/iscsi-mark-root-nodes | 30 ++++++++++++++++++++++++++++++
|
||||||
|
etc/systemd/iscsi-shutdown.service | 14 ++++++++++++++
|
||||||
|
etc/systemd/iscsi.service | 23 +++++++++++++----------
|
||||||
|
etc/systemd/iscsid.service | 6 ++++--
|
||||||
|
etc/systemd/iscsiuio.service | 2 +-
|
||||||
|
5 files changed, 62 insertions(+), 13 deletions(-)
|
||||||
|
create mode 100755 etc/systemd/iscsi-mark-root-nodes
|
||||||
|
create mode 100644 etc/systemd/iscsi-shutdown.service
|
||||||
|
|
||||||
|
diff --git a/etc/systemd/iscsi-mark-root-nodes b/etc/systemd/iscsi-mark-root-nodes
|
||||||
|
new file mode 100755
|
||||||
|
index 0000000..c693707
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/etc/systemd/iscsi-mark-root-nodes
|
||||||
|
@@ -0,0 +1,30 @@
|
||||||
|
+#!/bin/bash
|
||||||
|
+
|
||||||
|
+ISCSIADM=/usr/sbin/iscsiadm
|
||||||
|
+start_iscsid=0
|
||||||
|
+start_iscsiuio=0
|
||||||
|
+
|
||||||
|
+while read t num p target flash; do
|
||||||
|
+ # strip tag number from portal, keep "ip:port"
|
||||||
|
+ portal=${p%,*}
|
||||||
|
+ transport=${t%:}
|
||||||
|
+
|
||||||
|
+ $ISCSIADM -m node -p $portal -T $target -o update -n node.startup -v onboot
|
||||||
|
+
|
||||||
|
+ 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
|
||||||
|
+
|
||||||
|
diff --git a/etc/systemd/iscsi-shutdown.service b/etc/systemd/iscsi-shutdown.service
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..69c1c77
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/etc/systemd/iscsi-shutdown.service
|
||||||
|
@@ -0,0 +1,14 @@
|
||||||
|
+[Unit]
|
||||||
|
+Description=Logout off all iSCSI sessions on shutdown
|
||||||
|
+Documentation=man:iscsid(8) man:iscsiadm(8)
|
||||||
|
+DefaultDependencies=no
|
||||||
|
+Conflicts=shutdown.target
|
||||||
|
+After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
|
||||||
|
+Before=remote-fs-pre.target
|
||||||
|
+Wants=remote-fs-pre.target
|
||||||
|
+RefuseManualStop=yes
|
||||||
|
+
|
||||||
|
+[Service]
|
||||||
|
+Type=oneshot
|
||||||
|
+RemainAfterExit=true
|
||||||
|
+ExecStop=-/usr/sbin/iscsiadm -m node --logoutall=all
|
||||||
|
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
|
||||||
|
index e475888..eadfcec 100644
|
||||||
|
--- a/etc/systemd/iscsi.service
|
||||||
|
+++ b/etc/systemd/iscsi.service
|
||||||
|
@@ -1,18 +1,21 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Login and scanning of iSCSI devices
|
||||||
|
-Documentation=man:iscsiadm(8) man:iscsid(8)
|
||||||
|
-Before=remote-fs.target
|
||||||
|
-After=network.target network-online.target iscsid.service
|
||||||
|
-Requires=iscsid.service
|
||||||
|
-ConditionPathExists=/etc/iscsi/initiatorname.iscsi
|
||||||
|
+Documentation=man:iscsid(8) man:iscsiadm(8)
|
||||||
|
+DefaultDependencies=no
|
||||||
|
+Conflicts=shutdown.target
|
||||||
|
+After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
|
||||||
|
+Before=remote-fs-pre.target
|
||||||
|
+Wants=remote-fs-pre.target iscsi-shutdown.service
|
||||||
|
+ConditionDirectoryNotEmpty=|/var/lib/iscsi/nodes
|
||||||
|
+ConditionDirectoryNotEmpty=|/sys/class/iscsi_session
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
-ExecStart=/sbin/iscsiadm -m node --loginall=automatic
|
||||||
|
-ExecStop=/sbin/iscsiadm -m node --logoutall=automatic
|
||||||
|
-ExecStop=/sbin/iscsiadm -m node --logoutall=manual
|
||||||
|
-SuccessExitStatus=21
|
||||||
|
RemainAfterExit=true
|
||||||
|
+ExecStart=-/usr/libexec/iscsi-mark-root-nodes
|
||||||
|
+ExecStart=-/usr/sbin/iscsiadm -m node --loginall=automatic
|
||||||
|
+ExecReload=-/usr/sbin/iscsiadm -m node --loginall=automatic
|
||||||
|
+SuccessExitStatus=21
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
-WantedBy=remote-fs.target
|
||||||
|
+WantedBy=sysinit.target
|
||||||
|
diff --git a/etc/systemd/iscsid.service b/etc/systemd/iscsid.service
|
||||||
|
index 4fef168..8d50cf0 100644
|
||||||
|
--- a/etc/systemd/iscsid.service
|
||||||
|
+++ b/etc/systemd/iscsid.service
|
||||||
|
@@ -1,14 +1,16 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Open-iSCSI
|
||||||
|
-Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
|
||||||
|
+Documentation=man:iscsid(8) man:iscsiadm(8)
|
||||||
|
DefaultDependencies=no
|
||||||
|
+Conflicts=shutdown.target
|
||||||
|
After=network.target iscsiuio.service
|
||||||
|
Before=remote-fs-pre.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
NotifyAccess=main
|
||||||
|
-ExecStart=/sbin/iscsid -f
|
||||||
|
+ExecStart=/usr/sbin/iscsid -f
|
||||||
|
+ExecStop=/usr/sbin/iscsiadm -k 0 2
|
||||||
|
KillMode=mixed
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
diff --git a/etc/systemd/iscsiuio.service b/etc/systemd/iscsiuio.service
|
||||||
|
index e4d9fd0..8620cde 100644
|
||||||
|
--- a/etc/systemd/iscsiuio.service
|
||||||
|
+++ b/etc/systemd/iscsiuio.service
|
||||||
|
@@ -11,7 +11,7 @@ Before=remote-fs-pre.target iscsid.service
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
NotifyAccess=main
|
||||||
|
-ExecStart=/sbin/iscsiuio -f
|
||||||
|
+ExecStart=/usr/sbin/iscsiuio -f
|
||||||
|
KillMode=mixed
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From dbec0a5b7737142f8a1462cdf826c35a78e899b2 Mon Sep 17 00:00:00 2001
|
From 97071360caa6868c21a161047ed471790c405efb Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Tue, 13 Aug 2013 10:59:44 -0700
|
Date: Tue, 13 Aug 2013 10:59:44 -0700
|
||||||
Subject: [PATCH 01/32] idmb_rec_write, check for tpgt first
|
Subject: [PATCH] idmb_rec_write, check for tpgt first
|
||||||
|
|
||||||
Factor out the check for a tpgt to a single place, before going crazy on
|
Factor out the check for a tpgt to a single place, before going crazy on
|
||||||
the rec files. Makes flow of this function easier to follow, and preps
|
the rec files. Makes flow of this function easier to follow, and preps
|
||||||
@ -11,12 +11,12 @@ for splitting it up.
|
|||||||
1 file changed, 5 insertions(+), 13 deletions(-)
|
1 file changed, 5 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
diff --git a/usr/idbm.c b/usr/idbm.c
|
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||||
index 830189f571ea..ab3577878e86 100644
|
index be4d4e3..a7da540 100644
|
||||||
--- a/usr/idbm.c
|
--- a/usr/idbm.c
|
||||||
+++ b/usr/idbm.c
|
+++ b/usr/idbm.c
|
||||||
@@ -2042,6 +2042,10 @@ static int idbm_rec_write(node_rec_t *rec)
|
@@ -2078,6 +2078,10 @@ static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
|
||||||
if (rc)
|
goto free_portal;
|
||||||
goto free_portal;
|
}
|
||||||
|
|
||||||
+ if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN)
|
+ if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN)
|
||||||
+ /* drop down to old style portal as config */
|
+ /* drop down to old style portal as config */
|
||||||
@ -25,7 +25,7 @@ index 830189f571ea..ab3577878e86 100644
|
|||||||
rc = stat(portal, &statb);
|
rc = stat(portal, &statb);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
rc = 0;
|
rc = 0;
|
||||||
@@ -2050,22 +2054,10 @@ static int idbm_rec_write(node_rec_t *rec)
|
@@ -2086,22 +2090,10 @@ static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
|
||||||
* set the tgpt. In new versions you must pass all the info in
|
* set the tgpt. In new versions you must pass all the info in
|
||||||
* from the start
|
* from the start
|
||||||
*/
|
*/
|
||||||
@ -50,5 +50,5 @@ index 830189f571ea..ab3577878e86 100644
|
|||||||
* Old style portal as a file, but with tpgt. Let's update it.
|
* Old style portal as a file, but with tpgt. Let's update it.
|
||||||
*/
|
*/
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,31 +1,35 @@
|
|||||||
From b9d89091daab823eb2dc72c6c568af7897f83137 Mon Sep 17 00:00:00 2001
|
From 4c6e7c0fcc6da66cf81c0714bf907762194eedf2 Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Tue, 13 Aug 2013 11:34:31 -0700
|
Date: Tue, 13 Aug 2013 11:34:31 -0700
|
||||||
Subject: [PATCH 02/32] idbm_rec_write, seperate old and new style writes
|
Subject: [PATCH] idbm_rec_write, seperate old and new style writes
|
||||||
|
|
||||||
Duplicates a small bit of code, but easier to understand and extened.
|
Duplicates a small bit of code, but easier to understand and extened.
|
||||||
---
|
---
|
||||||
usr/idbm.c | 116 +++++++++++++++++++++++++++++++++++++++++--------------------
|
usr/idbm.c | 129 +++++++++++++++++++++++++++++++++++------------------
|
||||||
1 file changed, 79 insertions(+), 37 deletions(-)
|
1 file changed, 86 insertions(+), 43 deletions(-)
|
||||||
|
|
||||||
diff --git a/usr/idbm.c b/usr/idbm.c
|
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||||
index ab3577878e86..21ff61ab2bd8 100644
|
index a7da540..2f5e309 100644
|
||||||
--- a/usr/idbm.c
|
--- a/usr/idbm.c
|
||||||
+++ b/usr/idbm.c
|
+++ b/usr/idbm.c
|
||||||
@@ -2001,7 +2001,7 @@ mkdir_portal:
|
@@ -2030,12 +2030,7 @@ mkdir_portal:
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
-static int idbm_rec_write(node_rec_t *rec)
|
-/*
|
||||||
|
- * When the disable_lock param is true, the idbm_lock/idbm_unlock needs
|
||||||
|
- * to be holt by the caller, this will avoid overwriting each other in
|
||||||
|
- * case of updating(read-modify-write) the recs in parallel.
|
||||||
|
- */
|
||||||
|
-static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
|
||||||
+static int idbm_rec_write_new(node_rec_t *rec)
|
+static int idbm_rec_write_new(node_rec_t *rec)
|
||||||
{
|
{
|
||||||
struct stat statb;
|
struct stat statb;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
@@ -2013,38 +2013,8 @@ static int idbm_rec_write(node_rec_t *rec)
|
@@ -2048,39 +2043,8 @@ static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
|
||||||
log_error("Could not alloc portal");
|
|
||||||
return ISCSI_ERR_NOMEM;
|
return ISCSI_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
-
|
|
||||||
- snprintf(portal, PATH_MAX, "%s", NODE_CONFIG_DIR);
|
- snprintf(portal, PATH_MAX, "%s", NODE_CONFIG_DIR);
|
||||||
- if (access(portal, F_OK) != 0) {
|
- if (access(portal, F_OK) != 0) {
|
||||||
- if (mkdir(portal, 0660) != 0) {
|
- if (mkdir(portal, 0660) != 0) {
|
||||||
@ -50,9 +54,11 @@ index ab3577878e86..21ff61ab2bd8 100644
|
|||||||
rec->name, rec->conn[0].address, rec->conn[0].port);
|
rec->name, rec->conn[0].address, rec->conn[0].port);
|
||||||
- log_debug(5, "Looking for config file %s", portal);
|
- log_debug(5, "Looking for config file %s", portal);
|
||||||
-
|
-
|
||||||
- rc = idbm_lock();
|
- if (!disable_lock) {
|
||||||
- if (rc)
|
- rc = idbm_lock();
|
||||||
- goto free_portal;
|
- if (rc)
|
||||||
|
- goto free_portal;
|
||||||
|
- }
|
||||||
-
|
-
|
||||||
- if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN)
|
- if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN)
|
||||||
- /* drop down to old style portal as config */
|
- /* drop down to old style portal as config */
|
||||||
@ -60,7 +66,7 @@ index ab3577878e86..21ff61ab2bd8 100644
|
|||||||
|
|
||||||
rc = stat(portal, &statb);
|
rc = stat(portal, &statb);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
@@ -2065,11 +2035,11 @@ static int idbm_rec_write(node_rec_t *rec)
|
@@ -2101,11 +2065,11 @@ static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
|
||||||
log_error("Could not convert %s: %s", portal,
|
log_error("Could not convert %s: %s", portal,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
rc = ISCSI_ERR_IDBM;
|
rc = ISCSI_ERR_IDBM;
|
||||||
@ -74,7 +80,7 @@ index ab3577878e86..21ff61ab2bd8 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
mkdir_portal:
|
mkdir_portal:
|
||||||
@@ -2080,24 +2050,96 @@ mkdir_portal:
|
@@ -2116,24 +2080,103 @@ mkdir_portal:
|
||||||
log_error("Could not make dir %s: %s",
|
log_error("Could not make dir %s: %s",
|
||||||
portal, strerror(errno));
|
portal, strerror(errno));
|
||||||
rc = ISCSI_ERR_IDBM;
|
rc = ISCSI_ERR_IDBM;
|
||||||
@ -87,7 +93,7 @@ index ab3577878e86..21ff61ab2bd8 100644
|
|||||||
rec->name, rec->conn[0].address, rec->conn[0].port, rec->tpgt,
|
rec->name, rec->conn[0].address, rec->conn[0].port, rec->tpgt,
|
||||||
rec->iface.name);
|
rec->iface.name);
|
||||||
-open_conf:
|
-open_conf:
|
||||||
+/* open_conf: */
|
+
|
||||||
f = fopen(portal, "w");
|
f = fopen(portal, "w");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
log_error("Could not open %s: %s", portal, strerror(errno));
|
log_error("Could not open %s: %s", portal, strerror(errno));
|
||||||
@ -131,7 +137,12 @@ index ab3577878e86..21ff61ab2bd8 100644
|
|||||||
+ return rc;
|
+ return rc;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static int idbm_rec_write(node_rec_t *rec)
|
+/*
|
||||||
|
+ * When the disable_lock param is true, the idbm_lock/idbm_unlock needs
|
||||||
|
+ * to be holt by the caller, this will avoid overwriting each other in
|
||||||
|
+ * case of updating(read-modify-write) the recs in parallel.
|
||||||
|
+ */
|
||||||
|
+static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
|
||||||
+{
|
+{
|
||||||
+ char *portal;
|
+ char *portal;
|
||||||
+ int rc = 0;
|
+ int rc = 0;
|
||||||
@ -162,9 +173,11 @@ index ab3577878e86..21ff61ab2bd8 100644
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ rc = idbm_lock();
|
+ if (!disable_lock) {
|
||||||
+ if (rc)
|
+ rc = idbm_lock();
|
||||||
+ goto free_portal;
|
+ if (rc)
|
||||||
|
+ goto free_portal;
|
||||||
|
+ }
|
||||||
+
|
+
|
||||||
+ if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN)
|
+ if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN)
|
||||||
+ /* old style portal as config */
|
+ /* old style portal as config */
|
||||||
@ -172,9 +185,9 @@ index ab3577878e86..21ff61ab2bd8 100644
|
|||||||
+ else
|
+ else
|
||||||
+ rc = idbm_rec_write_new(rec);
|
+ rc = idbm_rec_write_new(rec);
|
||||||
+
|
+
|
||||||
idbm_unlock();
|
if (!disable_lock)
|
||||||
|
idbm_unlock();
|
||||||
free_portal:
|
free_portal:
|
||||||
free(portal);
|
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 7ba6464018daac1b150335bb73d272761d2cbfe5 Mon Sep 17 00:00:00 2001
|
From 6051b9ef3cdf206630969940aba980f4088e2e14 Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Tue, 13 Aug 2013 12:39:07 -0700
|
Date: Tue, 13 Aug 2013 12:39:07 -0700
|
||||||
Subject: [PATCH 03/32] idbw_rec_write, pick tpgt from existing record
|
Subject: [PATCH] idbw_rec_write, pick tpgt from existing record
|
||||||
|
|
||||||
On a static add (-m node -o new) without a user specified tpgt, looks
|
On a static add (-m node -o new) without a user specified tpgt, looks
|
||||||
for existing new style records with tpgt before creating an old style
|
for existing new style records with tpgt before creating an old style
|
||||||
@ -12,7 +12,7 @@ updated new style record instead.
|
|||||||
1 file changed, 40 insertions(+)
|
1 file changed, 40 insertions(+)
|
||||||
|
|
||||||
diff --git a/usr/idbm.c b/usr/idbm.c
|
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||||
index 21ff61ab2bd8..cd705fa2b033 100644
|
index 2f5e309..a2332cc 100644
|
||||||
--- a/usr/idbm.c
|
--- a/usr/idbm.c
|
||||||
+++ b/usr/idbm.c
|
+++ b/usr/idbm.c
|
||||||
@@ -28,6 +28,7 @@
|
@@ -28,6 +28,7 @@
|
||||||
@ -22,8 +22,8 @@ index 21ff61ab2bd8..cd705fa2b033 100644
|
|||||||
+#include <glob.h>
|
+#include <glob.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
|
#include <inttypes.h>
|
||||||
@@ -163,6 +164,8 @@ static struct idbm *db;
|
@@ -164,6 +165,8 @@ static struct idbm *db;
|
||||||
_n++; \
|
_n++; \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ index 21ff61ab2bd8..cd705fa2b033 100644
|
|||||||
static void
|
static void
|
||||||
idbm_recinfo_discovery(discovery_rec_t *r, recinfo_t *ri)
|
idbm_recinfo_discovery(discovery_rec_t *r, recinfo_t *ri)
|
||||||
{
|
{
|
||||||
@@ -2077,12 +2080,49 @@ static int idbm_rec_write_old(node_rec_t *rec)
|
@@ -2107,12 +2110,49 @@ static int idbm_rec_write_old(node_rec_t *rec)
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char *portal;
|
char *portal;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
@ -83,5 +83,5 @@ index 21ff61ab2bd8..cd705fa2b033 100644
|
|||||||
rec->name, rec->conn[0].address, rec->conn[0].port);
|
rec->name, rec->conn[0].address, rec->conn[0].port);
|
||||||
|
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,93 +0,0 @@
|
|||||||
From 33076c9c1e975ea3225923d66ae24648c0c82a7f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Leech <cleech@redhat.com>
|
|
||||||
Date: Wed, 19 Dec 2012 15:07:36 -0800
|
|
||||||
Subject: [PATCH 04/32] update systemd service files, add iscsi.service for
|
|
||||||
starting sessions on boot
|
|
||||||
|
|
||||||
Signed-off-by: Chris Leech <cleech@redhat.com>
|
|
||||||
---
|
|
||||||
etc/systemd/iscsi.service | 19 +++++++++++++++++++
|
|
||||||
etc/systemd/iscsi_mark_root_nodes | 14 ++++++++++++++
|
|
||||||
etc/systemd/iscsid.service | 7 +++++--
|
|
||||||
etc/systemd/iscsid.socket | 2 +-
|
|
||||||
4 files changed, 39 insertions(+), 3 deletions(-)
|
|
||||||
create mode 100644 etc/systemd/iscsi.service
|
|
||||||
create mode 100755 etc/systemd/iscsi_mark_root_nodes
|
|
||||||
|
|
||||||
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..bbd52fd66890
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/etc/systemd/iscsi.service
|
|
||||||
@@ -0,0 +1,19 @@
|
|
||||||
+[Unit]
|
|
||||||
+Description=Login and scanning of iSCSI devices
|
|
||||||
+Documentation=man:iscsid(8) man:iscsiadm(8)
|
|
||||||
+DefaultDependencies=no
|
|
||||||
+Conflicts=shutdown.target
|
|
||||||
+After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
|
|
||||||
+Before=remote-fs-pre.target
|
|
||||||
+ConditionPathExists=/etc/iscsi/initiatorname.iscsi
|
|
||||||
+
|
|
||||||
+[Service]
|
|
||||||
+Type=oneshot
|
|
||||||
+RemainAfterExit=true
|
|
||||||
+ExecStart=/usr/libexec/iscsi_mark_root_nodes
|
|
||||||
+ExecStart=/sbin/iscsiadm -m node --loginall=automatic
|
|
||||||
+ExecStop=/bin/sync
|
|
||||||
+ExecStop=/sbin/iscsiadm -m node --logoutall=automatic
|
|
||||||
+
|
|
||||||
+[Install]
|
|
||||||
+WantedBy=sysinit.target
|
|
||||||
diff --git a/etc/systemd/iscsi_mark_root_nodes b/etc/systemd/iscsi_mark_root_nodes
|
|
||||||
new file mode 100755
|
|
||||||
index 000000000000..c68475c44de5
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/etc/systemd/iscsi_mark_root_nodes
|
|
||||||
@@ -0,0 +1,14 @@
|
|
||||||
+#!/bin/bash
|
|
||||||
+
|
|
||||||
+ISCSIADM=/sbin/iscsiadm
|
|
||||||
+SESSION_FILE=/run/initramfs/iscsi.sessions
|
|
||||||
+
|
|
||||||
+if [ ! -f $SESSION_FILE ] ; then
|
|
||||||
+ exit 0
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+while read t num i target; do
|
|
||||||
+ ip=${i%:*}
|
|
||||||
+ $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot
|
|
||||||
+done < $SESSION_FILE
|
|
||||||
+
|
|
||||||
diff --git a/etc/systemd/iscsid.service b/etc/systemd/iscsid.service
|
|
||||||
index 028e0b3f4e59..653dd085bbdd 100644
|
|
||||||
--- a/etc/systemd/iscsid.service
|
|
||||||
+++ b/etc/systemd/iscsid.service
|
|
||||||
@@ -1,7 +1,10 @@
|
|
||||||
[Unit]
|
|
||||||
Description=Open-iSCSI
|
|
||||||
-Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
|
|
||||||
-After=network.target NetworkManager-wait-online.service iscsiuio.service tgtd.service targetcli.service
|
|
||||||
+Documentation=man:iscsid(8) man:iscsiadm(8)
|
|
||||||
+DefaultDependencies=no
|
|
||||||
+Conflicts=shutdown.target
|
|
||||||
+After=network.target iscsiuio.service
|
|
||||||
+Before=remote-fs-pre.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=forking
|
|
||||||
diff --git a/etc/systemd/iscsid.socket b/etc/systemd/iscsid.socket
|
|
||||||
index 832451d7a0ce..58a8d1239996 100644
|
|
||||||
--- a/etc/systemd/iscsid.socket
|
|
||||||
+++ b/etc/systemd/iscsid.socket
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
[Unit]
|
|
||||||
Description=Open-iSCSI iscsid Socket
|
|
||||||
-Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
|
|
||||||
+Documentation=man:iscsid(8) man:iscsiadm(8)
|
|
||||||
|
|
||||||
[Socket]
|
|
||||||
ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE
|
|
||||||
--
|
|
||||||
2.14.4
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
From 5dd8fc7d27204a3461b33defed1e0bb4331c7663 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Leech <cleech@redhat.com>
|
|
||||||
Date: Mon, 19 Aug 2013 07:18:25 -0700
|
|
||||||
Subject: [PATCH 05/32] iscsi boot related service file updates
|
|
||||||
|
|
||||||
make sure iscsid gets started if there are any boot sessions running
|
|
||||||
add reload target to fix double session problem when restarting from NM
|
|
||||||
don't rely on session list passed from initrd, never got fully implemented
|
|
||||||
---
|
|
||||||
etc/systemd/iscsi-mark-root-nodes | 13 +++++++++++++
|
|
||||||
etc/systemd/iscsi.service | 3 ++-
|
|
||||||
etc/systemd/iscsi_mark_root_nodes | 14 --------------
|
|
||||||
3 files changed, 15 insertions(+), 15 deletions(-)
|
|
||||||
create mode 100644 etc/systemd/iscsi-mark-root-nodes
|
|
||||||
delete mode 100755 etc/systemd/iscsi_mark_root_nodes
|
|
||||||
|
|
||||||
diff --git a/etc/systemd/iscsi-mark-root-nodes b/etc/systemd/iscsi-mark-root-nodes
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..157be62b4041
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/etc/systemd/iscsi-mark-root-nodes
|
|
||||||
@@ -0,0 +1,13 @@
|
|
||||||
+#!/bin/bash
|
|
||||||
+
|
|
||||||
+ISCSIADM=/sbin/iscsiadm
|
|
||||||
+
|
|
||||||
+$ISCSIADM -m session >/dev/null 2>&1 || exit 0
|
|
||||||
+
|
|
||||||
+$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
|
|
||||||
+
|
|
||||||
+systemctl start iscsid.service
|
|
||||||
+
|
|
||||||
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
|
|
||||||
index bbd52fd66890..0309e2fc9892 100644
|
|
||||||
--- a/etc/systemd/iscsi.service
|
|
||||||
+++ b/etc/systemd/iscsi.service
|
|
||||||
@@ -10,10 +10,11 @@ ConditionPathExists=/etc/iscsi/initiatorname.iscsi
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
RemainAfterExit=true
|
|
||||||
-ExecStart=/usr/libexec/iscsi_mark_root_nodes
|
|
||||||
+ExecStart=/usr/libexec/iscsi-mark-root-nodes
|
|
||||||
ExecStart=/sbin/iscsiadm -m node --loginall=automatic
|
|
||||||
ExecStop=/bin/sync
|
|
||||||
ExecStop=/sbin/iscsiadm -m node --logoutall=automatic
|
|
||||||
+ExecReload=/sbin/iscsiadm -m node --loginall=automatic
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=sysinit.target
|
|
||||||
diff --git a/etc/systemd/iscsi_mark_root_nodes b/etc/systemd/iscsi_mark_root_nodes
|
|
||||||
deleted file mode 100755
|
|
||||||
index c68475c44de5..000000000000
|
|
||||||
--- a/etc/systemd/iscsi_mark_root_nodes
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,14 +0,0 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
-
|
|
||||||
-ISCSIADM=/sbin/iscsiadm
|
|
||||||
-SESSION_FILE=/run/initramfs/iscsi.sessions
|
|
||||||
-
|
|
||||||
-if [ ! -f $SESSION_FILE ] ; then
|
|
||||||
- exit 0
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
-while read t num i target; do
|
|
||||||
- ip=${i%:*}
|
|
||||||
- $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot
|
|
||||||
-done < $SESSION_FILE
|
|
||||||
-
|
|
||||||
--
|
|
||||||
2.14.4
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 2e6f564ebb3c85cb9a457d282b845374776a54ae Mon Sep 17 00:00:00 2001
|
From 6602f08bfcc2b2e75d1a58671cb160c96cf2d99b Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Mon, 19 Nov 2012 16:37:13 -0800
|
Date: Mon, 19 Nov 2012 16:37:13 -0800
|
||||||
Subject: [PATCH 06/32] update initscripts and docs
|
Subject: [PATCH] update initscripts and docs
|
||||||
|
|
||||||
---
|
---
|
||||||
README | 10 ++++------
|
README | 10 ++++------
|
||||||
@ -10,7 +10,7 @@ Subject: [PATCH 06/32] update initscripts and docs
|
|||||||
3 files changed, 18 insertions(+), 17 deletions(-)
|
3 files changed, 18 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
diff --git a/README b/README
|
diff --git a/README b/README
|
||||||
index 2499d9a7b638..c05814a2593b 100644
|
index 2499d9a..c05814a 100644
|
||||||
--- a/README
|
--- a/README
|
||||||
+++ b/README
|
+++ b/README
|
||||||
@@ -77,11 +77,6 @@ the cache sync command will fail.
|
@@ -77,11 +77,6 @@ the cache sync command will fail.
|
||||||
@ -45,7 +45,7 @@ index 2499d9a7b638..c05814a2593b 100644
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
diff --git a/etc/iscsid.conf b/etc/iscsid.conf
|
diff --git a/etc/iscsid.conf b/etc/iscsid.conf
|
||||||
index fee11482a09b..3539ac4cd578 100644
|
index 70985af..2f3a28c 100644
|
||||||
--- a/etc/iscsid.conf
|
--- a/etc/iscsid.conf
|
||||||
+++ b/etc/iscsid.conf
|
+++ b/etc/iscsid.conf
|
||||||
@@ -19,7 +19,7 @@
|
@@ -19,7 +19,7 @@
|
||||||
@ -105,10 +105,10 @@ index fee11482a09b..3539ac4cd578 100644
|
|||||||
# For multipath configurations, you may want more than one session to be
|
# For multipath configurations, you may want more than one session to be
|
||||||
# created on each iface record. If node.session.nr_sessions is greater
|
# created on each iface record. If node.session.nr_sessions is greater
|
||||||
diff --git a/usr/idbm.c b/usr/idbm.c
|
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||||
index cd705fa2b033..0aa3870a76fd 100644
|
index a2332cc..aed08f2 100644
|
||||||
--- a/usr/idbm.c
|
--- a/usr/idbm.c
|
||||||
+++ b/usr/idbm.c
|
+++ b/usr/idbm.c
|
||||||
@@ -518,9 +518,13 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri)
|
@@ -521,9 +521,13 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri)
|
||||||
IDBM_SHOW, "None", "CRC32C", "CRC32C,None",
|
IDBM_SHOW, "None", "CRC32C", "CRC32C,None",
|
||||||
"None,CRC32C", num, 1);
|
"None,CRC32C", num, 1);
|
||||||
sprintf(key, CONN_DATA_DIGEST, i);
|
sprintf(key, CONN_DATA_DIGEST, i);
|
||||||
@ -123,5 +123,5 @@ index cd705fa2b033..0aa3870a76fd 100644
|
|||||||
__recinfo_int_o2(key, ri, r, conn[i].iscsi.IFMarker, IDBM_SHOW,
|
__recinfo_int_o2(key, ri, r, conn[i].iscsi.IFMarker, IDBM_SHOW,
|
||||||
"No", "Yes", num, 1);
|
"No", "Yes", num, 1);
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,18 +1,19 @@
|
|||||||
From 478527833bdb8ebc9f4523c54e544b244bfe76f1 Mon Sep 17 00:00:00 2001
|
From 9cae86dd15bf78ee9d221f722f723062eb6ad3d8 Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Mon, 19 Nov 2012 16:38:45 -0800
|
Date: Mon, 19 Nov 2012 16:38:45 -0800
|
||||||
Subject: [PATCH 07/32] use var for config
|
Subject: [PATCH] use var for config
|
||||||
|
|
||||||
---
|
---
|
||||||
README | 33 ++++++++++++++++-----------------
|
README | 33 ++++++++++++++++-----------------
|
||||||
doc/iscsiadm.8 | 8 ++++----
|
doc/iscsiadm.8 | 8 ++++----
|
||||||
|
doc/iscsid.8 | 2 +-
|
||||||
usr/idbm.c | 6 +++---
|
usr/idbm.c | 6 +++---
|
||||||
usr/idbm.h | 13 +++++++------
|
usr/idbm.h | 13 +++++++------
|
||||||
usr/iface.h | 3 ++-
|
usr/iface.h | 3 ++-
|
||||||
5 files changed, 32 insertions(+), 31 deletions(-)
|
6 files changed, 33 insertions(+), 32 deletions(-)
|
||||||
|
|
||||||
diff --git a/README b/README
|
diff --git a/README b/README
|
||||||
index c05814a2593b..326c3b01e608 100644
|
index c05814a..326c3b0 100644
|
||||||
--- a/README
|
--- a/README
|
||||||
+++ b/README
|
+++ b/README
|
||||||
@@ -172,8 +172,7 @@ Usage: iscsid [OPTION]
|
@@ -172,8 +172,7 @@ Usage: iscsid [OPTION]
|
||||||
@ -146,10 +147,10 @@ index c05814a2593b..326c3b01e608 100644
|
|||||||
Note that for iSNS the poll_interval does not have to be set. If not set,
|
Note that for iSNS the poll_interval does not have to be set. If not set,
|
||||||
iscsid will only perform rediscovery when it gets a SCN from the server.
|
iscsid will only perform rediscovery when it gets a SCN from the server.
|
||||||
diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8
|
diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8
|
||||||
index a82805e28fb9..758a47c2d1fe 100644
|
index bf23dd2..9cfce16 100644
|
||||||
--- a/doc/iscsiadm.8
|
--- a/doc/iscsiadm.8
|
||||||
+++ b/doc/iscsiadm.8
|
+++ b/doc/iscsiadm.8
|
||||||
@@ -241,7 +241,7 @@ This option is only valid for ping submode.
|
@@ -228,7 +228,7 @@ This option is only valid for ping submode.
|
||||||
.TP
|
.TP
|
||||||
\fB\-I\fR, \fB\-\-interface=\fI[iface]\fR
|
\fB\-I\fR, \fB\-\-interface=\fI[iface]\fR
|
||||||
The interface argument specifies the iSCSI interface to use for the operation.
|
The interface argument specifies the iSCSI interface to use for the operation.
|
||||||
@ -158,16 +159,16 @@ index a82805e28fb9..758a47c2d1fe 100644
|
|||||||
iSCSI (qla4xxx) the iface config must have the hardware address
|
iSCSI (qla4xxx) the iface config must have the hardware address
|
||||||
(iface.hwaddress = port's MAC address)
|
(iface.hwaddress = port's MAC address)
|
||||||
and the driver/transport_name (iface.transport_name). The iface's name is
|
and the driver/transport_name (iface.transport_name). The iface's name is
|
||||||
@@ -318,7 +318,7 @@ If no other options are specified: for \fIdiscovery\fR, \fIdiscoverydb\fR and
|
@@ -301,7 +301,7 @@ If no other options are specified: for \fIdiscovery\fR, \fIdiscoverydb\fR and
|
||||||
\fInode\fR, all of their respective records are displayed; for \fIsession\fR,
|
\fInode\fR, all of their respective records are displayed; for \fIsession\fR,
|
||||||
all active sessions and connections are displayed; for \fIfw\fR, all boot
|
all active sessions and connections are displayed; for \fIfw\fR, all boot
|
||||||
firmware values are displayed; for \fIhost\fR, all iSCSI hosts are displayed;
|
firmware values are displayed; for \fIhost\fR, all iSCSI hosts are displayed;
|
||||||
-and for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed.
|
-and for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed.
|
||||||
+and for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
|
+and for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-n\fR, \fB\-\-name=\fIname\fR
|
\fB\-n\fR, \fB\-\-name=\fIname\fR
|
||||||
@@ -703,10 +703,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup.
|
In node mode, specify a field \fIname\fR in a record. In flashnode submode
|
||||||
|
@@ -640,10 +640,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup.
|
||||||
The file containing the iSCSI InitiatorName and InitiatorAlias read by
|
The file containing the iSCSI InitiatorName and InitiatorAlias read by
|
||||||
\fBiscsid\fR and \fBiscsiadm\fR on startup.
|
\fBiscsid\fR and \fBiscsiadm\fR on startup.
|
||||||
.TP
|
.TP
|
||||||
@ -178,13 +179,26 @@ index a82805e28fb9..758a47c2d1fe 100644
|
|||||||
-/etc/iscsi/send_targets
|
-/etc/iscsi/send_targets
|
||||||
+/var/lib/iscsi/send_targets
|
+/var/lib/iscsi/send_targets
|
||||||
This directory contains the portals.
|
This directory contains the portals.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.BR iscsid (8)
|
||||||
|
diff --git a/doc/iscsid.8 b/doc/iscsid.8
|
||||||
|
index 6f9218f..0da0551 100644
|
||||||
|
--- a/doc/iscsid.8
|
||||||
|
+++ b/doc/iscsid.8
|
||||||
|
@@ -65,7 +65,7 @@ and
|
||||||
|
.B iscsiadm
|
||||||
|
on startup.
|
||||||
|
.TP
|
||||||
|
-/etc/iscsi/nodes
|
||||||
|
+/var/lib/iscsi/nodes
|
||||||
|
Open-iSCSI persistent configuration database
|
||||||
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
diff --git a/usr/idbm.c b/usr/idbm.c
|
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||||
index 0aa3870a76fd..ec33ce905dc1 100644
|
index aed08f2..15802c3 100644
|
||||||
--- a/usr/idbm.c
|
--- a/usr/idbm.c
|
||||||
+++ b/usr/idbm.c
|
+++ b/usr/idbm.c
|
||||||
@@ -2926,9 +2926,9 @@ free_info:
|
@@ -2968,9 +2968,9 @@ free_info:
|
||||||
int idbm_init(idbm_get_config_file_fn *fn)
|
int idbm_init(idbm_get_config_file_fn *fn)
|
||||||
{
|
{
|
||||||
/* make sure root db dir is there */
|
/* make sure root db dir is there */
|
||||||
@ -198,10 +212,10 @@ index 0aa3870a76fd..ec33ce905dc1 100644
|
|||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
diff --git a/usr/idbm.h b/usr/idbm.h
|
diff --git a/usr/idbm.h b/usr/idbm.h
|
||||||
index b83c0bb1cca8..2b05d7871be9 100644
|
index 18c5025..6bdfd60 100644
|
||||||
--- a/usr/idbm.h
|
--- a/usr/idbm.h
|
||||||
+++ b/usr/idbm.h
|
+++ b/usr/idbm.h
|
||||||
@@ -29,12 +29,13 @@
|
@@ -30,12 +30,13 @@
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "flashnode.h"
|
#include "flashnode.h"
|
||||||
|
|
||||||
@ -222,7 +236,7 @@ index b83c0bb1cca8..2b05d7871be9 100644
|
|||||||
#define ISNS_CONFIG_NAME "isns_config"
|
#define ISNS_CONFIG_NAME "isns_config"
|
||||||
|
|
||||||
diff --git a/usr/iface.h b/usr/iface.h
|
diff --git a/usr/iface.h b/usr/iface.h
|
||||||
index 6c06f7f7d450..c8b9de9a7c3a 100644
|
index 6c06f7f..c8b9de9 100644
|
||||||
--- a/usr/iface.h
|
--- a/usr/iface.h
|
||||||
+++ b/usr/iface.h
|
+++ b/usr/iface.h
|
||||||
@@ -21,8 +21,9 @@
|
@@ -21,8 +21,9 @@
|
||||||
@ -237,5 +251,5 @@ index 6c06f7f7d450..c8b9de9a7c3a 100644
|
|||||||
struct iface_rec;
|
struct iface_rec;
|
||||||
struct list_head;
|
struct list_head;
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From ea35362504329e7fe86f4af17a88bed009c5069c Mon Sep 17 00:00:00 2001
|
From 1ddee25396962a6bd966b98311881ed6d4cba87c Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Mon, 19 Nov 2012 16:40:04 -0800
|
Date: Mon, 19 Nov 2012 16:40:04 -0800
|
||||||
Subject: [PATCH 08/32] use red hat for name
|
Subject: [PATCH] use red hat for name
|
||||||
|
|
||||||
---
|
---
|
||||||
doc/iscsi-iname.8 | 2 +-
|
doc/iscsi-iname.8 | 2 +-
|
||||||
@ -9,31 +9,31 @@ Subject: [PATCH 08/32] use red hat for name
|
|||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/doc/iscsi-iname.8 b/doc/iscsi-iname.8
|
diff --git a/doc/iscsi-iname.8 b/doc/iscsi-iname.8
|
||||||
index a55d666d1af3..dd77ed9f3165 100644
|
index 6a413f6..dd77ed9 100644
|
||||||
--- a/doc/iscsi-iname.8
|
--- a/doc/iscsi-iname.8
|
||||||
+++ b/doc/iscsi-iname.8
|
+++ b/doc/iscsi-iname.8
|
||||||
@@ -14,7 +14,7 @@ generates a unique iSCSI node name on every invocation.
|
@@ -14,7 +14,7 @@ generates a unique iSCSI node name on every invocation.
|
||||||
Display help
|
Display help
|
||||||
.TP
|
.TP
|
||||||
.BI [-p=]\fIprefix\fP
|
.BI [-p=]\fIprefix\fP
|
||||||
-Use the prefix passed in instead of the default "iqn.2005-03.org.open-iscsi"
|
-Use the prefix passed in instead of the default "iqn.2016-04.com.open-iscsi"
|
||||||
+Use the prefix passed in instead of the default "iqn.1994-05.com.redhat"
|
+Use the prefix passed in instead of the default "iqn.1994-05.com.redhat"
|
||||||
|
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
Open-iSCSI project <http://www.open-iscsi.com/>
|
Open-iSCSI project <http://www.open-iscsi.com/>
|
||||||
diff --git a/utils/iscsi-iname.c b/utils/iscsi-iname.c
|
diff --git a/utils/iscsi-iname.c b/utils/iscsi-iname.c
|
||||||
index 6347edc46293..cb2f6c8b8651 100644
|
index da850dc..29aa4ad 100644
|
||||||
--- a/utils/iscsi-iname.c
|
--- a/utils/iscsi-iname.c
|
||||||
+++ b/utils/iscsi-iname.c
|
+++ b/utils/iscsi-iname.c
|
||||||
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
|
@@ -80,7 +80,7 @@ main(int argc, char *argv[])
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
- prefix = "iqn.2005-03.org.open-iscsi";
|
- prefix = "iqn.2016-04.com.open-iscsi";
|
||||||
+ prefix = "iqn.1994-05.com.redhat";
|
+ prefix = "iqn.1994-05.com.redhat";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* try to feed some entropy from the pool to MD5 in order to get
|
/* try to feed some entropy from the pool to MD5 in order to get
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,32 +1,32 @@
|
|||||||
From ef17e73261b386a21e231aa702c65e58ee8f65cc Mon Sep 17 00:00:00 2001
|
From af721a438031fa9f79db5de3b018c4b532ac2e0c Mon Sep 17 00:00:00 2001
|
||||||
From: rpm-build <rpm-build>
|
From: rpm-build <rpm-build>
|
||||||
Date: Mon, 26 Jan 2015 12:57:11 -0800
|
Date: Mon, 26 Jan 2015 12:57:11 -0800
|
||||||
Subject: [PATCH 09/32] libiscsi
|
Subject: [PATCH] libiscsi
|
||||||
|
|
||||||
---
|
---
|
||||||
Makefile | 2 +
|
Makefile | 2 +
|
||||||
libiscsi/Makefile | 61 ++
|
libiscsi/Makefile | 65 +
|
||||||
libiscsi/libiscsi.c | 617 +++++++++++
|
libiscsi/libiscsi.c | 617 ++++++++
|
||||||
libiscsi/libiscsi.doxy | 1473 +++++++++++++++++++++++++++
|
libiscsi/libiscsi.doxy | 1473 +++++++++++++++++++
|
||||||
libiscsi/libiscsi.h | 344 +++++++
|
libiscsi/libiscsi.h | 344 +++++
|
||||||
libiscsi/no_date_footer.html | 6 +
|
libiscsi/no_date_footer.html | 6 +
|
||||||
libiscsi/pylibiscsi.c | 709 +++++++++++++
|
libiscsi/pylibiscsi.c | 709 +++++++++
|
||||||
libiscsi/setup.py | 9 +
|
libiscsi/setup.py | 9 +
|
||||||
libiscsi/tests/test_discovery_firmware.c | 53 +
|
libiscsi/tests/test_discovery_firmware.c | 53 +
|
||||||
libiscsi/tests/test_discovery_sendtargets.c | 60 ++
|
libiscsi/tests/test_discovery_sendtargets.c | 60 +
|
||||||
libiscsi/tests/test_get_auth.c | 70 ++
|
libiscsi/tests/test_get_auth.c | 70 +
|
||||||
libiscsi/tests/test_get_initiator_name.c | 38 +
|
libiscsi/tests/test_get_initiator_name.c | 38 +
|
||||||
libiscsi/tests/test_get_network_config.c | 45 +
|
libiscsi/tests/test_get_network_config.c | 45 +
|
||||||
libiscsi/tests/test_login.c | 52 +
|
libiscsi/tests/test_login.c | 52 +
|
||||||
libiscsi/tests/test_logout.c | 51 +
|
libiscsi/tests/test_logout.c | 51 +
|
||||||
libiscsi/tests/test_params.c | 103 ++
|
libiscsi/tests/test_params.c | 103 ++
|
||||||
libiscsi/tests/test_set_auth.c | 58 ++
|
libiscsi/tests/test_set_auth.c | 58 +
|
||||||
usr/Makefile | 2 +-
|
usr/Makefile | 2 +-
|
||||||
usr/discovery.c | 5 +
|
usr/discovery.c | 5 +
|
||||||
usr/idbm.c | 6 +-
|
usr/idbm.c | 6 +-
|
||||||
usr/idbm.h | 3 +
|
usr/idbm.h | 3 +
|
||||||
usr/iscsi_ipc.h | 2 +
|
usr/iscsi_ipc.h | 2 +
|
||||||
22 files changed, 3765 insertions(+), 4 deletions(-)
|
22 files changed, 3769 insertions(+), 4 deletions(-)
|
||||||
create mode 100644 libiscsi/Makefile
|
create mode 100644 libiscsi/Makefile
|
||||||
create mode 100644 libiscsi/libiscsi.c
|
create mode 100644 libiscsi/libiscsi.c
|
||||||
create mode 100644 libiscsi/libiscsi.doxy
|
create mode 100644 libiscsi/libiscsi.doxy
|
||||||
@ -45,10 +45,10 @@ Subject: [PATCH 09/32] libiscsi
|
|||||||
create mode 100644 libiscsi/tests/test_set_auth.c
|
create mode 100644 libiscsi/tests/test_set_auth.c
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
index c533e9d0d016..80afe86d6558 100644
|
index 7b445a5..4ab091f 100644
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -52,6 +52,7 @@ user: iscsiuio/Makefile
|
@@ -65,6 +65,7 @@ user: iscsiuio/Makefile
|
||||||
$(MAKE) -C usr
|
$(MAKE) -C usr
|
||||||
$(MAKE) -C utils
|
$(MAKE) -C utils
|
||||||
$(MAKE) -C iscsiuio
|
$(MAKE) -C iscsiuio
|
||||||
@ -56,7 +56,7 @@ index c533e9d0d016..80afe86d6558 100644
|
|||||||
@echo
|
@echo
|
||||||
@echo "Compilation complete Output file"
|
@echo "Compilation complete Output file"
|
||||||
@echo "----------------------------------- ----------------"
|
@echo "----------------------------------- ----------------"
|
||||||
@@ -72,6 +73,7 @@ iscsiuio/configure iscsiuio/Makefile.in: iscsiuio/configure.ac iscsiuio/Makefile
|
@@ -85,6 +86,7 @@ iscsiuio/configure iscsiuio/Makefile.in: iscsiuio/configure.ac iscsiuio/Makefile
|
||||||
force: ;
|
force: ;
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@ -66,7 +66,7 @@ index c533e9d0d016..80afe86d6558 100644
|
|||||||
$(MAKE) -C utils clean
|
$(MAKE) -C utils clean
|
||||||
diff --git a/libiscsi/Makefile b/libiscsi/Makefile
|
diff --git a/libiscsi/Makefile b/libiscsi/Makefile
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..317a7ec4db30
|
index 0000000..53f9746
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/Makefile
|
+++ b/libiscsi/Makefile
|
||||||
@@ -0,0 +1,65 @@
|
@@ -0,0 +1,65 @@
|
||||||
@ -137,7 +137,7 @@ index 000000000000..317a7ec4db30
|
|||||||
+-include .depend ../usr/.depend
|
+-include .depend ../usr/.depend
|
||||||
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..064e4b570d0b
|
index 0000000..064e4b5
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/libiscsi.c
|
+++ b/libiscsi/libiscsi.c
|
||||||
@@ -0,0 +1,617 @@
|
@@ -0,0 +1,617 @@
|
||||||
@ -760,7 +760,7 @@ index 000000000000..064e4b570d0b
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/libiscsi.doxy b/libiscsi/libiscsi.doxy
|
diff --git a/libiscsi/libiscsi.doxy b/libiscsi/libiscsi.doxy
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..7a5ff7f7cd5a
|
index 0000000..7a5ff7f
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/libiscsi.doxy
|
+++ b/libiscsi/libiscsi.doxy
|
||||||
@@ -0,0 +1,1473 @@
|
@@ -0,0 +1,1473 @@
|
||||||
@ -2239,7 +2239,7 @@ index 000000000000..7a5ff7f7cd5a
|
|||||||
+SEARCHENGINE = NO
|
+SEARCHENGINE = NO
|
||||||
diff --git a/libiscsi/libiscsi.h b/libiscsi/libiscsi.h
|
diff --git a/libiscsi/libiscsi.h b/libiscsi/libiscsi.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..756590e14d8b
|
index 0000000..756590e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/libiscsi.h
|
+++ b/libiscsi/libiscsi.h
|
||||||
@@ -0,0 +1,344 @@
|
@@ -0,0 +1,344 @@
|
||||||
@ -2589,7 +2589,7 @@ index 000000000000..756590e14d8b
|
|||||||
+#endif
|
+#endif
|
||||||
diff --git a/libiscsi/no_date_footer.html b/libiscsi/no_date_footer.html
|
diff --git a/libiscsi/no_date_footer.html b/libiscsi/no_date_footer.html
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..1e0c6c4ab49e
|
index 0000000..1e0c6c4
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/no_date_footer.html
|
+++ b/libiscsi/no_date_footer.html
|
||||||
@@ -0,0 +1,6 @@
|
@@ -0,0 +1,6 @@
|
||||||
@ -2601,7 +2601,7 @@ index 000000000000..1e0c6c4ab49e
|
|||||||
+</html>
|
+</html>
|
||||||
diff --git a/libiscsi/pylibiscsi.c b/libiscsi/pylibiscsi.c
|
diff --git a/libiscsi/pylibiscsi.c b/libiscsi/pylibiscsi.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..88008538f04f
|
index 0000000..8800853
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/pylibiscsi.c
|
+++ b/libiscsi/pylibiscsi.c
|
||||||
@@ -0,0 +1,709 @@
|
@@ -0,0 +1,709 @@
|
||||||
@ -3316,7 +3316,7 @@ index 000000000000..88008538f04f
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/setup.py b/libiscsi/setup.py
|
diff --git a/libiscsi/setup.py b/libiscsi/setup.py
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..caa4e66ca906
|
index 0000000..caa4e66
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/setup.py
|
+++ b/libiscsi/setup.py
|
||||||
@@ -0,0 +1,9 @@
|
@@ -0,0 +1,9 @@
|
||||||
@ -3331,7 +3331,7 @@ index 000000000000..caa4e66ca906
|
|||||||
+ description = 'libiscsi python bindings', ext_modules = [module1])
|
+ description = 'libiscsi python bindings', ext_modules = [module1])
|
||||||
diff --git a/libiscsi/tests/test_discovery_firmware.c b/libiscsi/tests/test_discovery_firmware.c
|
diff --git a/libiscsi/tests/test_discovery_firmware.c b/libiscsi/tests/test_discovery_firmware.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..76e852a37019
|
index 0000000..76e852a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/tests/test_discovery_firmware.c
|
+++ b/libiscsi/tests/test_discovery_firmware.c
|
||||||
@@ -0,0 +1,53 @@
|
@@ -0,0 +1,53 @@
|
||||||
@ -3390,7 +3390,7 @@ index 000000000000..76e852a37019
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/tests/test_discovery_sendtargets.c b/libiscsi/tests/test_discovery_sendtargets.c
|
diff --git a/libiscsi/tests/test_discovery_sendtargets.c b/libiscsi/tests/test_discovery_sendtargets.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..1a3c12ef684b
|
index 0000000..1a3c12e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/tests/test_discovery_sendtargets.c
|
+++ b/libiscsi/tests/test_discovery_sendtargets.c
|
||||||
@@ -0,0 +1,60 @@
|
@@ -0,0 +1,60 @@
|
||||||
@ -3456,7 +3456,7 @@ index 000000000000..1a3c12ef684b
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/tests/test_get_auth.c b/libiscsi/tests/test_get_auth.c
|
diff --git a/libiscsi/tests/test_get_auth.c b/libiscsi/tests/test_get_auth.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..5e234dadd0de
|
index 0000000..5e234da
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/tests/test_get_auth.c
|
+++ b/libiscsi/tests/test_get_auth.c
|
||||||
@@ -0,0 +1,70 @@
|
@@ -0,0 +1,70 @@
|
||||||
@ -3532,7 +3532,7 @@ index 000000000000..5e234dadd0de
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/tests/test_get_initiator_name.c b/libiscsi/tests/test_get_initiator_name.c
|
diff --git a/libiscsi/tests/test_get_initiator_name.c b/libiscsi/tests/test_get_initiator_name.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..997c053e5bf6
|
index 0000000..997c053
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/tests/test_get_initiator_name.c
|
+++ b/libiscsi/tests/test_get_initiator_name.c
|
||||||
@@ -0,0 +1,38 @@
|
@@ -0,0 +1,38 @@
|
||||||
@ -3576,7 +3576,7 @@ index 000000000000..997c053e5bf6
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/tests/test_get_network_config.c b/libiscsi/tests/test_get_network_config.c
|
diff --git a/libiscsi/tests/test_get_network_config.c b/libiscsi/tests/test_get_network_config.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..2dedd6102858
|
index 0000000..2dedd61
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/tests/test_get_network_config.c
|
+++ b/libiscsi/tests/test_get_network_config.c
|
||||||
@@ -0,0 +1,45 @@
|
@@ -0,0 +1,45 @@
|
||||||
@ -3627,7 +3627,7 @@ index 000000000000..2dedd6102858
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/tests/test_login.c b/libiscsi/tests/test_login.c
|
diff --git a/libiscsi/tests/test_login.c b/libiscsi/tests/test_login.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..3eb70d63e111
|
index 0000000..3eb70d6
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/tests/test_login.c
|
+++ b/libiscsi/tests/test_login.c
|
||||||
@@ -0,0 +1,52 @@
|
@@ -0,0 +1,52 @@
|
||||||
@ -3685,7 +3685,7 @@ index 000000000000..3eb70d63e111
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/tests/test_logout.c b/libiscsi/tests/test_logout.c
|
diff --git a/libiscsi/tests/test_logout.c b/libiscsi/tests/test_logout.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..b734dca58773
|
index 0000000..b734dca
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/tests/test_logout.c
|
+++ b/libiscsi/tests/test_logout.c
|
||||||
@@ -0,0 +1,51 @@
|
@@ -0,0 +1,51 @@
|
||||||
@ -3742,7 +3742,7 @@ index 000000000000..b734dca58773
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/tests/test_params.c b/libiscsi/tests/test_params.c
|
diff --git a/libiscsi/tests/test_params.c b/libiscsi/tests/test_params.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..d3223be1e894
|
index 0000000..d3223be
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/tests/test_params.c
|
+++ b/libiscsi/tests/test_params.c
|
||||||
@@ -0,0 +1,103 @@
|
@@ -0,0 +1,103 @@
|
||||||
@ -3851,7 +3851,7 @@ index 000000000000..d3223be1e894
|
|||||||
+}
|
+}
|
||||||
diff --git a/libiscsi/tests/test_set_auth.c b/libiscsi/tests/test_set_auth.c
|
diff --git a/libiscsi/tests/test_set_auth.c b/libiscsi/tests/test_set_auth.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..a21f88806ab9
|
index 0000000..a21f888
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/libiscsi/tests/test_set_auth.c
|
+++ b/libiscsi/tests/test_set_auth.c
|
||||||
@@ -0,0 +1,58 @@
|
@@ -0,0 +1,58 @@
|
||||||
@ -3914,20 +3914,20 @@ index 000000000000..a21f88806ab9
|
|||||||
+ return rc;
|
+ return rc;
|
||||||
+}
|
+}
|
||||||
diff --git a/usr/Makefile b/usr/Makefile
|
diff --git a/usr/Makefile b/usr/Makefile
|
||||||
index f9445adabbb0..8751d0d05468 100644
|
index 3bb0cb4..8ae6e07 100644
|
||||||
--- a/usr/Makefile
|
--- a/usr/Makefile
|
||||||
+++ b/usr/Makefile
|
+++ b/usr/Makefile
|
||||||
@@ -35,7 +35,7 @@ endif
|
@@ -37,7 +37,7 @@ PKG_CONFIG = /usr/bin/pkg-config
|
||||||
CFLAGS ?= -O2 -g
|
CFLAGS ?= -O2 -g
|
||||||
WARNFLAGS ?= -Wall -Wstrict-prototypes
|
WARNFLAGS ?= -Wall -Wstrict-prototypes
|
||||||
CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \
|
CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \
|
||||||
- -I$(TOPDIR)/libopeniscsiusr
|
- -I$(TOPDIR)/libopeniscsiusr
|
||||||
+ -I$(TOPDIR)/libopeniscsiusr -DISNS_ENABLE
|
+ -I$(TOPDIR)/libopeniscsiusr -DISNS_ENABLE
|
||||||
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod)
|
||||||
ISCSI_LIB = -L$(TOPDIR)/libopeniscsiusr -lopeniscsiusr
|
ISCSI_LIB = -L$(TOPDIR)/libopeniscsiusr -lopeniscsiusr
|
||||||
PROGRAMS = iscsid iscsiadm iscsistart
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod)
|
||||||
|
|
||||||
diff --git a/usr/discovery.c b/usr/discovery.c
|
diff --git a/usr/discovery.c b/usr/discovery.c
|
||||||
index 8001af6fe452..02b77f02b644 100644
|
index 199c160..d17a250 100644
|
||||||
--- a/usr/discovery.c
|
--- a/usr/discovery.c
|
||||||
+++ b/usr/discovery.c
|
+++ b/usr/discovery.c
|
||||||
@@ -36,6 +36,7 @@
|
@@ -36,6 +36,7 @@
|
||||||
@ -3968,38 +3968,38 @@ index 8001af6fe452..02b77f02b644 100644
|
|||||||
int discovery_fw(void *data, struct iface_rec *iface,
|
int discovery_fw(void *data, struct iface_rec *iface,
|
||||||
struct list_head *rec_list)
|
struct list_head *rec_list)
|
||||||
diff --git a/usr/idbm.c b/usr/idbm.c
|
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||||
index ec33ce905dc1..6b651765f19e 100644
|
index 15802c3..3184c77 100644
|
||||||
--- a/usr/idbm.c
|
--- a/usr/idbm.c
|
||||||
+++ b/usr/idbm.c
|
+++ b/usr/idbm.c
|
||||||
@@ -1709,9 +1709,9 @@ int idbm_print_all_discovery(int info_level)
|
@@ -1725,9 +1725,9 @@ int idbm_print_all_discovery(int info_level)
|
||||||
* fn should return -1 if it skipped the rec, an ISCSI_ERR error code if
|
* fn should return -1 if it skipped the rec, an ISCSI_ERR error code if
|
||||||
* the operation failed or 0 if fn was run successfully.
|
* the operation failed or 0 if fn was run successfully.
|
||||||
*/
|
*/
|
||||||
-static int idbm_for_each_iface(int *found, void *data,
|
-static int idbm_for_each_iface(int *found, void *data, idbm_iface_op_fn *fn,
|
||||||
- idbm_iface_op_fn *fn,
|
- char *targetname, int tpgt, char *ip, int port,
|
||||||
- char *targetname, int tpgt, char *ip, int port)
|
- bool ruw_lock)
|
||||||
+int idbm_for_each_iface(int *found, void *data,
|
+int idbm_for_each_iface(int *found, void *data, idbm_iface_op_fn *fn,
|
||||||
+ idbm_iface_op_fn *fn,
|
+ char *targetname, int tpgt, char *ip, int port,
|
||||||
+ char *targetname, int tpgt, char *ip, int port)
|
+ bool ruw_lock)
|
||||||
{
|
{
|
||||||
DIR *iface_dirfd;
|
DIR *iface_dirfd;
|
||||||
struct dirent *iface_dent;
|
struct dirent *iface_dent;
|
||||||
diff --git a/usr/idbm.h b/usr/idbm.h
|
diff --git a/usr/idbm.h b/usr/idbm.h
|
||||||
index 2b05d7871be9..b9b1810f78f2 100644
|
index 6bdfd60..c6982e4 100644
|
||||||
--- a/usr/idbm.h
|
--- a/usr/idbm.h
|
||||||
+++ b/usr/idbm.h
|
+++ b/usr/idbm.h
|
||||||
@@ -102,6 +102,9 @@ struct rec_op_data {
|
@@ -103,6 +103,9 @@ struct rec_op_data {
|
||||||
node_rec_t *match_rec;
|
node_rec_t *match_rec;
|
||||||
idbm_iface_op_fn *fn;
|
idbm_iface_op_fn *fn;
|
||||||
};
|
};
|
||||||
+extern int idbm_for_each_iface(int *found, void *data,
|
+extern int idbm_for_each_iface(int *found, void *data, idbm_iface_op_fn *fn,
|
||||||
+ idbm_iface_op_fn *fn,
|
+ char *targetname, int tpgt, char *ip, int port,
|
||||||
+ char *targetname, int tpgt, char *ip, int port);
|
+ bool ruw_lock);
|
||||||
extern int idbm_for_each_portal(int *found, void *data,
|
extern int idbm_for_each_portal(int *found, void *data, idbm_portal_op_fn *fn,
|
||||||
idbm_portal_op_fn *fn, char *targetname);
|
char *targetname, bool ruw_lock);
|
||||||
extern int idbm_for_each_node(int *found, void *data,
|
extern int idbm_for_each_node(int *found, void *data,
|
||||||
diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h
|
diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h
|
||||||
index 47857dd9b0ca..fb8e96552551 100644
|
index 47857dd..fb8e965 100644
|
||||||
--- a/usr/iscsi_ipc.h
|
--- a/usr/iscsi_ipc.h
|
||||||
+++ b/usr/iscsi_ipc.h
|
+++ b/usr/iscsi_ipc.h
|
||||||
@@ -162,4 +162,6 @@ struct iscsi_ipc {
|
@@ -162,4 +162,6 @@ struct iscsi_ipc {
|
||||||
@ -4010,5 +4010,5 @@ index 47857dd9b0ca..fb8e96552551 100644
|
|||||||
+
|
+
|
||||||
#endif /* ISCSI_IPC_H */
|
#endif /* ISCSI_IPC_H */
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From bd26fd7e7f91e5c4c6903c3d7e1a375a14261a48 Mon Sep 17 00:00:00 2001
|
From 3df19ccba0af40da8cdb15c41e1bcd08ce25fbd9 Mon Sep 17 00:00:00 2001
|
||||||
From: Jiri Konecny <jkonecny@redhat.com>
|
From: Jiri Konecny <jkonecny@redhat.com>
|
||||||
Date: Mon, 11 May 2015 13:16:26 +0200
|
Date: Mon, 11 May 2015 13:16:26 +0200
|
||||||
Subject: [PATCH 18/32] Add macros to release GIL lock
|
Subject: [PATCH] Add macros to release GIL lock
|
||||||
|
|
||||||
Other threads are blocked when GIL is not released before the time consuming
|
Other threads are blocked when GIL is not released before the time consuming
|
||||||
functions.
|
functions.
|
||||||
@ -10,7 +10,7 @@ functions.
|
|||||||
1 file changed, 13 insertions(+), 3 deletions(-)
|
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/libiscsi/pylibiscsi.c b/libiscsi/pylibiscsi.c
|
diff --git a/libiscsi/pylibiscsi.c b/libiscsi/pylibiscsi.c
|
||||||
index 88008538f04f..40b59553a28e 100644
|
index 8800853..40b5955 100644
|
||||||
--- a/libiscsi/pylibiscsi.c
|
--- a/libiscsi/pylibiscsi.c
|
||||||
+++ b/libiscsi/pylibiscsi.c
|
+++ b/libiscsi/pylibiscsi.c
|
||||||
@@ -364,8 +364,13 @@ static PyObject *PyIscsiNode_str(PyObject *self)
|
@@ -364,8 +364,13 @@ static PyObject *PyIscsiNode_str(PyObject *self)
|
||||||
@ -52,5 +52,5 @@ index 88008538f04f..40b59553a28e 100644
|
|||||||
libiscsi_get_error_string(context));
|
libiscsi_get_error_string(context));
|
||||||
return NULL;
|
return NULL;
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,17 +1,17 @@
|
|||||||
From 7671cd56d36a76e954318cbdce3f08fc40aa3fe4 Mon Sep 17 00:00:00 2001
|
From bca0b3a085b7a169aa40d81ed7997c73fde8b4d3 Mon Sep 17 00:00:00 2001
|
||||||
From: Peter Hatina <phatina@redhat.com>
|
From: Peter Hatina <phatina@redhat.com>
|
||||||
Date: Mon, 5 Oct 2015 16:50:36 -0700
|
Date: Mon, 5 Oct 2015 16:50:36 -0700
|
||||||
Subject: [PATCH 19/32] libiscsi introduce sessions API
|
Subject: [PATCH] libiscsi introduce sessions API
|
||||||
|
|
||||||
---
|
---
|
||||||
libiscsi/libiscsi.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
libiscsi/libiscsi.c | 125 ++++++++++++++++++++++++++++++++++++++++++++
|
||||||
libiscsi/libiscsi.h | 56 +++++++++++++++++++++++
|
libiscsi/libiscsi.h | 56 ++++++++++++++++++++
|
||||||
usr/iscsi_sysfs.c | 6 +++
|
usr/iscsi_sysfs.c | 6 +++
|
||||||
usr/iscsi_sysfs.h | 2 +
|
usr/iscsi_sysfs.h | 2 +
|
||||||
4 files changed, 189 insertions(+)
|
4 files changed, 189 insertions(+)
|
||||||
|
|
||||||
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
||||||
index 064e4b570d0b..755c18ca8e3b 100644
|
index 064e4b5..755c18c 100644
|
||||||
--- a/libiscsi/libiscsi.c
|
--- a/libiscsi/libiscsi.c
|
||||||
+++ b/libiscsi/libiscsi.c
|
+++ b/libiscsi/libiscsi.c
|
||||||
@@ -3,6 +3,7 @@
|
@@ -3,6 +3,7 @@
|
||||||
@ -154,7 +154,7 @@ index 064e4b570d0b..755c18ca8e3b 100644
|
|||||||
const struct libiscsi_node *node,
|
const struct libiscsi_node *node,
|
||||||
const char *parameter, const char *value)
|
const char *parameter, const char *value)
|
||||||
diff --git a/libiscsi/libiscsi.h b/libiscsi/libiscsi.h
|
diff --git a/libiscsi/libiscsi.h b/libiscsi/libiscsi.h
|
||||||
index 756590e14d8b..a9891f48b7d6 100644
|
index 756590e..a9891f4 100644
|
||||||
--- a/libiscsi/libiscsi.h
|
--- a/libiscsi/libiscsi.h
|
||||||
+++ b/libiscsi/libiscsi.h
|
+++ b/libiscsi/libiscsi.h
|
||||||
@@ -3,6 +3,7 @@
|
@@ -3,6 +3,7 @@
|
||||||
@ -242,7 +242,7 @@ index 756590e14d8b..a9891f48b7d6 100644
|
|||||||
*
|
*
|
||||||
* Set the given nodes iSCSI parameter named by \e parameter to value \e value.
|
* Set the given nodes iSCSI parameter named by \e parameter to value \e value.
|
||||||
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
|
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
|
||||||
index fdc26c7bd9ba..80b7b0210fd1 100644
|
index 418f51b..6febba2 100644
|
||||||
--- a/usr/iscsi_sysfs.c
|
--- a/usr/iscsi_sysfs.c
|
||||||
+++ b/usr/iscsi_sysfs.c
|
+++ b/usr/iscsi_sysfs.c
|
||||||
@@ -3,6 +3,7 @@
|
@@ -3,6 +3,7 @@
|
||||||
@ -253,7 +253,7 @@ index fdc26c7bd9ba..80b7b0210fd1 100644
|
|||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published
|
* it under the terms of the GNU General Public License as published
|
||||||
@@ -1146,6 +1147,11 @@ free_info:
|
@@ -1151,6 +1152,11 @@ free_info:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ index fdc26c7bd9ba..80b7b0210fd1 100644
|
|||||||
int *nr_found,
|
int *nr_found,
|
||||||
iscsi_sysfs_iface_op_fn *fn)
|
iscsi_sysfs_iface_op_fn *fn)
|
||||||
diff --git a/usr/iscsi_sysfs.h b/usr/iscsi_sysfs.h
|
diff --git a/usr/iscsi_sysfs.h b/usr/iscsi_sysfs.h
|
||||||
index cdcefa65f683..12ad87f96c8c 100644
|
index 1d0377f..909db34 100644
|
||||||
--- a/usr/iscsi_sysfs.h
|
--- a/usr/iscsi_sysfs.h
|
||||||
+++ b/usr/iscsi_sysfs.h
|
+++ b/usr/iscsi_sysfs.h
|
||||||
@@ -3,6 +3,7 @@
|
@@ -3,6 +3,7 @@
|
||||||
@ -286,5 +286,5 @@ index cdcefa65f683..12ad87f96c8c 100644
|
|||||||
int *nr_found,
|
int *nr_found,
|
||||||
iscsi_sysfs_iface_op_fn *fn);
|
iscsi_sysfs_iface_op_fn *fn);
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
From f16f7f90721c9d6965e48c7338a600d23b58e19d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Leech <cleech@redhat.com>
|
|
||||||
Date: Tue, 22 Jan 2013 14:27:12 -0800
|
|
||||||
Subject: [PATCH 11/32] iscsiuio systemd unit files
|
|
||||||
|
|
||||||
---
|
|
||||||
etc/systemd/iscsiuio.service | 17 +++++++++++++++++
|
|
||||||
etc/systemd/iscsiuio.socket | 9 +++++++++
|
|
||||||
2 files changed, 26 insertions(+)
|
|
||||||
create mode 100644 etc/systemd/iscsiuio.service
|
|
||||||
create mode 100644 etc/systemd/iscsiuio.socket
|
|
||||||
|
|
||||||
diff --git a/etc/systemd/iscsiuio.service b/etc/systemd/iscsiuio.service
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..f0410b76b80e
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/etc/systemd/iscsiuio.service
|
|
||||||
@@ -0,0 +1,17 @@
|
|
||||||
+[Unit]
|
|
||||||
+Description=iSCSI UserSpace I/O driver
|
|
||||||
+Documentation=man:iscsiuio(8)
|
|
||||||
+DefaultDependencies=no
|
|
||||||
+Conflicts=shutdown.target
|
|
||||||
+Requires=iscsid.service
|
|
||||||
+BindTo=iscsid.service
|
|
||||||
+After=network.target
|
|
||||||
+Before=remote-fs-pre.target iscsid.service
|
|
||||||
+
|
|
||||||
+[Service]
|
|
||||||
+Type=forking
|
|
||||||
+PIDFile=/var/run/iscsiuio.pid
|
|
||||||
+ExecStart=/usr/sbin/iscsiuio
|
|
||||||
+
|
|
||||||
+[Install]
|
|
||||||
+WantedBy=multi-user.target
|
|
||||||
diff --git a/etc/systemd/iscsiuio.socket b/etc/systemd/iscsiuio.socket
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..d42cedc161a3
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/etc/systemd/iscsiuio.socket
|
|
||||||
@@ -0,0 +1,9 @@
|
|
||||||
+[Unit]
|
|
||||||
+Description=Open-iSCSI iscsiuio Socket
|
|
||||||
+Documentation=man:iscsiuio(8)
|
|
||||||
+
|
|
||||||
+[Socket]
|
|
||||||
+ListenStream=@ISCSID_UIP_ABSTRACT_NAMESPACE
|
|
||||||
+
|
|
||||||
+[Install]
|
|
||||||
+WantedBy=sockets.target
|
|
||||||
--
|
|
||||||
2.14.4
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
|||||||
From 1aa35262d566d829d711bc746f944dee5c2d9e7a Mon Sep 17 00:00:00 2001
|
From 2e660a78632545e98f7c9e2ffb8518512c0db5ff Mon Sep 17 00:00:00 2001
|
||||||
From: rpm-build <rpm-build>
|
From: rpm-build <rpm-build>
|
||||||
Date: Tue, 28 Feb 2017 09:00:41 -0800
|
Date: Tue, 28 Feb 2017 09:00:41 -0800
|
||||||
Subject: [PATCH 21/32] libiscsi: fix discovery request timeout regression
|
Subject: [PATCH] libiscsi: fix discovery request timeout regression
|
||||||
|
|
||||||
---
|
---
|
||||||
libiscsi/libiscsi.c | 2 ++
|
libiscsi/libiscsi.c | 2 ++
|
||||||
1 file changed, 2 insertions(+)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
||||||
index 755c18ca8e3b..bb17dfcafded 100644
|
index 755c18c..bb17dfc 100644
|
||||||
--- a/libiscsi/libiscsi.c
|
--- a/libiscsi/libiscsi.c
|
||||||
+++ b/libiscsi/libiscsi.c
|
+++ b/libiscsi/libiscsi.c
|
||||||
@@ -136,6 +136,7 @@ int libiscsi_discover_sendtargets(struct libiscsi_context *context,
|
@@ -136,6 +136,7 @@ int libiscsi_discover_sendtargets(struct libiscsi_context *context,
|
||||||
@ -28,5 +28,5 @@ index 755c18ca8e3b..bb17dfcafded 100644
|
|||||||
rc = idbm_bind_ifaces_to_nodes(discovery_fw, &drec, &ifaces, &rec_list);
|
rc = idbm_bind_ifaces_to_nodes(discovery_fw, &drec, &ifaces, &rec_list);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
From 9807bf0a042238891f2008a5a6d70acfd6724b12 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Leech <cleech@redhat.com>
|
|
||||||
Date: Tue, 28 May 2013 13:12:27 -0700
|
|
||||||
Subject: [PATCH 12/32] Don't check for autostart sessions if iscsi is not used
|
|
||||||
(bug #951951)
|
|
||||||
|
|
||||||
Change conditional startup in iscsi.service to check for a non-empty
|
|
||||||
nodes directory, instead of initiator-name. This fits better with what
|
|
||||||
it's doing, as there's no need to scan for autostart node records if
|
|
||||||
there are no node records at all.
|
|
||||||
---
|
|
||||||
etc/systemd/iscsi.service | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
|
|
||||||
index 0309e2fc9892..d5712bd3779b 100644
|
|
||||||
--- a/etc/systemd/iscsi.service
|
|
||||||
+++ b/etc/systemd/iscsi.service
|
|
||||||
@@ -5,7 +5,7 @@ DefaultDependencies=no
|
|
||||||
Conflicts=shutdown.target
|
|
||||||
After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
|
|
||||||
Before=remote-fs-pre.target
|
|
||||||
-ConditionPathExists=/etc/iscsi/initiatorname.iscsi
|
|
||||||
+ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
--
|
|
||||||
2.14.4
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
|||||||
From 1b2b6b683bd7ca3a7030889daf8c326dda797319 Mon Sep 17 00:00:00 2001
|
From 3040b7530eda1ab5625d76783dc7b8cf595a0ef0 Mon Sep 17 00:00:00 2001
|
||||||
From: rpm-build <rpm-build>
|
From: rpm-build <rpm-build>
|
||||||
Date: Tue, 28 Feb 2017 10:06:42 -0800
|
Date: Tue, 28 Feb 2017 10:06:42 -0800
|
||||||
Subject: [PATCH 22/32] libiscsi format-security build errors
|
Subject: [PATCH] libiscsi format-security build errors
|
||||||
|
|
||||||
---
|
---
|
||||||
libiscsi/libiscsi.c | 5 +++--
|
libiscsi/libiscsi.c | 5 +++--
|
||||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
||||||
index bb17dfcafded..7003388e3346 100644
|
index bb17dfc..7003388 100644
|
||||||
--- a/libiscsi/libiscsi.c
|
--- a/libiscsi/libiscsi.c
|
||||||
+++ b/libiscsi/libiscsi.c
|
+++ b/libiscsi/libiscsi.c
|
||||||
@@ -177,7 +177,8 @@ int libiscsi_discover_sendtargets(struct libiscsi_context *context,
|
@@ -177,7 +177,8 @@ int libiscsi_discover_sendtargets(struct libiscsi_context *context,
|
||||||
@ -31,5 +31,5 @@ index bb17dfcafded..7003388e3346 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,17 +1,17 @@
|
|||||||
From b0d26441cebf6f1d78a2b4523ee9c348578b3d91 Mon Sep 17 00:00:00 2001
|
From 123fc55dd8ad98c9afd39bf0824b3d31d5e93214 Mon Sep 17 00:00:00 2001
|
||||||
From: rpm-build <rpm-build>
|
From: rpm-build <rpm-build>
|
||||||
Date: Thu, 24 May 2018 15:17:05 -0700
|
Date: Thu, 24 May 2018 15:17:05 -0700
|
||||||
Subject: [PATCH 23/32] libiscsi fix build to use libopeniscsiusr
|
Subject: [PATCH] libiscsi fix build to use libopeniscsiusr
|
||||||
|
|
||||||
---
|
---
|
||||||
libiscsi/Makefile | 6 ++++--
|
libiscsi/Makefile | 6 ++++--
|
||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/libiscsi/Makefile b/libiscsi/Makefile
|
diff --git a/libiscsi/Makefile b/libiscsi/Makefile
|
||||||
index 317a7ec4db30..1196bb5c0cf4 100644
|
index 53f9746..f2cf248 100644
|
||||||
--- a/libiscsi/Makefile
|
--- a/libiscsi/Makefile
|
||||||
+++ b/libiscsi/Makefile
|
+++ b/libiscsi/Makefile
|
||||||
@@ -4,7 +4,9 @@ OSNAME=$(shell uname -s)
|
@@ -8,7 +8,9 @@ OSNAME=$(shell uname -s)
|
||||||
OPTFLAGS ?= -O2 -g
|
OPTFLAGS ?= -O2 -g
|
||||||
WARNFLAGS ?= -Wall -Wstrict-prototypes
|
WARNFLAGS ?= -Wall -Wstrict-prototypes
|
||||||
CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I../include -I../usr \
|
CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I../include -I../usr \
|
||||||
@ -22,7 +22,7 @@ index 317a7ec4db30..1196bb5c0cf4 100644
|
|||||||
LIB = libiscsi.so.0
|
LIB = libiscsi.so.0
|
||||||
TESTS = tests/test_discovery_sendtargets tests/test_discovery_firmware
|
TESTS = tests/test_discovery_sendtargets tests/test_discovery_firmware
|
||||||
TESTS += tests/test_login tests/test_logout tests/test_params
|
TESTS += tests/test_login tests/test_logout tests/test_params
|
||||||
@@ -19,7 +21,7 @@ FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_sys
|
@@ -23,7 +25,7 @@ FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_sys
|
||||||
# sources shared with the userspace utils, note we build these separately
|
# sources shared with the userspace utils, note we build these separately
|
||||||
# to get PIC versions.
|
# to get PIC versions.
|
||||||
COMMON_OBJS = $(patsubst %.o, common-objs/%.o, $(COMMON_SRCS))
|
COMMON_OBJS = $(patsubst %.o, common-objs/%.o, $(COMMON_SRCS))
|
||||||
@ -32,5 +32,5 @@ index 317a7ec4db30..1196bb5c0cf4 100644
|
|||||||
|
|
||||||
# Flags for the tests
|
# Flags for the tests
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
66
0014-libiscsi-fix-build-against-latest-upstream-again.patch
Normal file
66
0014-libiscsi-fix-build-against-latest-upstream-again.patch
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
From 039700890e11dff3323241349d3858f258c09cc0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris Leech <cleech@redhat.com>
|
||||||
|
Date: Thu, 7 Nov 2019 09:16:17 -0800
|
||||||
|
Subject: [PATCH] libiscsi: fix build against latest upstream, again
|
||||||
|
|
||||||
|
---
|
||||||
|
libiscsi/Makefile | 4 ++--
|
||||||
|
libiscsi/libiscsi.c | 6 +++---
|
||||||
|
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libiscsi/Makefile b/libiscsi/Makefile
|
||||||
|
index f2cf248..462d666 100644
|
||||||
|
--- a/libiscsi/Makefile
|
||||||
|
+++ b/libiscsi/Makefile
|
||||||
|
@@ -10,7 +10,7 @@ WARNFLAGS ?= -Wall -Wstrict-prototypes
|
||||||
|
CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I../include -I../usr \
|
||||||
|
-D$(OSNAME) -fPIC -D_GNU_SOURCE -fvisibility=hidden \
|
||||||
|
-I../libopeniscsiusr
|
||||||
|
-LDFLAGS = -L../libopeniscsiusr -lopeniscsiusr
|
||||||
|
+LDFLAGS = -L../libopeniscsiusr -lopeniscsiusr -lkmod -lcrypto
|
||||||
|
LIB = libiscsi.so.0
|
||||||
|
TESTS = tests/test_discovery_sendtargets tests/test_discovery_firmware
|
||||||
|
TESTS += tests/test_login tests/test_logout tests/test_params
|
||||||
|
@@ -19,7 +19,7 @@ TESTS += tests/test_set_auth tests/test_get_auth
|
||||||
|
|
||||||
|
COMMON_SRCS = sysdeps.o
|
||||||
|
# sources shared between iscsid, iscsiadm and iscsistart
|
||||||
|
-ISCSI_LIB_SRCS = netlink.o transport.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o iser.o uip_mgmt_ipc.o
|
||||||
|
+ISCSI_LIB_SRCS = netlink.o transport.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o io.o auth.o discovery.o login.o log.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o iser.o uip_mgmt_ipc.o
|
||||||
|
FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_sysfs.o
|
||||||
|
|
||||||
|
# sources shared with the userspace utils, note we build these separately
|
||||||
|
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
||||||
|
index 7003388..c598aee 100644
|
||||||
|
--- a/libiscsi/libiscsi.c
|
||||||
|
+++ b/libiscsi/libiscsi.c
|
||||||
|
@@ -429,7 +429,7 @@ int libiscsi_node_login(struct libiscsi_context *context,
|
||||||
|
|
||||||
|
CHECK(idbm_for_each_iface(&nr_found, (void*)node->iface, login_helper,
|
||||||
|
(char *)node->name, node->tpgt,
|
||||||
|
- (char *)node->address, node->port))
|
||||||
|
+ (char *)node->address, node->port, false))
|
||||||
|
if (nr_found == 0) {
|
||||||
|
strcpy(context->error_str, "No such node");
|
||||||
|
rc = ENODEV;
|
||||||
|
@@ -615,7 +615,7 @@ int libiscsi_node_set_parameter(struct libiscsi_context *context,
|
||||||
|
|
||||||
|
CHECK(idbm_for_each_iface(&nr_found, ¶ms, idbm_node_set_param,
|
||||||
|
(char *)node->name, node->tpgt,
|
||||||
|
- (char *)node->address, node->port))
|
||||||
|
+ (char *)node->address, node->port, false))
|
||||||
|
if (nr_found == 0) {
|
||||||
|
strcpy(context->error_str, "No such node");
|
||||||
|
rc = ENODEV;
|
||||||
|
@@ -677,7 +677,7 @@ int libiscsi_node_get_parameter(struct libiscsi_context *context,
|
||||||
|
as most settings should be the same independent of the iface. */
|
||||||
|
CHECK(idbm_for_each_iface(&nr_found, context, get_parameter_helper,
|
||||||
|
(char *)node->name, node->tpgt,
|
||||||
|
- (char *)node->address, node->port))
|
||||||
|
+ (char *)node->address, node->port, false))
|
||||||
|
if (nr_found == 0) {
|
||||||
|
strcpy(context->error_str, "No such node");
|
||||||
|
rc = ENODEV;
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
From c7b743486c6a499a037744760846abdb42959808 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Leech <cleech@redhat.com>
|
|
||||||
Date: Wed, 26 Feb 2014 16:33:48 -0800
|
|
||||||
Subject: [PATCH 14/32] 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 157be62b4041..6bddf6c5ccc1 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
|
|
||||||
|
|
||||||
--
|
|
||||||
2.14.4
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
|||||||
From 71b576b10a03651f67173d19883a929e91a3423a Mon Sep 17 00:00:00 2001
|
From d0689253c9e2eb78fc5296adb109aba4d35a13fd Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Mon, 19 Nov 2012 17:09:24 -0800
|
Date: Mon, 19 Nov 2012 17:09:24 -0800
|
||||||
Subject: [PATCH 10/32] remove the offload boot supported ifdef
|
Subject: [PATCH] remove the offload boot supported ifdef
|
||||||
|
|
||||||
---
|
---
|
||||||
usr/iface.c | 7 +------
|
usr/iface.c | 7 +------
|
||||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||||
|
|
||||||
diff --git a/usr/iface.c b/usr/iface.c
|
diff --git a/usr/iface.c b/usr/iface.c
|
||||||
index 137138f5af67..889fe8cd8202 100644
|
index 645b0b8..9cd07fd 100644
|
||||||
--- a/usr/iface.c
|
--- a/usr/iface.c
|
||||||
+++ b/usr/iface.c
|
+++ b/usr/iface.c
|
||||||
@@ -993,6 +993,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
@@ -993,6 +993,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||||
@ -41,5 +41,5 @@ index 137138f5af67..889fe8cd8202 100644
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From f349a706ec083574fbf7ed1e479fdfebde7023b8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Leech <cleech@redhat.com>
|
|
||||||
Date: Fri, 14 Mar 2014 09:22:21 -0700
|
|
||||||
Subject: [PATCH 15/32] 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 d5712bd3779b..3de76c5b07ec 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
|
|
||||||
|
|
||||||
--
|
|
||||||
2.14.4
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 6629618e3581cbe632b7408a49437270bc04a8d4 Mon Sep 17 00:00:00 2001
|
From ccb9d70a0dad7c42f926f1680ae708a5ae3d3696 Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Mon, 24 Feb 2014 09:33:33 -0800
|
Date: Mon, 24 Feb 2014 09:33:33 -0800
|
||||||
Subject: [PATCH 13/32] Revert "iscsiadm: return error when login fails"
|
Subject: [PATCH] Revert "iscsiadm: return error when login fails"
|
||||||
|
|
||||||
This reverts commit fc2a8e9a2911bc76f961fe3e4a159fab9b8b9691.
|
This reverts commit fc2a8e9a2911bc76f961fe3e4a159fab9b8b9691.
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ Done to address RHBZ #1015563
|
|||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/usr/session_mgmt.c b/usr/session_mgmt.c
|
diff --git a/usr/session_mgmt.c b/usr/session_mgmt.c
|
||||||
index 596085b1f640..07f587d2bafb 100644
|
index 0500f15..1e1f2bc 100644
|
||||||
--- a/usr/session_mgmt.c
|
--- a/usr/session_mgmt.c
|
||||||
+++ b/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)
|
@@ -178,12 +178,12 @@ int iscsi_login_portal(void *data, struct list_head *list, struct node_rec *rec)
|
||||||
@ -30,5 +30,5 @@ index 596085b1f640..07f587d2bafb 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From 954ab51516734aaeed01a195a6e70b825b0bf10a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chris Leech <cleech@redhat.com>
|
|
||||||
Date: Wed, 17 Sep 2014 09:58:39 -0700
|
|
||||||
Subject: [PATCH 16/32] updates to iscsi.service
|
|
||||||
|
|
||||||
Resolves: #1126524
|
|
||||||
Resolves: #1111925
|
|
||||||
---
|
|
||||||
etc/systemd/iscsi.service | 10 +++++-----
|
|
||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
|
|
||||||
index 3de76c5b07ec..ad7be34d5918 100644
|
|
||||||
--- a/etc/systemd/iscsi.service
|
|
||||||
+++ b/etc/systemd/iscsi.service
|
|
||||||
@@ -5,17 +5,17 @@ DefaultDependencies=no
|
|
||||||
Conflicts=shutdown.target
|
|
||||||
After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
|
|
||||||
Before=remote-fs-pre.target
|
|
||||||
+Wants=remote-fs-pre.target
|
|
||||||
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=/sbin/iscsiadm -m node --logoutall=automatic
|
|
||||||
-ExecReload=/sbin/iscsiadm -m node --loginall=automatic
|
|
||||||
+ExecStart=-/usr/libexec/iscsi-mark-root-nodes
|
|
||||||
+ExecStart=-/sbin/iscsiadm -m node --loginall=automatic
|
|
||||||
+ExecStop=-/sbin/iscsiadm -m node --logoutall=automatic
|
|
||||||
+ExecReload=-/sbin/iscsiadm -m node --loginall=automatic
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=sysinit.target
|
|
||||||
--
|
|
||||||
2.14.4
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
|||||||
From 09485b397990aca06d5e98a855bab2444c9ec572 Mon Sep 17 00:00:00 2001
|
From f524e332835b2b59d3f3ff8a67814ef2d58a2857 Mon Sep 17 00:00:00 2001
|
||||||
From: rpm-build <rpm-build>
|
From: rpm-build <rpm-build>
|
||||||
Date: Fri, 25 May 2018 09:39:07 -0700
|
Date: Fri, 25 May 2018 09:39:07 -0700
|
||||||
Subject: [PATCH 24/32] dont install scripts
|
Subject: [PATCH] dont install scripts
|
||||||
|
|
||||||
---
|
---
|
||||||
Makefile | 2 +-
|
Makefile | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
index 80afe86d6558..a35082daa9f9 100644
|
index 4ab091f..7e6b734 100644
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -99,7 +99,7 @@ install_udev_rules:
|
@@ -116,7 +116,7 @@ install_systemd:
|
||||||
$(INSTALL) -d $(DESTDIR)$(rulesdir)
|
$(INSTALL) -d $(DESTDIR)$(systemddir)
|
||||||
$(INSTALL) -m 644 $(RULESFILES) $(DESTDIR)/$(rulesdir)
|
$(INSTALL) -m 644 $(SYSTEMDFILES) $(DESTDIR)/$(systemddir)
|
||||||
|
|
||||||
-install_programs: $(PROGRAMS) $(SCRIPTS)
|
-install_programs: $(PROGRAMS) $(SCRIPTS)
|
||||||
+install_programs: $(PROGRAMS) # $(SCRIPTS)
|
+install_programs: $(PROGRAMS) # $(SCRIPTS)
|
||||||
@ -21,5 +21,5 @@ index 80afe86d6558..a35082daa9f9 100644
|
|||||||
$(INSTALL) -m 755 $^ $(DESTDIR)$(sbindir)
|
$(INSTALL) -m 755 $^ $(DESTDIR)$(sbindir)
|
||||||
|
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
From 3815643d7db65487fa2b7058dd612ddf2549f85a Mon Sep 17 00:00:00 2001
|
|
||||||
From: rpm-build <rpm-build>
|
|
||||||
Date: Tue, 13 Jan 2015 16:30:01 -0800
|
|
||||||
Subject: [PATCH 17/32] make-session-shutdown-a-seperate-service.patch
|
|
||||||
|
|
||||||
---
|
|
||||||
etc/systemd/iscsi-shutdown.service | 14 ++++++++++++++
|
|
||||||
etc/systemd/iscsi.service | 3 +--
|
|
||||||
2 files changed, 15 insertions(+), 2 deletions(-)
|
|
||||||
create mode 100644 etc/systemd/iscsi-shutdown.service
|
|
||||||
|
|
||||||
diff --git a/etc/systemd/iscsi-shutdown.service b/etc/systemd/iscsi-shutdown.service
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..23758e959ff2
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/etc/systemd/iscsi-shutdown.service
|
|
||||||
@@ -0,0 +1,14 @@
|
|
||||||
+[Unit]
|
|
||||||
+Description=Logout off all iSCSI sessions on shutdown
|
|
||||||
+Documentation=man:iscsid(8) man:iscsiadm(8)
|
|
||||||
+DefaultDependencies=no
|
|
||||||
+Conflicts=shutdown.target
|
|
||||||
+After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
|
|
||||||
+Before=remote-fs-pre.target
|
|
||||||
+Wants=remote-fs-pre.target
|
|
||||||
+RefuseManualStop=yes
|
|
||||||
+
|
|
||||||
+[Service]
|
|
||||||
+Type=oneshot
|
|
||||||
+RemainAfterExit=true
|
|
||||||
+ExecStop=-/sbin/iscsiadm -m node --logoutall=all
|
|
||||||
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
|
|
||||||
index ad7be34d5918..27369568bf35 100644
|
|
||||||
--- a/etc/systemd/iscsi.service
|
|
||||||
+++ b/etc/systemd/iscsi.service
|
|
||||||
@@ -5,7 +5,7 @@ DefaultDependencies=no
|
|
||||||
Conflicts=shutdown.target
|
|
||||||
After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
|
|
||||||
Before=remote-fs-pre.target
|
|
||||||
-Wants=remote-fs-pre.target
|
|
||||||
+Wants=remote-fs-pre.target iscsi-shutdown.service
|
|
||||||
ConditionDirectoryNotEmpty=|/var/lib/iscsi/nodes
|
|
||||||
ConditionDirectoryNotEmpty=|/sys/class/iscsi_session
|
|
||||||
|
|
||||||
@@ -14,7 +14,6 @@ Type=oneshot
|
|
||||||
RemainAfterExit=true
|
|
||||||
ExecStart=-/usr/libexec/iscsi-mark-root-nodes
|
|
||||||
ExecStart=-/sbin/iscsiadm -m node --loginall=automatic
|
|
||||||
-ExecStop=-/sbin/iscsiadm -m node --logoutall=automatic
|
|
||||||
ExecReload=-/sbin/iscsiadm -m node --loginall=automatic
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
--
|
|
||||||
2.14.4
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 089cd6910d9f0d1e459e1d8d00b754843437526d Mon Sep 17 00:00:00 2001
|
From e2b8215b80cc037ecbcb9eef50e432c31d5e56eb Mon Sep 17 00:00:00 2001
|
||||||
From: rpm-build <rpm-build>
|
From: rpm-build <rpm-build>
|
||||||
Date: Wed, 30 May 2018 16:08:30 -0700
|
Date: Wed, 30 May 2018 16:08:30 -0700
|
||||||
Subject: [PATCH 28/28] use /var/lib/iscsi in libopeniscsiusr
|
Subject: [PATCH] use /var/lib/iscsi in libopeniscsiusr
|
||||||
|
|
||||||
---
|
---
|
||||||
libopeniscsiusr/idbm.h | 3 ++-
|
libopeniscsiusr/idbm.h | 3 ++-
|
||||||
@ -12,7 +12,7 @@ Subject: [PATCH 28/28] use /var/lib/iscsi in libopeniscsiusr
|
|||||||
5 files changed, 9 insertions(+), 8 deletions(-)
|
5 files changed, 9 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
diff --git a/libopeniscsiusr/idbm.h b/libopeniscsiusr/idbm.h
|
diff --git a/libopeniscsiusr/idbm.h b/libopeniscsiusr/idbm.h
|
||||||
index 3fd0864a797d..c84d332ff949 100644
|
index 3fd0864..c84d332 100644
|
||||||
--- a/libopeniscsiusr/idbm.h
|
--- a/libopeniscsiusr/idbm.h
|
||||||
+++ b/libopeniscsiusr/idbm.h
|
+++ b/libopeniscsiusr/idbm.h
|
||||||
@@ -31,7 +31,8 @@
|
@@ -31,7 +31,8 @@
|
||||||
@ -26,10 +26,10 @@ index 3fd0864a797d..c84d332ff949 100644
|
|||||||
#define BOOT_NAME_MAXLEN 256
|
#define BOOT_NAME_MAXLEN 256
|
||||||
#define IDBM_DUMP_SIZE 8192
|
#define IDBM_DUMP_SIZE 8192
|
||||||
diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c
|
diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c
|
||||||
index e2355bc0fff0..cd9dd7326ae6 100644
|
index e7938a5..99ab7b5 100644
|
||||||
--- a/libopeniscsiusr/iface.c
|
--- a/libopeniscsiusr/iface.c
|
||||||
+++ b/libopeniscsiusr/iface.c
|
+++ b/libopeniscsiusr/iface.c
|
||||||
@@ -383,7 +383,7 @@ int iscsi_default_iface_setup(struct iscsi_context *ctx)
|
@@ -381,7 +381,7 @@ int iscsi_default_iface_setup(struct iscsi_context *ctx)
|
||||||
|
|
||||||
_good(_iscsi_hids_get(ctx, &hids, &hid_count), rc, out);
|
_good(_iscsi_hids_get(ctx, &hids, &hid_count), rc, out);
|
||||||
for (i = 0; i < hid_count; ++i) {
|
for (i = 0; i < hid_count; ++i) {
|
||||||
@ -39,7 +39,7 @@ index e2355bc0fff0..cd9dd7326ae6 100644
|
|||||||
_good(_iscsi_ifaces_get_from_sysfs(ctx, hids[i], &ifaces, &iface_count),
|
_good(_iscsi_ifaces_get_from_sysfs(ctx, hids[i], &ifaces, &iface_count),
|
||||||
rc, out);
|
rc, out);
|
||||||
diff --git a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h
|
diff --git a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h
|
||||||
index 439590249212..81582da9e1e6 100644
|
index 4395902..81582da 100644
|
||||||
--- a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h
|
--- a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h
|
||||||
+++ b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h
|
+++ b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h
|
||||||
@@ -339,7 +339,7 @@ __DLL_EXPORT void iscsi_session_free(struct iscsi_session *se);
|
@@ -339,7 +339,7 @@ __DLL_EXPORT void iscsi_session_free(struct iscsi_session *se);
|
||||||
@ -79,7 +79,7 @@ index 439590249212..81582da9e1e6 100644
|
|||||||
* by assert.
|
* by assert.
|
||||||
* @iface:
|
* @iface:
|
||||||
diff --git a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h
|
diff --git a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h
|
||||||
index a1a255246d20..95b01602fb37 100644
|
index a1a2552..95b0160 100644
|
||||||
--- a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h
|
--- a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h
|
||||||
+++ b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h
|
+++ b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h
|
||||||
@@ -182,7 +182,7 @@ __DLL_EXPORT const char *iscsi_iface_name_get(struct iscsi_iface *iface);
|
@@ -182,7 +182,7 @@ __DLL_EXPORT const char *iscsi_iface_name_get(struct iscsi_iface *iface);
|
||||||
@ -92,7 +92,7 @@ index a1a255246d20..95b01602fb37 100644
|
|||||||
* @iface:
|
* @iface:
|
||||||
* Pointer of 'struct iscsi_iface'.
|
* Pointer of 'struct iscsi_iface'.
|
||||||
diff --git a/libopeniscsiusr/node.h b/libopeniscsiusr/node.h
|
diff --git a/libopeniscsiusr/node.h b/libopeniscsiusr/node.h
|
||||||
index 39e07b3befae..9eba7fa6077c 100644
|
index 39e07b3..9eba7fa 100644
|
||||||
--- a/libopeniscsiusr/node.h
|
--- a/libopeniscsiusr/node.h
|
||||||
+++ b/libopeniscsiusr/node.h
|
+++ b/libopeniscsiusr/node.h
|
||||||
@@ -44,7 +44,7 @@ struct iscsi_node {
|
@@ -44,7 +44,7 @@ struct iscsi_node {
|
||||||
@ -105,5 +105,5 @@ index 39e07b3befae..9eba7fa6077c 100644
|
|||||||
/* Might be public in the future */
|
/* Might be public in the future */
|
||||||
__DLL_LOCAL void iscsi_node_free(struct iscsi_node *node);
|
__DLL_LOCAL void iscsi_node_free(struct iscsi_node *node);
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
123
0019-Coverity-scan-fixes.patch
Normal file
123
0019-Coverity-scan-fixes.patch
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
From 44bb05de04c0f8819c1fdae8f567dd802a8444e8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris Leech <cleech@redhat.com>
|
||||||
|
Date: Wed, 5 Jun 2019 09:08:39 -0700
|
||||||
|
Subject: [PATCH] Coverity scan fixes
|
||||||
|
|
||||||
|
---
|
||||||
|
iscsiuio/src/unix/libs/qedi.c | 2 +-
|
||||||
|
iscsiuio/src/unix/main.c | 12 ++++++++++--
|
||||||
|
libopeniscsiusr/idbm.c | 11 +++++------
|
||||||
|
usr/idbm.c | 10 ++++------
|
||||||
|
usr/iscsid.c | 2 +-
|
||||||
|
5 files changed, 21 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/iscsiuio/src/unix/libs/qedi.c b/iscsiuio/src/unix/libs/qedi.c
|
||||||
|
index 3414cb5..a359700 100644
|
||||||
|
--- a/iscsiuio/src/unix/libs/qedi.c
|
||||||
|
+++ b/iscsiuio/src/unix/libs/qedi.c
|
||||||
|
@@ -1023,7 +1023,7 @@ static int qedi_read(nic_t *nic, packet_t *pkt)
|
||||||
|
|
||||||
|
LOG_DEBUG(PFX "%s:hw_prod %d bd_prod %d, rx_pkt_idx %d, rxlen %d",
|
||||||
|
nic->log_name, hw_prod, bd_prod, rx_bd->rx_pkt_index, len);
|
||||||
|
- LOG_DEBUG(PFX "%s: sw_con %d bd_cons %d num BD %d",
|
||||||
|
+ LOG_DEBUG(PFX "%s: sw_con %d bd_cons %d num BD %lu",
|
||||||
|
nic->log_name, sw_cons, bd_cons, QEDI_NUM_RX_BD);
|
||||||
|
|
||||||
|
if (bd_cons != bd_prod) {
|
||||||
|
diff --git a/iscsiuio/src/unix/main.c b/iscsiuio/src/unix/main.c
|
||||||
|
index 5e3f66c..4c50890 100644
|
||||||
|
--- a/iscsiuio/src/unix/main.c
|
||||||
|
+++ b/iscsiuio/src/unix/main.c
|
||||||
|
@@ -341,7 +341,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
|
/* parent: wait for child msg then exit */
|
||||||
|
close(pipefds[1]);
|
||||||
|
- read(pipefds[0], msgbuf, sizeof(msgbuf));
|
||||||
|
+ if (read(pipefds[0], msgbuf, sizeof(msgbuf)) < 0) {
|
||||||
|
+ fprintf(stderr, "ERR: Waiting for child process failed\n");
|
||||||
|
+ exit(1);
|
||||||
|
+ }
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -387,6 +390,9 @@ int main(int argc, char *argv[])
|
||||||
|
sigaddset(&set, SIGTERM);
|
||||||
|
sigaddset(&set, SIGUSR1);
|
||||||
|
rc = pthread_sigmask(SIG_SETMASK, &set, NULL);
|
||||||
|
+ if (rc != 0) {
|
||||||
|
+ LOG_ERR("Failed to set thread signal mask");
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* Spin off the signal handling thread */
|
||||||
|
pthread_attr_init(&attr);
|
||||||
|
@@ -416,7 +422,9 @@ int main(int argc, char *argv[])
|
||||||
|
if (!foreground) {
|
||||||
|
/* signal parent they can go away now */
|
||||||
|
close(pipefds[0]);
|
||||||
|
- write(pipefds[1], "ok\n", 3);
|
||||||
|
+ if (write(pipefds[1], "ok\n", 3) < 0) {
|
||||||
|
+ LOG_ERR("Failed to signal parent process of completed initialization");
|
||||||
|
+ }
|
||||||
|
close(pipefds[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/libopeniscsiusr/idbm.c b/libopeniscsiusr/idbm.c
|
||||||
|
index d020e6c..342aab5 100644
|
||||||
|
--- a/libopeniscsiusr/idbm.c
|
||||||
|
+++ b/libopeniscsiusr/idbm.c
|
||||||
|
@@ -287,12 +287,11 @@ int _idbm_lock(struct iscsi_context *ctx)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (access(LOCK_DIR, F_OK) != 0) {
|
||||||
|
- if (mkdir(LOCK_DIR, 0660) != 0) {
|
||||||
|
- _error(ctx, "Could not open %s: %d %s", LOCK_DIR, errno,
|
||||||
|
- _strerror(errno, strerr_buff));
|
||||||
|
- return LIBISCSI_ERR_IDBM;
|
||||||
|
- }
|
||||||
|
+ if (((mkdir(LOCK_DIR, 0660) != 0) && (errno != EEXIST)) ||
|
||||||
|
+ (access(LOCK_DIR, F_OK) != 0)) {
|
||||||
|
+ _error(ctx, "Could not open %s: %d %s", LOCK_DIR, errno,
|
||||||
|
+ _strerror(errno, strerr_buff));
|
||||||
|
+ return LIBISCSI_ERR_IDBM;
|
||||||
|
}
|
||||||
|
|
||||||
|
fd = open(LOCK_FILE, O_RDWR | O_CREAT, 0666);
|
||||||
|
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||||
|
index 3184c77..0c6870c 100644
|
||||||
|
--- a/usr/idbm.c
|
||||||
|
+++ b/usr/idbm.c
|
||||||
|
@@ -1339,12 +1339,10 @@ int idbm_lock(void)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (access(LOCK_DIR, F_OK) != 0) {
|
||||||
|
- if (mkdir(LOCK_DIR, 0660) != 0) {
|
||||||
|
- log_error("Could not open %s: %s", LOCK_DIR,
|
||||||
|
- strerror(errno));
|
||||||
|
- return ISCSI_ERR_IDBM;
|
||||||
|
- }
|
||||||
|
+ if (((mkdir(LOCK_DIR, 0660) != 0) && (errno != EEXIST)) ||
|
||||||
|
+ (access(LOCK_DIR, F_OK) != 0)) {
|
||||||
|
+ log_error("Could not open %s: %s", LOCK_DIR, strerror(errno));
|
||||||
|
+ return ISCSI_ERR_IDBM;
|
||||||
|
}
|
||||||
|
|
||||||
|
fd = open(LOCK_FILE, O_RDWR | O_CREAT, 0666);
|
||||||
|
diff --git a/usr/iscsid.c b/usr/iscsid.c
|
||||||
|
index 8f1c597..96a6452 100644
|
||||||
|
--- a/usr/iscsid.c
|
||||||
|
+++ b/usr/iscsid.c
|
||||||
|
@@ -489,8 +489,8 @@ int main(int argc, char *argv[])
|
||||||
|
log_close(log_pid);
|
||||||
|
exit(ISCSI_ERR);
|
||||||
|
}
|
||||||
|
+ close(fd);
|
||||||
|
}
|
||||||
|
- close(fd);
|
||||||
|
|
||||||
|
if ((control_fd = ipc->ctldev_open()) < 0) {
|
||||||
|
log_close(log_pid);
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
29
0020-fix-upstream-build-breakage-of-iscsiuio-LDFLAGS.patch
Normal file
29
0020-fix-upstream-build-breakage-of-iscsiuio-LDFLAGS.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 4142125fa296d21a307fb2370b2d4d7e8487f22c Mon Sep 17 00:00:00 2001
|
||||||
|
From: rpm-build <rpm-build>
|
||||||
|
Date: Wed, 16 Oct 2019 23:17:20 -0700
|
||||||
|
Subject: [PATCH] fix upstream build breakage of iscsiuio LDFLAGS
|
||||||
|
|
||||||
|
---
|
||||||
|
iscsiuio/configure.ac | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/iscsiuio/configure.ac b/iscsiuio/configure.ac
|
||||||
|
index b41df0e..a856cc5 100644
|
||||||
|
--- a/iscsiuio/configure.ac
|
||||||
|
+++ b/iscsiuio/configure.ac
|
||||||
|
@@ -67,10 +67,10 @@ AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
|
||||||
|
AC_ARG_WITH([systemd],
|
||||||
|
AS_HELP_STRING([--without-systemd], [Build without systemd]),
|
||||||
|
[case "${withval}" in
|
||||||
|
- yes) LDFLAGS="`pkg-config --libs libsystemd`" ;;
|
||||||
|
+ yes) LDFLAGS="${LDFLAGS} `pkg-config --libs libsystemd`" ;;
|
||||||
|
no) CFLAGS="${CFLAGS} -DNO_SYSTEMD" ;;
|
||||||
|
*) AC_MSG_ERROR([bad value $withval for --with-systemd]) ;;
|
||||||
|
- esac],[LDFLAGS="`pkg-config --libs libsystemd`"])
|
||||||
|
+ esac],[LDFLAGS="${LDFLAGS} `pkg-config --libs libsystemd`"])
|
||||||
|
|
||||||
|
AC_CONFIG_COMMANDS([default],[[
|
||||||
|
if [ -n "$SOURCE_DATE_EPOCH" ] ; then
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
130
0021-improve-systemd-service-files-for-boot-session-handl.patch
Normal file
130
0021-improve-systemd-service-files-for-boot-session-handl.patch
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
From 77150edd697669467ff9f8775b93bd9d7a34cadf Mon Sep 17 00:00:00 2001
|
||||||
|
From: rpm-build <rpm-build>
|
||||||
|
Date: Mon, 28 Oct 2019 10:20:56 -0700
|
||||||
|
Subject: [PATCH] improve systemd service files for boot session handling
|
||||||
|
|
||||||
|
---
|
||||||
|
etc/systemd/iscsi-mark-root-nodes | 6 +++++-
|
||||||
|
etc/systemd/iscsi-onboot.service | 15 +++++++++++++++
|
||||||
|
etc/systemd/iscsi-shutdown.service | 1 +
|
||||||
|
etc/systemd/iscsi.service | 11 ++++-------
|
||||||
|
etc/systemd/iscsid.service | 4 +---
|
||||||
|
etc/systemd/iscsiuio.service | 1 -
|
||||||
|
6 files changed, 26 insertions(+), 12 deletions(-)
|
||||||
|
create mode 100644 etc/systemd/iscsi-onboot.service
|
||||||
|
|
||||||
|
diff --git a/etc/systemd/iscsi-mark-root-nodes b/etc/systemd/iscsi-mark-root-nodes
|
||||||
|
index c693707..9d48805 100755
|
||||||
|
--- a/etc/systemd/iscsi-mark-root-nodes
|
||||||
|
+++ b/etc/systemd/iscsi-mark-root-nodes
|
||||||
|
@@ -9,7 +9,11 @@ while read t num p target flash; do
|
||||||
|
portal=${p%,*}
|
||||||
|
transport=${t%:}
|
||||||
|
|
||||||
|
- $ISCSIADM -m node -p $portal -T $target -o update -n node.startup -v onboot
|
||||||
|
+ # use session number to find the iface name in use
|
||||||
|
+ num=${num#[}; num=${num%]}
|
||||||
|
+ iface=$(iscsiadm -m session -r $num | grep iface.iscsi_ifacename | cut -d= -f2)
|
||||||
|
+
|
||||||
|
+ $ISCSIADM -m node -p $portal -T $target -I $iface -o update -n node.startup -v onboot
|
||||||
|
|
||||||
|
start_iscsid=1
|
||||||
|
|
||||||
|
diff --git a/etc/systemd/iscsi-onboot.service b/etc/systemd/iscsi-onboot.service
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..42ced68
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/etc/systemd/iscsi-onboot.service
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+[Unit]
|
||||||
|
+Description=Special handling of early boot iSCSI sessions
|
||||||
|
+Documentation=man:iscsiadm(8) man:iscsid(8)
|
||||||
|
+DefaultDependencies=no
|
||||||
|
+RefuseManualStart=true
|
||||||
|
+Before=iscsi.service
|
||||||
|
+After=systemd-remount-fs.service
|
||||||
|
+ConditionDirectoryNotEmpty=/sys/class/iscsi_session
|
||||||
|
+
|
||||||
|
+[Service]
|
||||||
|
+Type=oneshot
|
||||||
|
+ExecStart=-/usr/libexec/iscsi-mark-root-nodes
|
||||||
|
+
|
||||||
|
+[Install]
|
||||||
|
+WantedBy=sysinit.target
|
||||||
|
diff --git a/etc/systemd/iscsi-shutdown.service b/etc/systemd/iscsi-shutdown.service
|
||||||
|
index 69c1c77..caee933 100644
|
||||||
|
--- a/etc/systemd/iscsi-shutdown.service
|
||||||
|
+++ b/etc/systemd/iscsi-shutdown.service
|
||||||
|
@@ -11,4 +11,5 @@ RefuseManualStop=yes
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=true
|
||||||
|
+ExecStart=-/usr/bin/true
|
||||||
|
ExecStop=-/usr/sbin/iscsiadm -m node --logoutall=all
|
||||||
|
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
|
||||||
|
index eadfcec..175cb2c 100644
|
||||||
|
--- a/etc/systemd/iscsi.service
|
||||||
|
+++ b/etc/systemd/iscsi.service
|
||||||
|
@@ -1,21 +1,18 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Login and scanning of iSCSI devices
|
||||||
|
-Documentation=man:iscsid(8) man:iscsiadm(8)
|
||||||
|
+Documentation=man:iscsiadm(8) man:iscsid(8)
|
||||||
|
DefaultDependencies=no
|
||||||
|
-Conflicts=shutdown.target
|
||||||
|
-After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
|
||||||
|
Before=remote-fs-pre.target
|
||||||
|
+After=network.target network-online.target iscsid.service iscsiuio.service systemd-remount-fs.service
|
||||||
|
Wants=remote-fs-pre.target iscsi-shutdown.service
|
||||||
|
-ConditionDirectoryNotEmpty=|/var/lib/iscsi/nodes
|
||||||
|
-ConditionDirectoryNotEmpty=|/sys/class/iscsi_session
|
||||||
|
+ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=true
|
||||||
|
-ExecStart=-/usr/libexec/iscsi-mark-root-nodes
|
||||||
|
ExecStart=-/usr/sbin/iscsiadm -m node --loginall=automatic
|
||||||
|
ExecReload=-/usr/sbin/iscsiadm -m node --loginall=automatic
|
||||||
|
SuccessExitStatus=21
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
-WantedBy=sysinit.target
|
||||||
|
+WantedBy=remote-fs.target
|
||||||
|
diff --git a/etc/systemd/iscsid.service b/etc/systemd/iscsid.service
|
||||||
|
index 8d50cf0..28402fb 100644
|
||||||
|
--- a/etc/systemd/iscsid.service
|
||||||
|
+++ b/etc/systemd/iscsid.service
|
||||||
|
@@ -1,8 +1,7 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Open-iSCSI
|
||||||
|
-Documentation=man:iscsid(8) man:iscsiadm(8)
|
||||||
|
+Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
|
||||||
|
DefaultDependencies=no
|
||||||
|
-Conflicts=shutdown.target
|
||||||
|
After=network.target iscsiuio.service
|
||||||
|
Before=remote-fs-pre.target
|
||||||
|
|
||||||
|
@@ -10,7 +9,6 @@ Before=remote-fs-pre.target
|
||||||
|
Type=notify
|
||||||
|
NotifyAccess=main
|
||||||
|
ExecStart=/usr/sbin/iscsid -f
|
||||||
|
-ExecStop=/usr/sbin/iscsiadm -k 0 2
|
||||||
|
KillMode=mixed
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
diff --git a/etc/systemd/iscsiuio.service b/etc/systemd/iscsiuio.service
|
||||||
|
index 8620cde..fc0be93 100644
|
||||||
|
--- a/etc/systemd/iscsiuio.service
|
||||||
|
+++ b/etc/systemd/iscsiuio.service
|
||||||
|
@@ -2,7 +2,6 @@
|
||||||
|
Description=iSCSI UserSpace I/O driver
|
||||||
|
Documentation=man:iscsiuio(8)
|
||||||
|
DefaultDependencies=no
|
||||||
|
-Conflicts=shutdown.target
|
||||||
|
Requires=iscsid.service
|
||||||
|
BindTo=iscsid.service
|
||||||
|
After=network.target
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -1,25 +1,25 @@
|
|||||||
From 92aac85cf423d1c566d324255a86de0116d33015 Mon Sep 17 00:00:00 2001
|
From c589d94293f3bee77c34ca61371ddfbeef71f2af Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Mon, 21 Jan 2013 15:43:36 -0800
|
Date: Mon, 21 Jan 2013 15:43:36 -0800
|
||||||
Subject: [PATCH 20/32] use Red Hat version string to match RPM package version
|
Subject: [PATCH] use Red Hat version string to match RPM package version
|
||||||
|
|
||||||
---
|
---
|
||||||
usr/version.h | 2 +-
|
usr/version.h | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/usr/version.h b/usr/version.h
|
diff --git a/usr/version.h b/usr/version.h
|
||||||
index 4dfef4ccfb77..1334d47c6bb3 100644
|
index 615f533..a1f6cc2 100644
|
||||||
--- a/usr/version.h
|
--- a/usr/version.h
|
||||||
+++ b/usr/version.h
|
+++ b/usr/version.h
|
||||||
@@ -6,7 +6,7 @@
|
@@ -6,7 +6,7 @@
|
||||||
* This may not be the same value as the kernel versions because
|
* This may not be the same value as the kernel versions because
|
||||||
* some other maintainer could merge a patch without going through us
|
* some other maintainer could merge a patch without going through us
|
||||||
*/
|
*/
|
||||||
-#define ISCSI_VERSION_STR "2.0-876"
|
-#define ISCSI_VERSION_STR "2.1.0"
|
||||||
+#define ISCSI_VERSION_STR "6.2.0.876-1"
|
+#define ISCSI_VERSION_STR "6.2.1.0-0"
|
||||||
#define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version"
|
#define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
--
|
--
|
||||||
2.14.4
|
2.21.0
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
%global open_iscsi_version 2.0
|
%global open_iscsi_version 2.1
|
||||||
%global open_iscsi_build 876
|
%global open_iscsi_build 0
|
||||||
%global commit0 f3c8e90fc0894c088950a15ee6618b427f9e2457
|
%global commit0 4440e57a59c7f1c23bbfdcb10844017f478918b6
|
||||||
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
||||||
|
|
||||||
# Disable python2 build by default
|
# Disable python2 build by default
|
||||||
@ -9,43 +9,40 @@
|
|||||||
Summary: iSCSI daemon and utility programs
|
Summary: iSCSI daemon and utility programs
|
||||||
Name: iscsi-initiator-utils
|
Name: iscsi-initiator-utils
|
||||||
Version: 6.%{open_iscsi_version}.%{open_iscsi_build}
|
Version: 6.%{open_iscsi_version}.%{open_iscsi_build}
|
||||||
Release: 12.git%{shortcommit0}%{?dist}
|
Release: 0.git%{shortcommit0}%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.open-iscsi.org
|
URL: http://www.open-iscsi.org
|
||||||
Source0: https://github.com/open-iscsi/open-iscsi/archive/%{commit0}.tar.gz#/open-iscsi-%{shortcommit0}.tar.gz
|
Source0: https://github.com/open-iscsi/open-iscsi/archive/%{commit0}.tar.gz#/open-iscsi-%{shortcommit0}.tar.gz
|
||||||
Source4: 04-iscsi
|
Source4: 04-iscsi
|
||||||
Source5: iscsi-tmpfiles.conf
|
Source5: iscsi-tmpfiles.conf
|
||||||
|
|
||||||
Patch0001: 0001-idmb_rec_write-check-for-tpgt-first.patch
|
Patch0001: 0001-service-file-tweaks.patch
|
||||||
Patch0002: 0002-idbm_rec_write-seperate-old-and-new-style-writes.patch
|
Patch0002: 0002-idmb_rec_write-check-for-tpgt-first.patch
|
||||||
Patch0003: 0003-idbw_rec_write-pick-tpgt-from-existing-record.patch
|
Patch0003: 0003-idbm_rec_write-seperate-old-and-new-style-writes.patch
|
||||||
Patch0004: 0004-update-systemd-service-files-add-iscsi.service-for-s.patch
|
Patch0004: 0004-idbw_rec_write-pick-tpgt-from-existing-record.patch
|
||||||
Patch0005: 0005-iscsi-boot-related-service-file-updates.patch
|
Patch0005: 0005-update-initscripts-and-docs.patch
|
||||||
Patch0006: 0006-update-initscripts-and-docs.patch
|
Patch0006: 0006-use-var-for-config.patch
|
||||||
Patch0007: 0007-use-var-for-config.patch
|
Patch0007: 0007-use-red-hat-for-name.patch
|
||||||
Patch0008: 0008-use-red-hat-for-name.patch
|
Patch0008: 0008-libiscsi.patch
|
||||||
Patch0009: 0009-libiscsi.patch
|
Patch0009: 0009-Add-macros-to-release-GIL-lock.patch
|
||||||
Patch0010: 0010-remove-the-offload-boot-supported-ifdef.patch
|
Patch0010: 0010-libiscsi-introduce-sessions-API.patch
|
||||||
Patch0011: 0011-iscsiuio-systemd-unit-files.patch
|
Patch0011: 0011-libiscsi-fix-discovery-request-timeout-regression.patch
|
||||||
Patch0012: 0012-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch
|
Patch0012: 0012-libiscsi-format-security-build-errors.patch
|
||||||
Patch0013: 0013-Revert-iscsiadm-return-error-when-login-fails.patch
|
Patch0013: 0013-libiscsi-fix-build-to-use-libopeniscsiusr.patch
|
||||||
Patch0014: 0014-update-handling-of-boot-sessions.patch
|
Patch0014: 0014-libiscsi-fix-build-against-latest-upstream-again.patch
|
||||||
Patch0015: 0015-update-iscsi.service-for-boot-session-recovery.patch
|
Patch0015: 0015-remove-the-offload-boot-supported-ifdef.patch
|
||||||
Patch0016: 0016-updates-to-iscsi.service.patch
|
Patch0016: 0016-Revert-iscsiadm-return-error-when-login-fails.patch
|
||||||
Patch0017: 0017-make-session-shutdown-a-seperate-service.patch.patch
|
Patch0017: 0017-dont-install-scripts.patch
|
||||||
Patch0018: 0018-Add-macros-to-release-GIL-lock.patch
|
Patch0018: 0018-use-var-lib-iscsi-in-libopeniscsiusr.patch
|
||||||
Patch0019: 0019-libiscsi-introduce-sessions-API.patch
|
Patch0019: 0019-Coverity-scan-fixes.patch
|
||||||
Patch0020: 0020-use-Red-Hat-version-string-to-match-RPM-package-vers.patch
|
Patch0020: 0020-fix-upstream-build-breakage-of-iscsiuio-LDFLAGS.patch
|
||||||
Patch0021: 0021-libiscsi-fix-discovery-request-timeout-regression.patch
|
Patch0021: 0021-improve-systemd-service-files-for-boot-session-handl.patch
|
||||||
Patch0022: 0022-libiscsi-format-security-build-errors.patch
|
Patch0022: 0022-use-Red-Hat-version-string-to-match-RPM-package-vers.patch
|
||||||
Patch0023: 0023-libiscsi-fix-build-to-use-libopeniscsiusr.patch
|
|
||||||
Patch0024: 0024-dont-install-scripts.patch
|
|
||||||
Patch0028: 0028-use-var-lib-iscsi-in-libopeniscsiusr.patch
|
|
||||||
|
|
||||||
BuildRequires: flex bison doxygen kmod-devel systemd-units
|
BuildRequires: flex bison doxygen kmod-devel systemd-units
|
||||||
BuildRequires: autoconf automake libtool libmount-devel openssl-devel
|
BuildRequires: autoconf automake libtool libmount-devel openssl-devel
|
||||||
BuildRequires: isns-utils-devel
|
BuildRequires: isns-utils-devel
|
||||||
# For dir ownership
|
BuildRequires: systemd-devel
|
||||||
Requires: %{name}-iscsiuio >= %{version}-%{release}
|
Requires: %{name}-iscsiuio >= %{version}-%{release}
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
@ -105,7 +102,7 @@ developing applications that use %{name}.
|
|||||||
%package -n python2-%{name}
|
%package -n python2-%{name}
|
||||||
%{?python_provide:%python_provide python2-%{name}}
|
%{?python_provide:%python_provide python2-%{name}}
|
||||||
Summary: Python %{python2_version} bindings to %{name}
|
Summary: Python %{python2_version} bindings to %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-setuptools
|
BuildRequires: python2-setuptools
|
||||||
|
|
||||||
@ -117,7 +114,7 @@ libiscsi interface for interacting with %{name}
|
|||||||
%package -n python3-%{name}
|
%package -n python3-%{name}
|
||||||
%{?python_provide:%python_provide python3-%{name}}
|
%{?python_provide:%python_provide python3-%{name}}
|
||||||
Summary: Python %{python3_version} bindings to %{name}
|
Summary: Python %{python3_version} bindings to %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
@ -142,7 +139,7 @@ autoreconf --install
|
|||||||
%{configure}
|
%{configure}
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
%{__make} OPTFLAGS="%{optflags} %{?__global_ldflags} -DUSE_KMOD -lkmod"
|
%{__make} OPTFLAGS="%{optflags} %{?__global_ldflags}"
|
||||||
pushd libiscsi
|
pushd libiscsi
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
%py2_build
|
%py2_build
|
||||||
@ -339,6 +336,9 @@ fi
|
|||||||
%{python3_sitearch}/*
|
%{python3_sitearch}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 19 2019 Chris Leech <cleech@redhat.com> - 6.2.1.0-0.git4440e57
|
||||||
|
- update to upstream v2.1.0
|
||||||
|
|
||||||
* Thu Aug 22 2019 Lubomir Rintel <lkundrak@v3.sk> - 6.2.0.876-12.gitf3c8e90
|
* Thu Aug 22 2019 Lubomir Rintel <lkundrak@v3.sk> - 6.2.0.876-12.gitf3c8e90
|
||||||
- Move the NetworkManager dispatcher script out of /etc
|
- Move the NetworkManager dispatcher script out of /etc
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (open-iscsi-f3c8e90.tar.gz) = 01cda61f1654cbd874bd0a5b2a2ca272e9c33344f8f057d0b84b712ad5ce7a3149e0d229c51ff91b6c62ac76b09825346091d721f748ad872e7e535e64b55170
|
SHA512 (open-iscsi-4440e57.tar.gz) = 5f2264168977f85da4654a1a1d6777c5bb4aa3655eb350a92ee29d9cc0126e16a8c82c0e1935e682fe0c4e17b4aaa0e76a9e3fdf8496b71f2747b88fd4b57fe9
|
||||||
|
Loading…
Reference in New Issue
Block a user