![](https://seccdn.libravatar.org/avatar/af22e20b6884acbc89be6d7736c43e92.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package open-iscsi checked in at Fri Oct 20 14:41:15 CEST 2006. -------- --- open-iscsi/open-iscsi.changes 2006-10-06 15:19:48.000000000 +0200 +++ /mounts/work_src_done/STABLE/open-iscsi/open-iscsi.changes 2006-10-20 14:24:00.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Oct 20 14:14:33 CEST 2006 - hare@suse.de + +- Update to svn r713 +- Use /dev/urandom instead of rand() (#180837) +- Fixup init script + +------------------------------------------------------------------- Old: ---- open-iscsi.sysconfig New: ---- open-iscsi-713.diff open-iscsi-suse.diff open-iscsi-use-dev-urandom ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ open-iscsi.spec ++++++ --- /var/tmp/diff_new_pack.qvqp4n/_old 2006-10-20 14:40:09.000000000 +0200 +++ /var/tmp/diff_new_pack.qvqp4n/_new 2006-10-20 14:40:09.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package open-iscsi (Version 2.0.707) +# spec file for package open-iscsi (Version 2.0.713) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,20 +12,22 @@ Name: open-iscsi URL: http://www.open-iscsi.org -License: GPL +License: GNU General Public License (GPL) - all versions Group: Productivity/Networking/Other Prereq: %fillup_prereq %insserv_prereq Autoreqprov: on -Version: 2.0.707 +Version: 2.0.713 Release: 1 Provides: linux-iscsi Obsoletes: linux-iscsi %define iscsi_release 707 Summary: Linux* Open-iSCSI Software Initiator Source: %{name}-2.0-707.tar.gz -Source2: open-iscsi.sysconfig Source3: boot.open-iscsi Source12: iscsi-iname.c +Patch1: %{name}-713.diff +Patch2: %{name}-suse.diff +Patch3: %{name}-use-dev-urandom Patch12: %{name}-start-iscsi-after-xen Patch21: %{name}-check-active-sessions-before-delete Patch22: %{name}-iscsi-iname-Makefile.patch @@ -58,6 +60,9 @@ %prep %setup -n %{name}-2.0-707 +%patch1 -p0 +%patch2 -p0 +%patch3 -p0 %patch12 -p1 %patch22 -p1 cp %{S:12} usr/ @@ -80,8 +85,11 @@ %post %{fillup_and_insserv -Y boot.open-iscsi} -if [ ! -f /etc/initiatorname.iscsi ]; then - cat << EOF >> /etc/initiatorname.iscsi +if [ -f /etc/initiatorname.iscsi ] ; then + mv /etc/initiatorname.iscsi /etc/iscsi +fi +if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then + cat << EOF >> /etc/iscsi/initiatorname.iscsi ## DO NOT EDIT OR REMOVE THIS FILE! ## If you remove this file, the iSCSI daemon will not start. ## If you change the InitiatorName, existing access control lists @@ -90,8 +98,8 @@ EOF ISSUEDATE="1996-04" INAME=$(/sbin/iscsi-iname -p iqn.$ISSUEDATE.de.suse:01) - printf "InitiatorName=$INAME\n" >>/etc/initiatorname.iscsi - chmod 0600 /etc/initiatorname.iscsi + printf "InitiatorName=$INAME\n" >>/etc/iscsi/initiatorname.iscsi + chmod 0600 /etc/iscsi/initiatorname.iscsi fi if [ -f /var/lib/iscsi/discovery ]; then mv /var/lib/iscsi/discovery /var/lib/open-iscsi @@ -114,6 +122,10 @@ %doc %{_mandir}/man8/* %changelog -n open-iscsi +* Fri Oct 20 2006 - hare@suse.de +- Update to svn r713 +- Use /dev/urandom instead of rand() (#180837) +- Fixup init script * Fri Oct 06 2006 - hare@suse.de - Update to official version 2.0-707 * Fri Jul 28 2006 - olh@suse.de @@ -124,15 +136,15 @@ iscsid as early as possible (#176804) * Wed May 31 2006 - hare@suse.de - update to svn r595 -- Include local patches -- Fix lockup on target restart for real (#176151) + - Include local patches + - Fix lockup on target restart for real (#176151) * Mon May 22 2006 - hare@suse.de - update to svn r581 -- Fix lockup when target is restarted (#176151) + - Fix lockup when target is restarted (#176151) - Start open-iscsi after Xen (#177381) * Fri May 19 2006 - hare@suse.de - update to svn r574 -- Fix machine hang during error recovery (#174166) + - Fix machine hang during error recovery (#174166) - Display chap secrets for yast (#149055) * Tue May 02 2006 - hare@suse.de - update to svn r564 ++++++ boot.open-iscsi ++++++ --- open-iscsi/boot.open-iscsi 2006-07-28 13:19:23.000000000 +0200 +++ /mounts/work_src_done/STABLE/open-iscsi/boot.open-iscsi 2006-10-20 12:57:59.000000000 +0200 @@ -22,8 +22,6 @@ # Source LSB init functions . /etc/rc.status -. /etc/sysconfig/open-iscsi - # # This service is run right after booting. So all activated targets # must be enabled during mkinitrd run and thus should not be removed ++++++ open-iscsi-713.diff ++++++ Index: kernel/scsi_transport_iscsi.c =================================================================== --- kernel/scsi_transport_iscsi.c (revision 707) +++ kernel/scsi_transport_iscsi.c (revision 713) @@ -33,7 +33,7 @@ #define ISCSI_SESSION_ATTRS 11 #define ISCSI_CONN_ATTRS 11 #define ISCSI_HOST_ATTRS 0 -#define ISCSI_TRANSPORT_VERSION "2.0-707" +#define ISCSI_TRANSPORT_VERSION "2.0-711" struct iscsi_internal { int daemon_pid; Index: doc/iscsid.8 =================================================================== --- doc/iscsid.8 (revision 707) +++ doc/iscsid.8 (revision 713) @@ -15,11 +15,11 @@ .TP .BI [-c|--config=]\fIconfig\-file\fP Read configuration from \fIconfig\-file\fR rather than the default -\fI/etc/iscsid.conf\fR file. +\fI/etc/iscsi/iscsid.conf\fR file. .TP .BI [-i|--initiatorname=]\fIiname\-file\fP Read initiator name from \fIiname\-file\fR rather than the default -\fI/etc/initiatorname.iscsi\fR file. +\fI/etc/iscsi/initiatorname.iscsi\fR file. .TP .BI [-f|--foreground] run @@ -47,14 +47,14 @@ .SH FILES .TP -/etc/iscsid.conf +/etc/iscsi/iscsid.conf The configuration file read by .B iscsid and .B iscsiadm on startup. .TP -/etc/initiatorname.iscsi +/etc/iscsi/initiatorname.iscsi The file containing the iSCSI initiatorname and initiatoralias read by .B iscsid @@ -62,7 +62,7 @@ .B iscsiadm on startup. .TP -/var/db/iscsi/*.db +/etc/iscsi/nodes Open-iSCSI persistent configuration database .SH "SEE ALSO" Index: usr/idbm.c =================================================================== --- usr/idbm.c (revision 707) +++ usr/idbm.c (revision 713) @@ -961,15 +961,14 @@ discovery_rec_t *drec; node_rec_t *nrec; - /* sync default configuration */ - idbm_sync_config(db, 1); - /* allocate new discovery record and initialize with defaults */ drec = malloc(sizeof(discovery_rec_t)); if (!drec) { log_error("out of memory on discovery record allocation"); return NULL; } + drec->type = type; + if (drec->type == DISCOVERY_TYPE_SENDTARGETS) { memcpy(drec, &db->drec_st, sizeof(discovery_rec_t)); } else if (drec->type == DISCOVERY_TYPE_SLP) { @@ -988,7 +987,6 @@ memcpy(nrec, &db->nrec, sizeof(node_rec_t)); /* update discovery record */ - drec->type = type; if (drec->type == DISCOVERY_TYPE_SENDTARGETS) { strncpy(drec->u.sendtargets.address, ip, NI_MAXHOST); drec->u.sendtargets.port = port; @@ -1138,6 +1136,9 @@ void idbm_sendtargets_defaults(idbm_t *db, struct iscsi_sendtargets_config *cfg) { + /* sync default configuration */ + idbm_sync_config(db, 1); + memcpy(cfg, &db->drec_st.u.sendtargets, sizeof(struct iscsi_sendtargets_config)); } Index: usr/initiator.c =================================================================== --- usr/initiator.c (revision 707) +++ usr/initiator.c (revision 713) @@ -1528,6 +1528,10 @@ log_debug(6, "looking for session [%s,%s,%d]", rec->name, rec->conn[0].address, rec->conn[0].port); + if (strlen(rec->name) != strlen(targetname) || + strlen(rec->conn[0].address) != strlen(address)) + return 0; + if (!strncmp(rec->name, targetname, strlen(rec->name)) && !strncmp(rec->conn[0].address, address, strlen(rec->conn[0].address)) && Index: usr/version.h =================================================================== --- usr/version.h (revision 707) +++ usr/version.h (revision 713) @@ -6,7 +6,7 @@ * This may not be the same value as the kernel versions because * some other maintainer could merge a patch without going through us */ -#define ISCSI_VERSION_STR "2.0-707" +#define ISCSI_VERSION_STR "2.0-711" #define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version" #endif Index: etc/initd/initd.suse =================================================================== --- etc/initd/initd.suse (revision 707) +++ etc/initd/initd.suse (revision 713) @@ -15,7 +15,7 @@ ### END INIT INFO PID_FILE=/var/run/iscsi.pid -CONFIG_FILE=/etc/iscsid.conf +CONFIG_FILE=/etc/iscsi/iscsid.conf DAEMON=/sbin/iscsid ISCSIADM=/sbin/iscsiadm ARGS="-c $CONFIG_FILE -p $PID_FILE" @@ -59,7 +59,7 @@ $ISCSIADM -m session | while read line; do set ${line} TARGET=$(echo $line | cut -d" " -f4) - PORTAL=$(echo $line | cut -d" " -f3 | sed 's/,.//') + PORTAL=$(echo $line | cut -d" " -f3 | sed 's/,.*//') STARTUP=`$ISCSIADM -m node --targetname $TARGET -p $PORTAL | grep "node.conn\[0\].startup" | cut -d' ' -f3` NODE=`$ISCSIADM -m node --targetname $TARGET -p $PORTAL | grep "node.name" | cut -d' ' -f3` if [ $STARTUP != "onboot" ] ; then @@ -85,7 +85,7 @@ $ISCSIADM -m session | while read line; do set ${line} TARGET=$(echo $line | cut -d" " -f4) - PORTAL=$(echo $line | cut -d" " -f3 | sed 's/,.//') + PORTAL=$(echo $line | cut -d" " -f3 | sed 's/,.*//') NODE=`$ISCSIADM -m node --targetname $TARGET -p $PORTAL | grep "node.name" | cut -d' ' -f3` echo -e "\t$NODE" done Index: etc/initd/initd.debian =================================================================== --- etc/initd/initd.debian (revision 707) +++ etc/initd/initd.debian (revision 713) @@ -6,7 +6,7 @@ PID_FILE=/var/run/iscsid.pid CONFIG_FILE=/etc/iscsid.conf -DAEMON=/usr/sbin/iscsid +DAEMON=/sbin/iscsid PATH=/sbin:/bin:/usr/sbin:/usr/bin Index: README =================================================================== --- README (revision 707) +++ README (revision 713) @@ -123,7 +123,7 @@ Usage: iscsid [OPTION] - -c, --config=[path] Execute in the config file (/etc/iscsid.conf). + -c, --config=[path] Execute in the config file (/etc/iscsi/iscsid.conf). -f, --foreground run iscsid in the foreground -d, --debug debuglevel print debugging information -u, --uid=uid run as uid, default is current user @@ -141,10 +141,10 @@ The database contains two tables: -- Discovery table (discovery.db); -- Node table (node.db). +- Discovery table (/etc/iscsi/send_targets); +- Node table (/etc/iscsi/nodes). -The regular place for iSCSI database files: /var/db/iscsi/*.db +The regular place for iSCSI database files: /etc/iscsi/nodes The iscsiadm utility is a command-line tool to manage (update, delete, insert, query) the persistent database. @@ -250,7 +250,7 @@ 6. Configuration ================ -The default configuration file is /etc/iscsid.conf. This file contains +The default configuration file is /etc/iscsi/iscsid.conf. This file contains only configuration that could be overwritten by iSCSI Discovery, or manualy updated via iscsiadm utility. Its OK if this file does not exist in which case compiled-in default configuration will take place @@ -333,9 +333,9 @@ Once iscsi is up, you can perform discovery to targets using: iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260 -While discovery targets are kept in the discovery.db, they are +While discovery targets are kept in the discovery db, they are usefull only for re-discovery. The discovered targets (a.k.a. nodes) -are stored as records in the xxx.db. +are stored as records in the node db. The discovered targets are not logged into yet. Rather than logging into the discovered nodes (making LUs from those nodes available as @@ -350,7 +350,7 @@ iscsiadm -m node -T targetname -p ip:port --op update -n node.conn[0].startup -v automatic Or to set the "node.conn[0].statup" attribute to "startup" as default for -all sessions add the following to the /etc/iscsid.conf: +all sessions add the following to the /etc/iscsi/iscsid.conf: node.conn[0].startup = automatic ++++++ open-iscsi-suse.diff ++++++ Index: etc/initd/initd.suse =================================================================== --- etc/initd/initd.suse (revision 713) +++ etc/initd/initd.suse (working copy) @@ -23,16 +23,9 @@ # Source LSB init functions . /etc/rc.status -. /etc/sysconfig/open-iscsi - # Reset status of this service rc_reset -iscsi_discovery() -{ - $ISCSIADM -m discovery --type=$ISCSI_DISCOVERY --portal=$ISCSI_PORTAL > /dev/null -} - iscsi_login_all_nodes() { $ISCSIADM -m node 2> /dev/null | while read line; do ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org