Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package open-iscsi for openSUSE:Factory checked in at 2021-11-13 22:48:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/open-iscsi (Old) and /work/SRC/openSUSE:Factory/.open-iscsi.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "open-iscsi" Sat Nov 13 22:48:16 2021 rev:112 rq:930971 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/open-iscsi/open-iscsi.changes 2021-10-30 23:14:30.071092380 +0200 +++ /work/SRC/openSUSE:Factory/.open-iscsi.new.1890/open-iscsi.changes 2021-11-13 22:48:29.781248598 +0100 @@ -1,0 +2,8 @@ +Thu Nov 11 18:45:37 UTC 2021 - Lee Duncan <ldun...@suse.com> + +- Merged latest upstream. Mostly cleanup, but includes a fix for + iscsi-init.service when trying to write to the root volume too + early (bsc#1192568), as well as an upstream fix for possible + deadlock when dealing with sysfs. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ open-iscsi-SUSE-latest.diff.bz2 ++++++ --- /var/tmp/diff_new_pack.lR0KrD/_old 2021-11-13 22:48:30.405249076 +0100 +++ /var/tmp/diff_new_pack.lR0KrD/_new 2021-11-13 22:48:30.405249076 +0100 @@ -60,15 +60,85 @@ echo "***************************************************" ; \ echo "Setting InitiatorName to `cat $(DESTDIR)/etc/iscsi/initiatorname.iscsi`" ; \ echo "To override edit $(DESTDIR)/etc/iscsi/initiatorname.iscsi" ; \ +diff --git a/README b/README +index 508c9d7b2bfe..3e0459a38f47 100644 +--- a/README ++++ b/README +@@ -100,53 +100,20 @@ By default the kernel's iSCSI modules will be used. Running: + make + make install + +-will install the iSCSI tools iscsiadm and iscsid to /sbin. ++will install the iSCSI tools iscsiadm and iscsid to /sbin, by default, ++though that location can be overridden by passing in "sbindir", e.g. to ++install in /usr/bin instead of /sbin: + +-For 2.6.14 - 2.6.34 the modules in the kernel dir can be built and installed +-by running: ++ make sbindir="/usr/sbin" + +- make kernel +- +-When building those modules the kernel source found at +- /lib/modules/`uname -r`/build +- +-will be used to compile the open-iscsi modules. To specify a different +-kernel to build against, use: +- make kernel KSRC=<kernel-src> +- +-or to use cross-compilation: +- make kernel KSRC=<kernel-src> KARCH="ARCH=um" +- +-To compile on SUSE Linux you'll have to use +- +- make kernel KSRC=/usr/src/linux \ +- KBUILD_OUTPUT=/usr/src/linux-obj/<arch>/<config> +- +-where <config> is the kernel configuration to use (eg. 'smp'). +- +-To install the kernel modules that were built, run: +- +- make install_kernel +- +-This will copy iscsi_tcp.ko, libiscsi_tcp.ko, libiscsi.ko and +-scsi_transport_iscsi.ko to +- /lib/modules/`uname -r`/kernel/drivers/scsi/ +-overwriting existing iscsi modules. +- +-For Debian, be sure to install the linux-headers package that +-corresponds to your kernel in order to compile the kernel modules +-('aptitude install linux-headers-`uname -r`'). You may also wish to +-run 'make -C kernel/ dpkg_divert' before installing kernel modules if +-you run a Debian-provided kernel. This will use dpkg-divert(8) to +-move the packaged kernel modules out of the way, and ensure that +-future kernel upgrades will not overwrite them. +- +-Also, please be aware that the compatibility patches that enable these +-iscsi modules to run on kernels older than 2.6.25 will not update the +-ib_iser module; you may get warnings related to mismatched symbols on +-this driver, in which case you'll be unable to load ib_iser and +-open-iscsi simultaneously. ++To build and install iscsiuio, use something like: + ++ cd iscsiuio ++ touch AUTHORS NEWS ++ autoreconf --install ++ ./configure [--sbindir="/usr/sbin"] ++ make ++ make install + + 4. Open-iSCSI daemon + ==================== diff --git a/etc/systemd/iscsi-init.service b/etc/systemd/iscsi-init.service -index 34557bfa8a71..cce2526f3b73 100644 +index 34557bfa8a71..84983fabad56 100644 --- a/etc/systemd/iscsi-init.service +++ b/etc/systemd/iscsi-init.service -@@ -1,8 +1,9 @@ +@@ -1,8 +1,10 @@ [Unit] Description=One time configuration for iscsid.service ConditionPathExists=!/etc/iscsi/initiatorname.iscsi +DefaultDependencies=no ++After=root.mount [Service] Type=oneshot @@ -165,7 +235,7 @@ /* * Note: because we do not add the iface.iscsi_ifacename to diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c -index 63f9c61f7529..05219092b0fe 100644 +index 63f9c61f7529..006b188b33f8 100644 --- a/libopeniscsiusr/iface.c +++ b/libopeniscsiusr/iface.c @@ -44,7 +44,10 @@ @@ -174,12 +244,59 @@ -#define ISCSIUIO_PATH "/sbin/iscsiuio" +#ifndef SBINDIR -+#define SBINDIR "/sbin" ++#define SBINDIR "/sbin" +#endif -+#define ISCSIUIO_PATH SBINDIR "/iscsiuio" ++#define ISCSIUIO_PATH SBINDIR "/iscsiuio" struct _iscsi_net_drv { const char *net_driver_name; // Ethernet driver. +diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c +index abefde22e925..7bb834a8b8c1 100644 +--- a/usr/iscsi_sysfs.c ++++ b/usr/iscsi_sysfs.c +@@ -1929,18 +1929,41 @@ void iscsi_sysfs_set_queue_depth(void *data, int hostno, int target, int lun) + void iscsi_sysfs_set_device_online(__attribute__((unused))void *data, + int hostno, int target, int lun) + { +- char *write_buf = "running\n"; ++ char *write_buf = "running\n", *state; + char id[NAME_SIZE]; + int err; + + snprintf(id, sizeof(id), "%d:0:%d:%d", hostno, target, lun); + log_debug(4, "online device %s", id); + ++ state = sysfs_get_value(id, SCSI_SUBSYS, "state"); ++ if (!state) { ++ log_error("Could not read state for LUN %s\n", id); ++ goto set_state; ++ } ++ ++ if (!strcmp(state, "running")) ++ goto done; ++ /* ++ * The kernel can start to perform session level recovery cleanup ++ * any time after the conn start call, so we only want to change the ++ * state if we are in one of the offline states. ++ */ ++ if (strcmp(state, "offline") && strcmp(state, "transport-offline")) { ++ log_debug(4, "Dev not offline. Skip onlining %s", id); ++ goto done; ++ } ++ ++set_state: + err = sysfs_set_param(id, SCSI_SUBSYS, "state", write_buf, + strlen(write_buf)); + if (err && err != EINVAL) + /* we should read the state */ + log_error("Could not online LUN %d err %d.", lun, err); ++ ++done: ++ if (state) ++ free(state); + } + + void iscsi_sysfs_rescan_device(__attribute__((unused))void *data, diff --git a/utils/50-iscsi-firmware-login.rules b/utils/50-iscsi-firmware-login.rules index 47b3cf96f38b..9fa1e7df0bed 100644 --- a/utils/50-iscsi-firmware-login.rules