rebase to upstream bug fix release to bring in doc updates and bugfixes.

This commit is contained in:
Mike Christie 2007-10-05 07:40:40 +00:00
parent fc80682a57
commit d3d8564266
7 changed files with 72 additions and 128 deletions

View File

@ -8,3 +8,4 @@ open-iscsi-6.1.1.685.tar.bz2
open-iscsi-6.2.0.695.tar.bz2 open-iscsi-6.2.0.695.tar.bz2
open-iscsi-2.0-754.tar.gz open-iscsi-2.0-754.tar.gz
open-iscsi-2.0-865.2.tar.gz open-iscsi-2.0-865.2.tar.gz
open-iscsi-2.0-865.13.tar.gz

View File

@ -1,7 +1,7 @@
diff -aurp open-iscsi-2.0-737/etc/iscsid.conf open-iscsi-2.0-737.work/etc/iscsid.conf diff -aurp open-iscsi-2.0-865/etc/iscsid.conf open-iscsi-2.0-865.work/etc/iscsid.conf
--- open-iscsi-2.0-737/etc/iscsid.conf 2006-11-22 14:21:17.000000000 -0600 --- open-iscsi-2.0-865/etc/iscsid.conf 2007-06-11 23:06:31.000000000 -0500
+++ open-iscsi-2.0-737.work/etc/iscsid.conf 2006-11-24 16:26:17.000000000 -0600 +++ open-iscsi-2.0-865.work/etc/iscsid.conf 2007-06-13 12:36:15.000000000 -0500
@@ -14,8 +14,8 @@ @@ -27,8 +27,8 @@
# To request that the iscsi initd scripts startup a session set to "automatic". # To request that the iscsi initd scripts startup a session set to "automatic".
# node.startup = automatic # node.startup = automatic
# #
@ -12,46 +12,24 @@ diff -aurp open-iscsi-2.0-737/etc/iscsid.conf open-iscsi-2.0-737.work/etc/iscsid
# ************* # *************
# CHAP Settings # CHAP Settings
diff -aurp open-iscsi-2.0-737/README open-iscsi-2.0-737.work/README diff -aurp open-iscsi-2.0-865/README open-iscsi-2.0-865.work/README
--- open-iscsi-2.0-737/README 2006-11-22 14:32:55.000000000 -0600 --- open-iscsi-2.0-865/README 2007-06-12 04:29:28.000000000 -0500
+++ open-iscsi-2.0-737.work/README 2006-11-24 16:38:37.000000000 -0600 +++ open-iscsi-2.0-865.work/README 2007-06-13 12:42:38.000000000 -0500
@@ -303,19 +303,10 @@ option. For example this would mount a i @@ -605,7 +605,7 @@ Red Hat or Fedora:
-----------------
To start open-iscsi in Red Hat/Fedora you can do:
/dev/sdb /mnt/iscsi ext3 _netdev 0 0 - service open-iscsi start
+ service iscsi start
-SUSE or Debian: To get open-iscsi to automatically start at run time you may have to
---------------- run:
-Otherwise, if there is a initd script for your distro in etc/initd that @@ -781,6 +781,8 @@ To login to all the automated nodes, sim
-gets installed with "make install" e.g /etc/init.d/open-iscsi restart. On your next startup the nodes will
- be logged into autmotically.
- /etc/init.d/open-iscsi start
-
-will usually get you started.
-
-Other:
+Manual:
------
-If there is no initd script, you must start the tools by hand. First load the
-iscsi modules with:
+If there is no initd script or you wish to run iscsi manually, you must start
+the tools by hand. First load the iscsi modules with:
modprobe -q iscsi_tcp +To set the startup value, so that nodes are not logged into automatically
+use the value "manual".
@@ -358,8 +349,6 @@ storage), it is better to automate the l
3. automate target logins for future system reboots
---------------------------------------------------
-Note: this may only work for Red Hat, Fedora and SUSE configurations
-
To automate login to a node, use the following with the record ID of the
node discovered in the discovery above:
iscsiadm -m node -T targetname -p ip:port --op update -n node.conn[0].startup -v automatic
@@ -372,7 +361,6 @@ all sessions add the following to the /e
To login to all the automated nodes, simply restart the iscsi service
e.g /etc/init.d/open-iscsi restart
-
8. TBD
======
8. iSCSI System Info
====================

View File

@ -1,78 +1,40 @@
diff -aurp open-iscsi-6.2.0.695/usr/idbm.c open-iscsi-6.2.0.695.work/usr/idbm.c diff -aurp open-iscsi-2.0-865.1/usr/idbm.c open-iscsi-2.0-865.1.work/usr/idbm.c
--- open-iscsi-6.2.0.695/usr/idbm.c 2006-10-03 13:54:51.000000000 -0500 --- open-iscsi-2.0-865.1/usr/idbm.c 2007-06-21 13:17:40.000000000 -0500
+++ open-iscsi-6.2.0.695.work/usr/idbm.c 2006-10-03 14:44:56.000000000 -0500 +++ open-iscsi-2.0-865.1.work/usr/idbm.c 2007-06-21 13:20:27.000000000 -0500
@@ -831,10 +831,18 @@ idbm_node_write(idbm_t *db, node_rec_t * @@ -2546,9 +2546,9 @@ idbm_init(char *configfile)
idbm_t *db;
idbm_lock(db); /* make sure root db dir is there */
- if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {
- snprintf(portal, PATH_MAX, "%s", NODE_CONFIG_DIR); - if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {
- if (access(portal, F_OK) != 0) { - log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT,
+ /* bah: there has to be a function to make all these subdirs for us */ + if (access(ISCSIVAR, F_OK) != 0) {
+ if (access(CONFIG_DIR, F_OK) != 0) { + if (mkdir(ISCSIVAR, 0660) != 0) {
if (mkdir(portal, 0660) != 0) { + log_error("Could not make %s %d\n", ISCSIVAR,
- log_error("Could not make %s\n", portal); errno);
+ log_error("Could not make %s %d\n", CONFIG_DIR, errno); return NULL;
+ rc = errno;
+ goto free_portal;
+ }
+ }
+
+ if (access(NODE_CONFIG_DIR, F_OK) != 0) {
+ if (mkdir(NODE_CONFIG_DIR, 0660) != 0) {
+ log_error("Could not make %s\n", NODE_CONFIG_DIR);
rc = errno;
goto free_portal;
}
@@ -869,6 +877,7 @@ free_portal:
return rc;
} }
diff -aurp open-iscsi-2.0-865.1/usr/idbm.h open-iscsi-2.0-865.1.work/usr/idbm.h
--- open-iscsi-2.0-865.1/usr/idbm.h 2007-06-21 13:18:31.000000000 -0500
+++ open-iscsi-2.0-865.1.work/usr/idbm.h 2007-06-21 13:18:41.000000000 -0500
@@ -26,12 +26,14 @@
#include "initiator.h"
#include "config.h"
+/* TODO: merged these two functions */ -#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes"
static int -#define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces"
idbm_discovery_write(idbm_t *db, discovery_rec_t *rec) -#define SLP_CONFIG_DIR ISCSI_CONFIG_ROOT"slp"
{ -#define ISNS_CONFIG_DIR ISCSI_CONFIG_ROOT"isns"
@@ -883,10 +892,18 @@ idbm_discovery_write(idbm_t *db, discove -#define STATIC_CONFIG_DIR ISCSI_CONFIG_ROOT"static"
} -#define ST_CONFIG_DIR ISCSI_CONFIG_ROOT"send_targets"
+#define ISCSIVAR "/var/lib/iscsi/"
+
+#define NODE_CONFIG_DIR ISCSIVAR"nodes"
+#define IFACE_CONFIG_DIR ISCSIVAR"ifaces"
+#define SLP_CONFIG_DIR ISCSIVAR"slp"
+#define ISNS_CONFIG_DIR ISCSIVAR"isns"
+#define STATIC_CONFIG_DIR ISCSIVAR"static"
+#define ST_CONFIG_DIR ISCSIVAR"send_targets"
#define ST_CONFIG_NAME "st_config"
idbm_lock(db); #define TYPE_INT 0
- snprintf(portal, PATH_MAX, "%s", ST_CONFIG_DIR);
- if (access(portal, F_OK) != 0) {
- if (mkdir(portal, 0660) != 0) {
- log_error("Could not make %s\n", portal);
+
+ if (access(CONFIG_DIR, F_OK) != 0) {
+ if (mkdir(CONFIG_DIR, 0660) != 0) {
+ log_error("Could not make %s %d\n", CONFIG_DIR, errno);
+ rc = errno;
+ goto free_portal;
+ }
+ }
+
+ if (access(ST_CONFIG_DIR, F_OK) != 0) {
+ if (mkdir(ST_CONFIG_DIR, 0660) != 0) {
+ log_error("Could not make %s\n", ST_CONFIG_DIR);
rc = errno;
goto free_portal;
}
diff -aurp open-iscsi-6.2.0.695/usr/initiator.h open-iscsi-6.2.0.695.work/usr/initiator.h
--- open-iscsi-6.2.0.695/usr/initiator.h 2006-10-03 13:54:51.000000000 -0500
+++ open-iscsi-6.2.0.695.work/usr/initiator.h 2006-10-03 14:08:09.000000000 -0500
@@ -31,11 +31,15 @@
#include "actor.h"
#include "queue.h"
-#define ST_CONFIG_DIR "/etc/iscsi/send_targets"
-#define NODE_CONFIG_DIR "/etc/iscsi/nodes"
+#define CONFIG_DIR "/var/lib/iscsi"
+#define ST_CONFIG_DIR "/var/lib/iscsi/send_targets"
+#define NODE_CONFIG_DIR "/var/lib/iscsi/nodes"
+
#define CONFIG_FILE "/etc/iscsi/iscsid.conf"
-#define PID_FILE "/var/run/iscsid.pid"
#define INITIATOR_NAME_FILE "/etc/iscsi/initiatorname.iscsi"
+
+#define PID_FILE "/var/run/iscsid.pid"
+
#define LOCK_DIR "/var/lock/iscsi"
#define LOCK_FILE "/var/lock/iscsi/lock"
#define LOCK_WRITE_FILE "/var/lock/iscsi/lock.write"

View File

@ -1,13 +1,12 @@
Summary: iSCSI daemon and utility programs Summary: iSCSI daemon and utility programs
Name: iscsi-initiator-utils Name: iscsi-initiator-utils
Version: 6.2.0.754 Version: 6.2.0.865
Release: 0.1%{?dist} Release: 0.2%{?dist}
Source0: http://www.open-iscsi.org/bits/open-iscsi-2.0-754.tar.gz Source0: http://www.open-iscsi.org/bits/open-iscsi-2.0-865.13.tar.gz
Source1: iscsid.init Source1: iscsid.init
Source2: iscsidevs.init Source2: iscsidevs.init
Patch0: iscsi-initiator-utils-update-initscripts-and-docs.patch Patch0: iscsi-initiator-utils-update-initscripts-and-docs.patch
Patch1: iscsi-initiator-utils-add-iscsi-iname.patch Patch1: iscsi-initiator-utils-use-var-for-config.patch
Patch2: iscsi-initiator-utils-use-var-for-config.patch
Group: System Environment/Daemons Group: System Environment/Daemons
License: GPL License: GPL
@ -25,10 +24,9 @@ for distributed disk access using SCSI commands sent over Internet
Protocol networks. Protocol networks.
%prep %prep
%setup -q -n open-iscsi-2.0-754 %setup -q -n open-iscsi-2.0-865.13
%patch0 -p1 -b .update-initscripts-and-docs %patch0 -p1 -b .update-initscripts-and-docs
%patch1 -p1 -b .add-iscsi-iname %patch1 -p1 -b .use-var-for-config
%patch2 -p1 -b .use-var-for-config
%build %build
make OPTFLAGS="%{optflags}" -C usr make OPTFLAGS="%{optflags}" -C usr
@ -91,6 +89,11 @@ fi
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %changelog
* Fri Oct 5 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.865-0.2
- Rebase to upstream's bug fix release.
- Revert init script startup changes from 225915 which reviewers did
not like.
* Mon Jun 20 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.1 * Mon Jun 20 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.1
- 225915 From Adrian Reber - Fix up spec and init files for rpmlint. - 225915 From Adrian Reber - Fix up spec and init files for rpmlint.

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# chkconfig: - 7 89 # chkconfig: 345 7 89
# description: Starts and stops the iSCSI daemon. # description: Starts and stops the iSCSI daemon.
# #
# processname: iscsid # processname: iscsid

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# chkconfig: - 13 89 # chkconfig: 345 13 89
# description: Logs into iSCSI targets needed at system startup # description: Logs into iSCSI targets needed at system startup
# #
# Source function library. # Source function library.

View File

@ -1 +1 @@
fd3ae8aee6d25fce5c43e2798412829e open-iscsi-2.0-865.2.tar.gz 54d7fd42bb5254482bc68c601c261e65 open-iscsi-2.0-865.13.tar.gz