Andy Grover | 6 Feb 02:14 2015
Picon

[PATCH 0/2] Fix a bug in actor.c and add more debug stuff

Hi Mike,

Patch 1 fixes the timers to expire properly. Patch 2 adds some more debug
prints if you think that would be useful beyond the present issues.

I haven't tried digging into the original issue, but will be geting into it
tomorrow.

Andy Grover (2):
  Fix incorrect list operation leading to out-of-order items on
    pend_list
  Add some more debug logging to actor.c

 usr/actor.c | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

-- 
2.1.0

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

nicolas.ecarnot | 4 Feb 14:28 2015
Picon

Logging hanging, invalid session

Hi list,

I'm facing a similar problem as what has been discussed here in 2011 :
https://groups.google.com/d/msg/open-iscsi/pQQ8_ernzgQ/7ZVkoDmY2qYJ
but versions have since raised, so I don't know what to look at.

TL;DR :
iscsiadm -m node -T iqn.1992-04.com.emc:cx.ckm00094900174.a2 -l
...
...
-> sleeping there until I ctrl-c interrupt it.
The only error msg I get is on the console :
iscsi: invalid session 0
Specifying the SAN ip does not improve anything.

Long version :

We have a Dell PE R610 in 64bits with 4 NICs :
- em1 + em2 are bonded and dedicated to the management on a specific VLAN
- em3 and em4 are not bonded, and dedicated to the iSCSI specific VLAN

ping -I from em3 and em4 towards our Cx4-120 SAN is working, towards its two different IPs.
And the ping from the SAN is also working.

In /etc/sysctl.conf, I have :
net.ipv4.conf.em3.arp_ignore = 1
net.ipv4.conf.em4.arp_ignore = 1
net.ipv4.conf.em3.arp_announce = 2
net.ipv4.conf.em4.arp_announce = 2
net.ipv4.conf.em3.rp_filter = 0
net.ipv4.conf.em4.rp_filter = 0


iptables and selinux are off.

LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:    OracleServer
Description:    Oracle Linux Server release 6.6


The discovery sounds good :
root <at> serv3:/var/lib/iscsi# iscsiadm -m discovery -p 192.168.29.1 -t st -I default
192.168.29.1:3260,1 iqn.1992-04.com.emc:cx.ckm00094900174.a2
192.168.29.2:3260,2 iqn.1992-04.com.emc:cx.ckm00094900174.b2


The 2 NICs are NetXtreme II BCM5709 Gigabit Ethernet. They support offloading, but I'm not comfortable enough with that yet to play with it. So at present, I'd prefer just use a classical tcp transport.

Iface scanning sounds good too :
root <at> serv3:/var/lib/iscsi# iscsiadm -m iface
default tcp,<empty>,<empty>,<empty>,<empty>
iser iser,<empty>,<empty>,<empty>,<empty>
bnx2i.f0:4d:a2:07:59:91 bnx2i,f0:4d:a2:07:59:91,<empty>,<empty>,<empty>
bnx2i.00:00:00:00:00:00 bnx2i,00:00:00:00:00:00,<empty>,<empty>,<empty>
bnx2i.f0:4d:a2:07:59:95 bnx2i,f0:4d:a2:07:59:95,<empty>,<empty>,<empty>
bnx2i.f0:4d:a2:07:59:93 bnx2i,f0:4d:a2:07:59:93,<empty>,<empty>,<empty>


Other informations :
root <at> serv3:/var/lib/iscsi# rpm -qa|grep -i iscsi
iscsi-initiator-utils-6.2.0.873-2.0.2.el6.i686
root <at> serv3:/var/lib/iscsi# iscsiuio -v
iscsiuio: Version '0.7.6.1', Build Date: 'Wed May 29 14:08:11 PDT 2013'
root <at> serv3:/var/lib/iscsi# uname -a
Linux serv3 3.8.13-55.1.5.el6uek.x86_64 #2 SMP Wed Jan 28 17:03:28 PST 2015 x86_64 x86_64 x86_64 GNU/Linux


I tried to disable em4, reboot, and try a connection from a single NIC (em3), but that did nothing better.

I don't know if the fact that these NICs support offloading may disturb the simplest tcp transport way of connecting?
I must admit I'm a little blocked here, as this is not the first server I'm connecting using iscsi, but as the pings are OK, what else could I check?

Thank you.

--
Nicolas Ecarnot

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Nicolas Ecarnot | 4 Feb 14:44 2015
Picon

Logging hanging. Invalid session

Hi list,

I'm facing a similar problem as what has been discussed here in 2011 :
https://groups.google.com/d/msg/open-iscsi/pQQ8_ernzgQ/7ZVkoDmY2qYJ
but versions have since raised, so I don't know what to look at.

TL;DR :
iscsiadm -m node -T iqn.1992-04.com.emc:cx.ckm00094900174.a2 -l
...
...
-> sleeping there until I ctrl-c interrupt it.
The only error msg I get is on the console :
iscsi: invalid session 0
Specifying the SAN ip does not improve anything.

Long version :

We have a Dell PE R610 in 64bits with 4 NICs :
- em1 + em2 are bonded and dedicated to the management on a specific VLAN
- em3 and em4 are not bonded, and dedicated to the iSCSI specific VLAN

ping -I from em3 and em4 towards our EMC Cx4-120 SAN is working, towards its two different IPs.
And the ping from the SAN is also working.

In /etc/sysctl.conf, I have :
net.ipv4.conf.em3.arp_ignore = 1
net.ipv4.conf.em4.arp_ignore = 1
net.ipv4.conf.em3.arp_announce = 2
net.ipv4.conf.em4.arp_announce = 2
net.ipv4.conf.em3.rp_filter = 0
net.ipv4.conf.em4.rp_filter = 0


iptables and selinux are off.

LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:    OracleServer
Description:    Oracle Linux Server release 6.6


The discovery sounds good :
root <at> serv3:/var/lib/iscsi# iscsiadm -m discovery -p 192.168.29.1 -t st -I default
192.168.29.1:3260,1 iqn.1992-04.com.emc:cx.ckm00094900174.a2
192.168.29.2:3260,2 iqn.1992-04.com.emc:cx.ckm00094900174.b2


The 2 NICs are NetXtreme II BCM5709 Gigabit Ethernet. They support offloading, but I'm not comfortable enough with that yet to play with it. So at present, I'd prefer just use a classical tcp transport.

Iface scanning sounds good too :
root <at> serv3:/var/lib/iscsi# iscsiadm -m iface
default tcp,<empty>,<empty>,<empty>,<empty>
iser iser,<empty>,<empty>,<empty>,<empty>
bnx2i.f0:4d:a2:07:59:91 bnx2i,f0:4d:a2:07:59:91,<empty>,<empty>,<empty>
bnx2i.00:00:00:00:00:00 bnx2i,00:00:00:00:00:00,<empty>,<empty>,<empty>
bnx2i.f0:4d:a2:07:59:95 bnx2i,f0:4d:a2:07:59:95,<empty>,<empty>,<empty>
bnx2i.f0:4d:a2:07:59:93 bnx2i,f0:4d:a2:07:59:93,<empty>,<empty>,<empty>


Other informations :
root <at> serv3:/var/lib/iscsi# rpm -qa|grep -i iscsi
iscsi-initiator-utils-6.2.0.873-2.0.2.el6.i686
root <at> serv3:/var/lib/iscsi# iscsiuio -v
iscsiuio: Version '0.7.6.1', Build Date: 'Wed May 29 14:08:11 PDT 2013'
root <at> serv3:/var/lib/iscsi# uname -a
Linux serv3 3.8.13-55.1.5.el6uek.x86_64 #2 SMP Wed Jan 28 17:03:28 PST 2015 x86_64 x86_64 x86_64 GNU/Linux


I tried to disable em4, reboot, and try a connection from a single NIC (em3), but that did nothing better.

I don't know if the fact that these NICs support offloading may disturb the simplest tcp transport way of connecting?
I must admit I'm a little blocked here, as this is not the first server I'm connecting using iscsi, but as the pings are OK, what else could I check?

Thank you.

-- 
Nicolas Ecarnot

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Chris Leech | 4 Feb 01:28 2015
Picon

[PATCH] iscsid safe session logout

Implement a safe logout option, which uses libmount from util-linux to
check for active mounts (and swaps) over devices, their partitions, and
any holders (like LVM and multipath device maps).  When enabled iscsid
will refuse to logout of sessions actively being used for mounts,
returning a status of EBUSY to the ipc request.

I've made it a configuration option (iscsid.safe_logout) that defaults
to "No" to preserve the existing behavior as the default, while making
it available for users that prefer a safety check.

This does add a new dependency on libmount.

Signed-off-by: Chris Leech <cleech@...>
---
 etc/iscsid.conf |   3 +
 usr/Makefile    |   4 +-
 usr/initiator.c | 199 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 usr/sysfs.c     |  40 ++++++++++++
 usr/sysfs.h     |   4 ++
 5 files changed, 248 insertions(+), 2 deletions(-)

diff --git a/etc/iscsid.conf b/etc/iscsid.conf
index ef76dc0..6d9a5c0 100644
--- a/etc/iscsid.conf
+++ b/etc/iscsid.conf
 <at>  <at>  -22,6 +22,9  <at>  <at> 
 # Default for upstream open-iscsi scripts (uncomment to activate).
 iscsid.startup = /sbin/iscsid

+# Check for active mounts on devices reachable through a session
+# and refuse to logout if there are any.  Defaults to "No".
+# iscsid.safe_logout = Yes

 #############################
 # NIC/HBA and driver settings
diff --git a/usr/Makefile b/usr/Makefile
index 550fdff..9209d5d 100644
--- a/usr/Makefile
+++ b/usr/Makefile
 <at>  <at>  -55,14 +55,14  <at>  <at>  all: $(PROGRAMS)

 iscsid: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \
 	iscsid.o session_mgmt.o discoveryd.o
-	$(CC) $(CFLAGS) $^ -o $ <at>   -L../utils/open-isns -lisns -lrt
+	$(CC) $(CFLAGS) $^ -o $ <at>   -L../utils/open-isns -lisns -lrt -lmount

 iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o
 	$(CC) $(CFLAGS) $^ -o $ <at>  -L../utils/open-isns -lisns

 iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
 		iscsistart.o statics.o
-	$(CC) $(CFLAGS) -static $^ -o $ <at>  -lrt
+	$(CC) $(CFLAGS) $^ -o $ <at>  -lrt -lmount
 clean:
 	rm -f *.o $(PROGRAMS) .depend $(LIBSYS)

diff --git a/usr/initiator.c b/usr/initiator.c
index 1aadc9b..bedc4a8 100644
--- a/usr/initiator.c
+++ b/usr/initiator.c
 <at>  <at>  -30,6 +30,7  <at>  <at> 
 #include <errno.h>
 #include <dirent.h>
 #include <fcntl.h>
+#include <libmount/libmount.h>

 #include "initiator.h"
 #include "transport.h"
 <at>  <at>  -2140,11 +2141,200  <at>  <at>  static int session_unbind(struct iscsi_session *session)
 	return err;
 }

+static struct libmnt_table *mtab, *swaps;
+
+static void libmount_cleanup(void)
+{
+	mnt_free_table(mtab);
+	mnt_free_table(swaps);
+	mtab = swaps = NULL;
+}
+
+static int libmount_init(void)
+{
+	mnt_init_debug(0);
+	mtab = mnt_new_table();
+	swaps = mnt_new_table();
+	if (!mtab || !swaps) {
+		libmount_cleanup();
+		return -ENOMEM;
+	}
+	mnt_table_parse_mtab(mtab, NULL);
+	mnt_table_parse_swaps(swaps, NULL);
+	return 0;
+}
+
+static int trans_filter(const struct dirent *d)
+{
+	if (!strcmp(".", d->d_name) || !strcmp("..", d->d_name))
+		return 0;
+	return 1;
+}
+
+static int subdir_filter(const struct dirent *d)
+{
+	if (!(d->d_type & DT_DIR))
+		return 0;
+	return trans_filter(d);
+}
+
+static int is_partition(const char *path)
+{
+	char *devtype;
+	int rc = 0;
+
+	devtype = sysfs_get_uevent_devtype(path);
+	if (!devtype)
+		return 0;
+	if (strcmp(devtype, "partition") == 0)
+		rc = 1;
+	free(devtype);
+	return rc;
+}
+
+static int blockdev_check_mnts(char *syspath)
+{
+	struct libmnt_fs *fs;
+	char *devname = NULL;
+	char *_devname = NULL;
+	int rc = 0;
+
+	devname = sysfs_get_uevent_devname(syspath);
+	if (!devname)
+		goto out;
+
+	_devname = calloc(1, PATH_MAX);
+	if (!_devname)
+		goto out;
+	snprintf(_devname, PATH_MAX, "/dev/%s", devname);
+
+	fs = mnt_table_find_source(mtab, _devname, MNT_ITER_FORWARD);
+	if (fs) {
+		rc = 1;
+		goto out;
+	}
+	fs = mnt_table_find_source(swaps, _devname, MNT_ITER_FORWARD);
+	if (fs)
+		rc = 1;
+out:
+	free(devname);
+	free(_devname);
+	return rc;
+}
+
+static int count_device_users(char *syspath);
+
+static int blockdev_get_partitions(char *syspath)
+{
+	struct dirent **parts = NULL;
+	int n, i;
+	int count = 0;
+
+	n = scandir(syspath, &parts, subdir_filter, alphasort);
+	for (i = 0; i < n; i++) {
+		char *newpath;
+
+		newpath = calloc(1, PATH_MAX);
+		if (!newpath)
+			continue;
+		snprintf(newpath, PATH_MAX, "%s/%s", syspath, parts[i]->d_name);
+		free(parts[i]);
+		if (is_partition(newpath)) {
+			count += count_device_users(newpath);
+		}
+		free(newpath);
+	}
+	free(parts);
+	return count;
+}
+
+static int blockdev_get_holders(char *syspath)
+{
+	char *path = NULL;
+	struct dirent **holds = NULL;
+	int n, i;
+	int count = 0;
+
+	path = calloc(1, PATH_MAX);
+	if (!path)
+		return 0;
+	snprintf(path, PATH_MAX, "%s/holders", syspath);
+
+	n = scandir(path, &holds, trans_filter, alphasort);
+	for (i = 0; i < n; i++) {
+		char *newpath;
+		char *rp;
+
+		newpath = calloc(1, PATH_MAX);
+		if (!newpath)
+			continue;
+		snprintf(newpath, PATH_MAX, "%s/%s", path, holds[i]->d_name);
+
+		free(holds[i]);
+		rp = realpath(newpath, NULL);
+		if (rp)
+			count += count_device_users(rp);
+		free(newpath);
+		free(rp);
+	}
+	free(path);
+	free(holds);
+	return count;
+}
+
+static int count_device_users(char *syspath)
+{
+	int count = 0;
+	count += blockdev_check_mnts(syspath);
+	count += blockdev_get_partitions(syspath);
+	count += blockdev_get_holders(syspath);
+	return count;
+};
+
+static void device_in_use(void *data, int host_no, int target, int lun)
+{
+	char *syspath = NULL;
+	char *devname = NULL;
+	int *count = data;
+
+	devname = iscsi_sysfs_get_blockdev_from_lun(host_no, target, lun);
+	if (!devname)
+		goto out;
+	syspath = calloc(1, PATH_MAX);
+	if (!syspath)
+		goto out;
+	snprintf(syspath, PATH_MAX, "/sys/class/block/%s", devname);
+	*count += count_device_users(syspath);
+out:
+	free(syspath);
+	free(devname);
+}
+
+static int session_in_use(int sid)
+{
+	int host_no = -1, err = 0;
+	int count = 0;
+
+	if (libmount_init()) {
+		log_error("Failed to initialize libmount, "
+			  "not checking for active mounts on session [%d].\n", sid);
+		return 0;
+	}
+
+	host_no = iscsi_sysfs_get_host_no_from_sid(sid, &err);
+	if (!err)
+		iscsi_sysfs_for_each_device(&count, host_no, sid, device_in_use);
+
+	libmount_cleanup();
+	return count;
+}
+
 int session_logout_task(int sid, queue_task_t *qtask)
 {
 	iscsi_session_t *session;
 	iscsi_conn_t *conn;
 	int rc = ISCSI_SUCCESS;
+	char *safe;

 	session = session_find_by_sid(sid);
 	if (!session) {
 <at>  <at>  -2167,6 +2357,15  <at>  <at>  invalid_state:
 		return ISCSI_ERR_INTERNAL;
 	}

+	safe = cfg_get_string_param(dconfig->config_file, "iscsid.safe_logout");
+	if (safe && !strcmp(safe, "Yes") && session_in_use(sid)) {
+		log_error("Session is actively in use for mounted storage, "
+			  "and iscsid.safe_logout is configured.\n");
+		free(safe);
+		return ISCSI_ERR_BUSY;
+	}
+	free(safe);
+
 	/* FIXME: logout all active connections */
 	conn = &session->conn[0];
 	if (conn->logout_qtask)
diff --git a/usr/sysfs.c b/usr/sysfs.c
index d00c925..bbb00c0 100644
--- a/usr/sysfs.c
+++ b/usr/sysfs.c
 <at>  <at>  -709,3 +709,43  <at>  <at>  int sysfs_set_param(char *id, char *subsys, char *attr_name,
 	close(fd);
 	return rc;
 }
+
+char *sysfs_get_uevent_field(const char *path, const char *field)
+{
+	char *uevent_path = NULL;
+	FILE *f = NULL;
+	char *line, buffer[1024];
+	char *ff, *d;
+	char *out = NULL;
+
+	uevent_path = calloc(1, PATH_MAX);
+	if (!uevent_path)
+		return NULL;
+	snprintf(uevent_path, PATH_MAX, "%s/uevent", path);
+
+	f = fopen(uevent_path, "r");
+	if (!f)
+		goto out;
+	while ((line = fgets(buffer, sizeof (buffer), f))) {
+		ff = strtok(line, "=");
+		d = strtok(NULL, "\n");
+		if (strcmp(ff, field))
+			continue;
+		out = strdup(d);
+		break;
+	}
+	fclose(f);
+out:
+	free(uevent_path);
+	return out;
+}
+
+char *sysfs_get_uevent_devtype(const char *path)
+{
+	return sysfs_get_uevent_field(path, "DEVTYPE");
+}
+
+char *sysfs_get_uevent_devname(const char *path)
+{
+	return sysfs_get_uevent_field(path, "DEVNAME");
+}
diff --git a/usr/sysfs.h b/usr/sysfs.h
index 304dbbf..462060e 100644
--- a/usr/sysfs.h
+++ b/usr/sysfs.h
 <at>  <at>  -66,4 +66,8  <at>  <at>  extern int sysfs_get_uint16(char *id, char *subsys, char *param,
 extern int sysfs_set_param(char *id, char *subsys, char *attr_name,
 			   char *write_buf, ssize_t buf_size);

+extern char *sysfs_get_uevent_field(const char *path, const char *field);
+extern char *sysfs_get_uevent_devtype(const char *path);
+extern char *sysfs_get_uevent_devname(const char *path);
+
 #endif
-- 
2.1.0

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

The Lee-Man | 30 Jan 23:09 2015
Picon

iscsid stop using system not working correctly

Hi Mike:

Just a heads up that stopping the open-iscsi iscsid daemon using systemd doesn't seem to be working correctly, at least not on SUSE SLE 12.

When I have one or more sessions present, and their startup value is set to "manual", when I try to stop the iscsid service, I get:

    # systemctl stop iscsid.service
    Job for iscsid.service canceled.

And a "ps" shows that iscsid is still running, but under a new process id. And, at times, I see that "iscsiadm -k 0 2" is hung.

Note that my systemd iscsid.service unit file looks like:

    [Unit]
    Description=Open-iSCSI
    Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
    DefaultDependencies=no
    After=network.target iscsiuio.service
    Before=remote-fs-pre.target

    [Service]
    Type=simple
    ExecStart=/sbin/iscsid -f
    ExecStop=/sbin/iscsiadm -k 0 2

    [Install]
    WantedBy=multi-user.target
    Also=iscsid.socket

While trying to track down this problem, I found a couple of issues:

1. I don't know what the "2" is on the "iscsiadm -k 0 2" is for. I see that command in systemd unit file in your master branch, and I see that other distributions use that, but the "2" seems to be ignored.

2. It looks like the "iscsiadm -k 0" is stopping the iscsi daemon, but that systemd is restarting it! I'm guessing this because (a) I get the "cancelled" message, and (b) iscsid is still running, but as a new process, i.e. it's been restarted.

I thought perhaps the problem was related to running iscsid as a "simple" service, in the foreground, but changing Type to forking and removing the "-f" from the iscsid command line did not change anything.

Then I simply commented out the "ExecStop" line, and iscsid now shutdowns correctly. This, I believe, is because systemd is shutting it down by sending first SIGHUP then SIGKILL, as per "man systemd.kill".

Before I comment out the "ExecStop=" for all SLE 12 users, I wondered if you've heard of any problems along these lines.

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Or Gerlitz | 21 Jan 15:19 2015

setting declarative params after login?

Hi Mike,

Long time.. hope you are all well after EOY holidays and with energy to 
for the MCS debates  <at>  LSF...

So back in upstream commit ea05be3ff043efd44256283d968fa1bb9a371568 
"iscsi tools: set non negotiated params early" we are
doing set_param towards the kernel/transport before sending the login 
request.

Running with latest upstream (commit 
76a441ba0dc0071a19daeac456aa898889437efd) we did dump of all set_params 
done towards iser and I see that Max Recv DSL and friends are set after 
sending the login, in both discovery and normal sessions (see below), is 
that a bug? aren't they declarative?

Or.

Discovery session param 43 value 0

scsi host11: iSCSI Initiator over iSER
iser: iscsi_iser_conn_bind: binding iscsi conn ffff880212309ca8 to 
iser_conn ffff880216838000
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 18 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 26 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 27 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 28 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 35 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 30 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 31 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 32 buf iser
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 34 buf 
iqn.1994-05.com.redhat:afa6a392a57a
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 43 buf 1
iser: iscsi_iser_mtask_xmit: mtask xmit [cid 0 itt 0x0]
iser: iser_send_control: op 43 dsl f4, posting login rx buffer
iser: iser_post_rx_bufs: req op 43 flags 87
iser: iser_post_rx_bufs: Discovery session, re-using login RX buffer
iser: iser_cq_tasklet_fn: got 1 completions
iser: iser_rcv_completion: op 0x23 itt 0x0 dlen 142
iser: iser_cq_tasklet_fn: got 1 completions
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 0 buf 8192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 
ISCSI_PARAM_MAX_RECV_DLENGTH size 8192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 1 buf 8192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 4 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 5 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 6 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 7 buf 262144
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 8 buf 16776192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 9 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 10 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 11 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 14 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 16 buf 1

Normal session param 43 value 0

iser: iscsi_iser_conn_bind: binding iscsi conn ffff8800c04394a8 to 
iser_conn ffff8800c147a000
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 15 buf 
iqn.2001-04.com.r-dcs53-tgt-2
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 17 buf 
192.168.20.18
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 18 buf 3260
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 26 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 27 buf 15
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 28 buf 30
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 35 buf 30
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 30 buf 5
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 31 buf 5
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 32 buf iser
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 34 buf 
iqn.1994-05.com.redhat:afa6a392a57a
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 43 buf 0
iser: iscsi_iser_mtask_xmit: mtask xmit [cid 0 itt 0x0]
iser: iser_send_control: op 43 dsl 1d4, posting login rx buffer
iser: iser_post_rx_bufs: req op 43 flags 87
iser: iser_post_rx_bufs: Normal session, posting batch of RX 32 buffers
iser: iser_cq_tasklet_fn: got 1 completions
iser: iser_rcv_completion: op 0x23 itt 0x0 dlen 355
iser: iser_cq_tasklet_fn: got 1 completions
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 0 buf 262144
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 
ISCSI_PARAM_MAX_RECV_DLENGTH size 262144
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 1 buf 8192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 4 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 5 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 6 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 7 buf 65536
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 8 buf 262144
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 9 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 10 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 11 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 14 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 16 buf 1

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Or Gerlitz | 21 Jan 15:19 2015

setting declarative params after login?

Hi Mike,

Long time.. hope you are all well after EOY holidays and with energy to 
for the MCS debates  <at>  LSF...

So back in upstream commit ea05be3ff043efd44256283d968fa1bb9a371568 
"iscsi tools: set non negotiated params early" we are
doing set_param towards the kernel/transport before sending the login 
request.

Running with latest upstream (commit 
76a441ba0dc0071a19daeac456aa898889437efd) we did dump of all set_params 
done towards iser and I see that Max Recv DSL and friends are set after 
sending the login, in both discovery and normal sessions (see below), is 
that a bug? aren't they declarative?

Or.

Discovery session patam 43 value 0

scsi host11: iSCSI Initiator over iSER
iser: iscsi_iser_conn_bind: binding iscsi conn ffff880212309ca8 to 
iser_conn ffff880216838000
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 18 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 26 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 27 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 28 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 35 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 30 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 31 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 32 buf iser
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 34 buf 
iqn.1994-05.com.redhat:afa6a392a57a
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 43 buf 1
iser: iscsi_iser_mtask_xmit: mtask xmit [cid 0 itt 0x0]
iser: iser_send_control: op 43 dsl f4, posting login rx buffer
iser: iser_post_rx_bufs: req op 43 flags 87
iser: iser_post_rx_bufs: Discovery session, re-using login RX buffer
iser: iser_cq_tasklet_fn: got 1 completions
iser: iser_rcv_completion: op 0x23 itt 0x0 dlen 142
iser: iser_cq_tasklet_fn: got 1 completions
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 0 buf 8192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 
ISCSI_PARAM_MAX_RECV_DLENGTH size 8192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 1 buf 8192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 4 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 5 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 6 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 7 buf 262144
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 8 buf 16776192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 9 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 10 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 11 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 14 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 16 buf 1

Normal session patam 43 value 0
iser: iscsi_iser_conn_bind: binding iscsi conn ffff8800c04394a8 to 
iser_conn ffff8800c147a000
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 15 buf 
iqn.2001-04.com.r-dcs53-tgt-2
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 17 buf 
192.168.20.18
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 18 buf 3260
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 26 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 27 buf 15
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 28 buf 30
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 35 buf 30
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 30 buf 5
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 31 buf 5
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 32 buf iser
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 34 buf 
iqn.1994-05.com.redhat:afa6a392a57a
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 43 buf 0
iser: iscsi_iser_mtask_xmit: mtask xmit [cid 0 itt 0x0]
iser: iser_send_control: op 43 dsl 1d4, posting login rx buffer
iser: iser_post_rx_bufs: req op 43 flags 87
iser: iser_post_rx_bufs: Normal session, posting batch of RX 32 buffers
iser: iser_cq_tasklet_fn: got 1 completions
iser: iser_rcv_completion: op 0x23 itt 0x0 dlen 355
iser: iser_cq_tasklet_fn: got 1 completions
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 0 buf 262144
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 
ISCSI_PARAM_MAX_RECV_DLENGTH size 262144
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 1 buf 8192
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 4 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 5 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 6 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 7 buf 65536
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 8 buf 262144
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 9 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 10 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 11 buf 0
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 14 buf 1
iser: iscsi_iser_set_param: iscsi_iser_set_param called for 16 buf 1

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Heinrich Schuchardt | 19 Jan 19:54 2015
Picon
Picon

[PATCH 1/1] Kernel include path

The path to the kernel include files is given by
/lib/modules/`uname -r`/build
on Debian.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@...>
---
 README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README b/README
index 06d1b6f..ef97140 100644
--- a/README
+++ b/README
 <at>  <at>  -92,7 +92,7  <at>  <at>  by running:
 	make kernel

 When building those modules the kernel source found at
-/lib/modules/`uname -a`/build
+/lib/modules/`uname -r`/build
 will be used to compile the open-iscsi modules. To specify a different
 kernel to build against use:

-- 
2.1.4

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Ulrich Windl | 16 Jan 15:23 2015
Picon

Q: automatic remove of down devices?

Hello!

Today we rebooted our FibreChannel storage that is accessed via iSCSI. Since then (the storage is up again)
syslog is filled with messages like these:
...
Jan 16 14:30:31 o1 multipathd: VM-E2: sdbs - tur checker reports path is down
Jan 16 14:30:31 o1 multipathd: cLVM-E2: sdbw - tur checker reports path is down
Jan 16 14:30:31 o1 iscsid: conn 0 login rejected: target error (03/01)
Jan 16 14:30:31 o1 iscsid: conn 0 login rejected: target error (03/01)
Jan 16 14:30:31 o1 iscsid: conn 0 login rejected: target error (03/01)
Jan 16 14:30:31 o1 iscsid: conn 0 login rejected: target error (03/01)
Jan 16 14:30:31 o1 iscsid: conn 0 login rejected: target error (03/01)
Jan 16 14:30:31 o1 iscsid: conn 0 login rejected: target error (03/01)
...

Shortly after the storage was down I saw these messages in syslog:
Jan 16 13:22:01 o1 kernel: [781809.177434] device-mapper: multipath: Failing path 68:192.
Jan 16 13:22:02 o1 multipathd: sdbi: No fc_remote_port device for 'rport-24:0-0'
Jan 16 13:22:03 o1 multipathd: sdd: No fc_remote_port device for 'rport-5:0-0'

So I guess multipathd tries to remove the down device, but fails to realize that it's an iSCSI (not FC) device.
So is this (removal of stale devices) possible?

I tried a "rescan-scsi-bus.sh -r", but still I see these:
Jan 16 14:34:27 o1 iscsid: conn 0 login rejected: target error (03/01)
Jan 16 14:34:27 o1 iscsid: conn 0 login rejected: target error (03/01)

(The iSCSI gateway was never restarted; just the FC- backend)

Is this a problem in open-iscsi (SLES11 SP3: open-iscsi-2.0.873-0.23.1)? (After Reboot everything
looked clean again)

Regards,
Ulrich

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Chris Leech | 12 Jan 20:24 2015
Picon

small set of minor fixes

Clearing out the backlog of a few minor issues, and the iscsiuio socket
activation support.

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Thomas Dwyer III | 10 Jan 03:28 2015

bind_src_by_address() is disabled?

Hi folks,

I spent some time browsing through this forum but I was unable to find an explanation for this comment referring to the disabled bind_src_by_address() function in io.c:
This is not supported for now, because it is not exactly what we want.
It also turns out that targets will send packets to other interfaces
causing all types of weird things to happen.
I found several posts from people referring to this specific comment but I did not find an explanation. Is it possible that the author of this comment was referring to the ARP flux issue, which may cause a target to associate the bound IP address with the MAC address from an interface other than the one specified with SO_BINDTODEVICE? If so, I don't see how avoiding the call to bind() solves this problem. I would appreciate a reply from anyone who might know what "weird things" means in this context.


Thanks!
Tom.III

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Gmane