The Lee-Man | 31 Oct 02:16 2014
Picon

[PATCHES] Fixup iBFT and IPv6, some cleanup

Hi Mike:

Attached are 5 patches. These are based on the patch set I sent in September
of this year.

0001-Code-cleanup-no-functional-changes.patch

    I broke out the cleanup changes, as you requested


0002-Represent-DHCP-origin-as-an-integer-not-string.patch

    This just changes the "origin" attribute from a string, to a number, which
    is what it really is.


0003-fwparam_ibft-Check-iBFT-target-and-NIC-flags.patch

    This was the patch that you had problems with last time, and
    for good reason, as it checks iBFT flags for Bit-0, as per the
    iBFT standard, but as you pointed out many adapters don't
    follow the standard and instead set Bit-1. So now we just check
    for any bit being set. This *has* been tested with more adapters.
    Good catch on the first version.

0004-Fixup-IPv6-iBFT-interface-description.patch

    This patch adds "prefix-len" to the open-iscsi attributes, as it
    is needed for IPv6, which doesn't use "mask" like IPv4 does.


0005-Allow-modifications-for-iface.gateway-and-iface.subn.patch

    This patch just allows gateway and subnet to be even if the
    target isn't connected to the local network.




--
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.
Anish Bhatt | 24 Oct 21:33 2014

[RFC] Adding hardware transport support to openstack

I’m currently working on adding open-iscsi hardware transport support to openstack. The iscsiadm component resides in nova.

 

As far as I know, iscsiadm has no way to automatically figuring out what transport to use based simply on on a remote portal/iqn/ip without some sort of manual discovery. Hence, my current approach is to provide a transport parameter in the openstack config file where you specify what iface file to use  and perhaps the ip address as well. If anyone has a suggestion for a better approach to this, please let me know.

 

Initial spec has been posted for review at https://review.openstack.org/#/c/130721/

-Anish

 

One socket to bind them all.

 

--
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.

Laurent HENRY | 22 Oct 18:39 2014
Picon

twice mounted LUN with iscsiadm login ?

Hello,
      I am noticing a strange behavior with one of my Linux server (Opensuse 
13.1 with open-iscsi)

While connecting manually to a iscsi node, my lun is getting mounted twice. 
This produce troubles on my iscsi disk array, which refuse a multihost request 
(and i don't want to allow it either).

I think the reason is my disk array (dell equallogic) announce every lun 
twice, i don't know why.

Here is an example:

# iscsiadm -m discovery -t sendtargets -p 192.168.99.55|grep 13.1-orig

192.168.99.55:3260,1 iqn.2001-05.com.equallogic:4-52aed6-a9251e6aa-
f437080d41b5434f-13-1-orig
192.168.99.55:3260,1 iqn.2001-05.com.equallogic:4-52aed6-a9251e6aa-
f437080d41b5434f-13-1-orig

# iscsiadm -m session|grep 13-1-orig
# 

 # iscsiadm -m node -T iqn.2001-05.com.equallogic:4-52aed6-a9251e6aa-
f437080d41b5434f-13-1-orig –p 192.168.99.55:3260 --login

Logging in to [iface: libvirt-iface-33d9c275, target: 
iqn.2001-05.com.equallogic:4-52aed6-a9251e6aa-f437080d41b5434f-13-1-orig, 
portal: 192.168.99.55,3260] (multiple)

Logging in to [iface: libvirt-iface-08bf216d, target: 
iqn.2001-05.com.equallogic:4-52aed6-a9251e6aa-f437080d41b5434f-13-1-orig, 
portal: 192.168.99.55,3260] (multiple)

Login to [iface: libvirt-iface-33d9c275, target: 
iqn.2001-05.com.equallogic:4-52aed6-a9251e6aa-f437080d41b5434f-13-1-orig, 
portal: 192.168.99.55,3260] successful.

Login to [iface: libvirt-iface-08bf216d, target: 
iqn.2001-05.com.equallogic:4-52aed6-a9251e6aa-f437080d41b5434f-13-1-orig, 
portal: 192.168.99.55,3260] successful.

# iscsiadm -m session|grep 13-1-orig

tcp: [16] 192.168.99.55:3260,1 iqn.2001-05.com.equallogic:4-52aed6-a9251e6aa-
f437080d41b5434f-13-1-orig

tcp: [17] 192.168.99.55:3260,1 iqn.2001-05.com.equallogic:4-52aed6-a9251e6aa-
f437080d41b5434f-13-1-orig

Does anyone could help me to understand what is going on ?
I think the issue is with equallogic targer more than with server but i never 
configured it that way and i never encountered such settings in its config.

Regards

--

-- 
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.

木木夕 | 21 Oct 04:44 2014
Picon

How do i calculate the time delay of iscsi target ,please?

Hey all,
i build an iSCSI Enterprise Target, and use open-iscsi initiator to login,which works well.
now i want to know the response time of the target, where can i get that? or in which function should i add something in IET to calculate the response time ?
for example:
one read request comes to target from initiator ,then the target accepts that and returns a response to initiator. can i get the time from request to response?
any answer will be appreciated, thank you!
best regards!

--
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.
Tomoaki Nishimura | 18 Oct 00:37 2014
Picon

[RFC][PATCH] Add user interface for dynamic reconfiguration

This patch is a prototype for dynamic reconfiguration (USERSPACE TODO ITEM #3).
This patch defines some parameters update interface in iscsiadm session mode.

Examples of the user interface in this patch is as follows.

 # iscsiadm -m session -o update -n PARAM_NAME -v VALUE
 => Update node DB and session parameter in all running sessions.

 # iscsiadm -m session -o nonpersistent -n PARAM_NAME -v VALUE
 => Update session parameter in all running sessions (not update node DB).

 # iscsiadm -m session -o update -n PARAM_NAME -v VALUE -r SESSION_ID
 => Update node DB and session parameter in a specified session.

 # iscsiadm -m session -o nonpersistent -n PARAM_NAME -v VALUE -r SESSION_ID
 => Update session parameter in a specified session (not update node DB).

This patch makes following parameters to be modifiable in running session.

 node.session.timeo.replacement_timeout
 node.session.iscsi.FastAbort
 node.session.err_timeo.abort_timeout
 node.session.err_timeo.lu_reset_timeout
 node.conn[0].timeo.noop_out_timeout
 node.conn[0].timeo.noop_out_interval

There is a concern about the user interface in this patch.
Currently following option is drop down to node ops in iscsiadm. 

 # iscsiadm -m session -o update -n PARAM_NAME -v VALUE 

So I'm worried about modifying a session parameter unintentionally. 
But I can't come up with the better user interface.

Any comments are welcome.

Signed-off-by: Tomoaki Nishimura <t-nishimura@...>
---
 usr/iscsiadm.c | 192 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 usr/mgmt_ipc.c |  33 ++++++++++
 usr/mgmt_ipc.h |   1 +
 3 files changed, 222 insertions(+), 4 deletions(-)

diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index f886d39..a7b6109 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
 <at>  <at>  -29,6 +29,7  <at>  <at> 
 #include <signal.h>
 #include <time.h>
 #include <sys/stat.h>
+#include <dirent.h>

 #include "initiator.h"
 #include "discovery.h"
 <at>  <at>  -3209,6 +3210,166  <at>  <at>  ping_exit:
 	return rc;
 }

+static int
+session_set_rec_from_params(node_rec_t *rec, struct list_head *params)
+{
+	int rc;
+	struct user_param *param;
+	char id[256];
+
+	rc = verify_node_params(params, rec);
+	if (rc)
+		return rc;
+
+	snprintf(id, sizeof(id), "session%d", rec->session.sid);
+	sysfs_get_int(id, "iscsi_session", "recovery_tmo",
+			&rec->session.timeo.replacement_timeout);
+	sysfs_get_int(id, "iscsi_session", "fast_abort",
+			&rec->session.iscsi.FastAbort);
+	sysfs_get_int(id, "iscsi_session", "abort_tmo",
+			&rec->session.err_timeo.abort_timeout);
+	sysfs_get_int(id, "iscsi_session", "lu_reset_tmo",
+			&rec->session.err_timeo.lu_reset_timeout);
+
+	snprintf(id, sizeof(id), "connection%d:0", rec->session.sid);
+	sysfs_get_int(id, "iscsi_connection", "ping_tmo",
+			&rec->conn[0].timeo.noop_out_timeout);
+	sysfs_get_int(id, "iscsi_connection", "recv_tmo",
+			&rec->conn[0].timeo.noop_out_interval);
+
+	list_for_each_entry(param, params, list) {
+		if (strcmp(param->name,
+			"node.session.timeo.replacement_timeout") == 0) {
+			rec->session.timeo.replacement_timeout =
+				strtoul(param->value, NULL, 10);
+		} else if (strcmp(param->name,
+			"node.session.iscsi.FastAbort") == 0) {
+			if (strcmp(param->value, "Yes") == 0) {
+				rec->session.iscsi.FastAbort = 1;
+			} else if (strcmp(param->value, "No") == 0) {
+				rec->session.iscsi.FastAbort = 0;
+			}
+		} else if (strcmp(param->name,
+			"node.session.err_timeo.abort_timeout") == 0) {
+			rec->session.err_timeo.abort_timeout =
+				strtoul(param->value, NULL, 10);
+		} else if (strcmp(param->name,
+			"node.session.err_timeo.lu_reset_timeout") == 0) {
+			rec->session.err_timeo.lu_reset_timeout =
+				strtoul(param->value, NULL, 10);
+		} else if (strcmp(param->name,
+			"node.conn[0].timeo.noop_out_timeout") == 0) {
+			rec->conn[0].timeo.noop_out_timeout =
+				strtoul(param->value, NULL, 10);
+		} else if (strcmp(param->name,
+			"node.conn[0].timeo.noop_out_interval")	== 0) {
+			rec->conn[0].timeo.noop_out_interval =
+				strtoul(param->value, NULL, 10);
+		} else {
+			printf("%s is not supported in session update\n",
+				param->name);
+			return -1;
+		}
+	}
+	return 0;
+}
+
+static int session_update(node_rec_t *node_rec, struct session_info *info)
+{
+	int rc;
+	iscsiadm_req_t req;
+	iscsiadm_req_t rsp;
+
+	if (!iscsi_match_session(node_rec, info))
+		return -1;
+	/*
+	rc = iscsid_req_by_rec(MGMT_IPC_SESSION_UPDATE, rec);
+	*/
+	req.command = MGMT_IPC_SESSION_UPDATE;
+	req.u.session.sid = info->sid;
+	memcpy(&req.u.session.rec, node_rec, sizeof(node_rec_t));
+
+	rc = iscsid_exec_req(&req, &rsp, 1);
+	if (rc)
+		return rc;
+
+	printf("Session update [sid: %d, target: %s, portal: %s,%d]\n",
+		info->sid, info->targetname, info->persistent_address,
+		info->port);
+
+	return 0;
+}
+
+static int trans_filter(const struct dirent *dir)
+{
+	return strcmp(dir->d_name, ".") && strcmp(dir->d_name, "..");
+}
+
+static int session_update_all(struct list_head *params)
+{
+	struct dirent **namelist;
+	int rc = 0, n, i;
+	struct session_info *info;
+	struct node_rec *rec = NULL;
+
+	info = calloc(1, sizeof(*info));
+	if (!info)
+		return ISCSI_ERR_NOMEM;
+
+	n = scandir("/sys/class/iscsi_session", &namelist, trans_filter,
+								alphasort);
+	if (n <= 0)
+		goto free_info;
+
+	for (i = 0; i < n; i++) {
+		rc = iscsi_sysfs_get_sessioninfo_by_id(info,
+							namelist[i]->d_name);
+		if (rc) {
+			log_error("could not find session info for %s",
+							namelist[i]->d_name);
+			/* raced. session was shutdown while looping */
+			rc = 0;
+			continue;
+		}
+
+		rec = idbm_create_rec(info->targetname,
+					info->tpgt,
+					info->persistent_address,
+					info->persistent_port,
+					&info->iface, 1);
+		if (!rec) {
+			log_error("create rec for %s failed",
+							namelist[i]->d_name);
+			goto free_info;
+		}
+		rec->session.info = info;
+		rec->session.sid = info->sid;
+
+		rc = session_set_rec_from_params(rec, params);
+		if (rc) {
+			log_error("set params for %s failed, error %d",
+						namelist[i]->d_name, rc);
+			goto free_info;
+		}
+		rc = session_update(rec, info);
+		free(rec);
+		if (rc) {
+			log_error("update session for %s failed, error %d",
+						namelist[i]->d_name, rc);
+			goto free_info;
+		}
+	}
+
+
+	for (i = 0; i < n; i++)
+		free(namelist[i]);
+	free(namelist);
+
+free_info:
+	free(info);
+	return rc;
+}
+
 int
 main(int argc, char **argv)
 {
 <at>  <at>  -3647,14 +3808,37  <at>  <at>  main(int argc, char **argv)
 				rec->session.multiple = 1;
 			}

-			/* drop down to node ops */
-			rc = exec_node_op(op, do_login, do_logout, do_show,
-					  do_rescan, do_stats, info_level,
-					  rec, &params);
+			if (!(op & OP_NONPERSISTENT)) {
+				rc = exec_node_op(op, do_login, do_logout,
+							do_show, do_rescan,
+							do_stats, info_level,
+							rec, &params);
+				if (rc)
+					goto free_info;
+			}
+			if (op == OP_UPDATE || op == OP_NONPERSISTENT) {
+				rc = session_set_rec_from_params(rec, &params);
+				if (rc)
+					goto free_info;
+				rc = session_update(rec, info);
+			}
 free_info:
 			free(info);
 			goto out;
 		} else {
+			if (op == OP_UPDATE || op == OP_NONPERSISTENT) {
+				if (!(op & OP_NONPERSISTENT)) {
+					rc = exec_node_op(op, do_login,
+							do_logout, do_show,
+							do_rescan, do_stats,
+							info_level, rec,
+							&params);
+					if (rc)
+						goto out;
+				}
+				rc = session_update_all(&params);
+				goto out;
+			}
 			if (op == OP_NEW) {
 				log_error("session mode: Operation 'new' only "
 					  "allowed with specific session IDs");
diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c
index ee037d9..b96946d 100644
--- a/usr/mgmt_ipc.c
+++ b/usr/mgmt_ipc.c
 <at>  <at>  -295,6 +295,38  <at>  <at>  mgmt_ipc_notify_common(queue_task_t *qtask, int (*handler)(int, char **))
 	return ISCSI_SUCCESS;
 }

+static int mgmt_ipc_session_update(queue_task_t *qtask)
+{
+	int sid = qtask->req.u.session.sid;
+	node_rec_t *rec = &qtask->req.u.session.rec;
+	iscsi_session_t *session;
+	struct iscsi_conn *conn;
+	int rc;
+
+	session = session_find_by_sid(sid);
+	if (!session)
+		return ISCSI_ERR_SESS_NOT_FOUND;
+
+	session->replacement_timeout = rec->session.timeo.replacement_timeout;
+	session->fast_abort = rec->session.iscsi.FastAbort;
+	session->abort_timeout = rec->session.err_timeo.abort_timeout;
+	session->lu_reset_timeout = rec->session.err_timeo.lu_reset_timeout;
+
+	conn = &session->conn[0];
+	conn->noop_out_timeout = rec->conn[0].timeo.noop_out_timeout;
+	conn->noop_out_interval = rec->conn[0].timeo.noop_out_interval;
+
+	rc = iscsi_session_set_params(conn);
+	if (rc) {
+		log_error("iscsi_session_set_params(): IPC error %d session"
+			" [%02d]" , rc, sid);
+		return ISCSI_ERR_INTERNAL;
+	}
+
+	mgmt_ipc_write_rsp(qtask, ISCSI_SUCCESS);
+	return ISCSI_SUCCESS;
+}
+
 /* Replace these dummies as you implement them
    elsewhere */
 static int
 <at>  <at>  -529,6 +561,7  <at>  <at>  static mgmt_ipc_fn_t *	mgmt_ipc_functions[__MGMT_IPC_MAX_COMMAND] = {
 [MGMT_IPC_NOTIFY_DEL_NODE]	= mgmt_ipc_notify_del_node,
 [MGMT_IPC_NOTIFY_ADD_PORTAL]	= mgmt_ipc_notify_add_portal,
 [MGMT_IPC_NOTIFY_DEL_PORTAL]	= mgmt_ipc_notify_del_portal,
+[MGMT_IPC_SESSION_UPDATE]	= mgmt_ipc_session_update,
 };

 void mgmt_ipc_handle(int accept_fd)
diff --git a/usr/mgmt_ipc.h b/usr/mgmt_ipc.h
index 55972ed..1a06403 100644
--- a/usr/mgmt_ipc.h
+++ b/usr/mgmt_ipc.h
 <at>  <at>  -46,6 +46,7  <at>  <at>  typedef enum iscsiadm_cmd {
 	MGMT_IPC_NOTIFY_DEL_NODE	= 17,
 	MGMT_IPC_NOTIFY_ADD_PORTAL	= 18,
 	MGMT_IPC_NOTIFY_DEL_PORTAL	= 19,
+	MGMT_IPC_SESSION_UPDATE		= 20,

 	__MGMT_IPC_MAX_COMMAND
 } iscsiadm_cmd_e;
-- 
1.9.3

--

-- 
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 | 17 Oct 01:11 2014

Re: Failure to login iser CentOS 7 3.16.3-1 elrepo


On 10/17/2014 02:05 AM, Moussa Ba wrote:


On Thursday, October 16, 2014 4:01:49 PM UTC-7, Or Gerlitz wrote:

On 10/16/2014 09:14 PM, Moussa Ba wrote:
> FYI the system is a supermicro based system with integrated ConnextX3
> card running 2.30....firmware info is below (obtained when installing
> mlnx-en-2.3.1.0.0 from Mellanox website).

oops, you can't mix two driver (mlx4_core and mlx4_en) from an overlay
install of mlnx-en install with the rest of the rdma stack originated
from the inbox kernel. This will not work, AFAIK. Please remove that
package or <at> least the rpm which installs these two kernel drivers (if
you need to locate it do rpm -qf on the module files and them rpm -e)

The network interface only showed up after installing mlnx-en-2.3.1.0.0.

so that's a pre-condition/issue we need to solve

remove the mlx4_core and mlx4_en from ofed, reload the inbox mlx4_core with debug_level=1 and see if there are errors, you need to get into a situation where the inbox EN driver is up and running

What is the proper way of enabling iser/ROCE with the inbox kernel?

 

it should just work once the EN (mlx4_en) driver is OK and you load the IB driver (mlx4_ib)

>
>
> Device #1:
> ----------
>
>   Device Type:      ConnectX3
>   Part Number:      AOC-CIBF-M1
>   Description:      ConnectX-3 single-port QSFP; FDR IB (56Gb/s) and
> 40GigE; PCIe3.0 x8 8GT/s; RoHS R6
>   PSID:             SM_1101000001000
>   PCI Device Name:  0000:01:00.0
>   Port1 GUID:       002590ffff07f15d
>   Port2 MAC:        00259007f15e
>   Versions:         Current        Available
>      FW             2.30.3000      N/A
>
>
>
> #ibv_devinfo -v
> No IB devices found
>
no IB device --> no RDMA

Well as you can see the device does show up under lspci. Am i missing a module?
oh I wanted to say no kernel software IB device --> no RDMA services


Moussa 

--
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.

oleg.a.mitrofanov | 16 Oct 00:34 2014
Picon

What's the difference between discovery and discoverydb modes?

Hello,

What's the difference between discovery and discoverydb modes?

The man page for the iscsiadm gives no explanation. The http://www.open-iscsi.org/docs/README gives the following description:

-m discoverydb --type=[type] --interface=[iface...] --portal=[ip:port] --print=[N] --op=[op]=[NEW | UPDATE | DELETE | NONPERSISTENT] --discover
This command will use the discovery record settings matching the record with type=type and portal=ip:port]. If a record does not exist, it will create a record using the iscsid.conf discovery settings.

-m discovery --type=[type] --interface=iscsi_ifacename --portal=[ip:port] --login --print=[N] --op=[op]=[NEW | UPDATE | DELETE | NONPERSISTENT]
Perform [type] discovery for target portal with ip-address [ip] and port [port].
This command will not use the discovery record settings. It will use the iscsid.conf discovery settings and it will overwrite the discovery record with iscsid.conf discovery settings if it exists. By default, it will then remove records for portals no longer returned. And, if a portal is returned by the target, then the discovery command will create a new record or modify an existing one with values from iscsi.conf and the command line.

The difference seems to be that the first one will use, and the second one will not use the discovery record settings. If that's the only difference, then can someone please elaborate on this? What are the discovery record settings? Is it iscsid.conf settings? What does it practically mean for the command to not use the discovery settings? What settings will it use then?

I found that the following two commands seemingly do the same things (perform target discovery). Are they actually anyhow functionally different?
iscsiadm -m discovery -t st -p 127.0.0.1
iscsiadm -m discoverydb -t st -p 127.0.0.1 --discover

For me it seems that discovery mode is an obsolete precursor of the discoverydb mode left there for compatibility purposes, but not cleaned from the man page and readme file.

Thanks,
Oleg

--
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.
Moussa Ba | 11 Oct 00:06 2014
Picon

Failure to login iser CentOS 7 3.16.3-1 elrepo

I have a target running CentOS 7 with LIO.  I am using iser transport via Mellanox Connect-X 3 VPI cards.  I have been having difficulties connecting via an initiator running CentOS 7. My setup is essentially a one target/LUN/PORT. 

 o- iscsi ............................................................................................................ [Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.0fa6846566d9 ....................................................... [TPGs: 1]
  |   o- tpg1 .................................................................................................. [gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 1]
  |     | o- iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.0fa6846566d9 .......................................... [Mapped LUNs: 1]
  |     |   o- mapped_lun0 ............................................................. [lun0 block/vg-targetd:test_volume_02 (rw)]
  |     o- luns .......................................................................................................... [LUNs: 1]
  |     | o- lun0 ............................................... [block/vg-targetd:test_volume_02 (/dev/vg-targetd/test_volume_02)]
  |     o- portals .................................................................................................... [Portals: 1]
  |       o- 192.168.111.100:3261 ........................................................................................... [iser]


Target Kernel: 3.16.3-1.el7.elrepo
Initiator Kernel:3.16.3-1.el7.elrepo

iscsiadm: Compiled from git repository.  Latest commit

commit 76a441ba0dc0071a19daeac456aa898889437efd
Author: Hannes Reinecke <.....>
Date:   Fri Sep 12 14:42:01 2014 -0700
    Added new util script to aid in CNA setup
   


Here is my flow:

iscsiadm -m iface -I iface0 --op=new
iscsiadm -m iface -I iface0 -o update -n iface.transport_name -v iser
iscsiadm -m discovery -t st -p 192.168.111.100:3261 -I iface0

Output is:

New interface iface0 added
192.168.111.100:3261,1 iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.0fa6846566d9
iface0 updated.
iscsiadm: No records found


See below for debug output.

#iscsiadm -m node -T iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.0fa6846566d9 -I iface0 -p 192.168.111.100:3261 -l - d 8

iscsiadm: Max file limits 1024 4096

iscsiadm: looking for iface conf /etc/iscsi/ifaces/iface0
iscsiadm: updated 'iface.iscsi_ifacename', 'iface0' => 'iface0'
iscsiadm: updated 'iface.transport_name', '' => 'iser'
iscsiadm: updated 'iface.vlan_id', '0' => '0'
iscsiadm: updated 'iface.vlan_priority', '0' => '0'
iscsiadm: updated 'iface.iface_num', '0' => '0'
iscsiadm: updated 'iface.mtu', '0' => '0'
iscsiadm: updated 'iface.port', '0' => '0'
iscsiadm: updated 'iface.tos', '0' => '0'
iscsiadm: updated 'iface.ttl', '0' => '0'
iscsiadm: updated 'iface.tcp_wsf', '0' => '0'
iscsiadm: updated 'iface.tcp_timer_scale', '0' => '0'
iscsiadm: updated 'iface.def_task_mgmt_timeout', '0' => '0'
iscsiadm: updated 'iface.erl', '0' => '0'
iscsiadm: updated 'iface.max_receive_data_len', '0' => '0'
iscsiadm: updated 'iface.first_burst_len', '0' => '0'
iscsiadm: updated 'iface.max_outstanding_r2t', '0' => '0'
iscsiadm: updated 'iface.max_burst_len', '0' => '0'
iscsiadm: exec_node_op: iser:iface0 node [iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.0fa6846566d9,192.168.111.100,3261] sid 0
iscsiadm: searching iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.0fa6846566d9

iscsiadm: found 192.168.111.100,3261,1

iscsiadm: iface iter found iface0.
iscsiadm: updated 'node.name', '' => 'iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.0fa6846566d9'
iscsiadm: updated 'node.tpgt', '-1' => '1'
iscsiadm: updated 'node.startup', 'manual' => 'automatic'
iscsiadm: updated 'node.leading_login', 'No' => 'No'
iscsiadm: updated 'iface.iscsi_ifacename', 'default' => 'iface0'
iscsiadm: updated 'iface.transport_name', 'tcp' => 'tcp'
iscsiadm: updated 'iface.vlan_id', '0' => '0'
iscsiadm: updated 'iface.vlan_priority', '0' => '0'
iscsiadm: updated 'iface.iface_num', '0' => '0'
iscsiadm: updated 'iface.mtu', '0' => '0'
iscsiadm: updated 'iface.port', '0' => '0'
iscsiadm: updated 'iface.tos', '0' => '0'
iscsiadm: updated 'iface.ttl', '0' => '0'
iscsiadm: updated 'iface.tcp_wsf', '0' => '0'
iscsiadm: updated 'iface.tcp_timer_scale', '0' => '0'
iscsiadm: updated 'iface.def_task_mgmt_timeout', '0' => '0'
iscsiadm: updated 'iface.erl', '0' => '0'
iscsiadm: updated 'iface.max_receive_data_len', '0' => '0'
iscsiadm: updated 'iface.first_burst_len', '0' => '0'
iscsiadm: updated 'iface.max_outstanding_r2t', '0' => '0'
iscsiadm: updated 'iface.max_burst_len', '0' => '0'
iscsiadm: updated 'node.discovery_address', '' => '192.168.111.100'
iscsiadm: updated 'node.discovery_port', '0' => '3261'
iscsiadm: updated 'node.discovery_type', 'static' => 'send_targets'
iscsiadm: updated 'node.session.initial_cmdsn', '0' => '0'
iscsiadm: updated 'node.session.initial_login_retry_max', '4' => '8'
iscsiadm: updated 'node.session.xmit_thread_priority', '-20' => '-20'
iscsiadm: updated 'node.session.cmds_max', '128' => '128'
iscsiadm: updated 'node.session.queue_depth', '32' => '32'
iscsiadm: updated 'node.session.nr_sessions', '1' => '1'
iscsiadm: updated 'node.session.auth.authmethod', 'None' => 'None'
iscsiadm: updated 'node.session.timeo.replacement_timeout', '120' => '120'
iscsiadm: updated 'node.session.err_timeo.abort_timeout', '15' => '15'
iscsiadm: updated 'node.session.err_timeo.lu_reset_timeout', '30' => '30'
iscsiadm: updated 'node.session.err_timeo.tgt_reset_timeout', '30' => '30'
iscsiadm: updated 'node.session.err_timeo.host_reset_timeout', '60' => '60'
iscsiadm: updated 'node.session.iscsi.FastAbort', 'Yes' => 'Yes'
iscsiadm: updated 'node.session.iscsi.InitialR2T', 'No' => 'No'
iscsiadm: updated 'node.session.iscsi.ImmediateData', 'Yes' => 'Yes'
iscsiadm: updated 'node.session.iscsi.FirstBurstLength', '262144' => '262144'
iscsiadm: updated 'node.session.iscsi.MaxBurstLength', '16776192' => '16776192'
iscsiadm: updated 'node.session.iscsi.DefaultTime2Retain', '0' => '0'
iscsiadm: updated 'node.session.iscsi.DefaultTime2Wait', '2' => '2'
iscsiadm: updated 'node.session.iscsi.MaxConnections', '1' => '1'
iscsiadm: updated 'node.session.iscsi.MaxOutstandingR2T', '1' => '1'
iscsiadm: updated 'node.session.iscsi.ERL', '0' => '0'
iscsiadm: updated 'node.conn[0].address', '' => '192.168.111.100'
iscsiadm: updated 'node.conn[0].port', '3260' => '3261'
iscsiadm: updated 'node.conn[0].startup', 'manual' => 'manual'
iscsiadm: updated 'node.conn[0].tcp.window_size', '524288' => '524288'
iscsiadm: updated 'node.conn[0].tcp.type_of_service', '0' => '0'
iscsiadm: updated 'node.conn[0].timeo.logout_timeout', '15' => '15'
iscsiadm: updated 'node.conn[0].timeo.login_timeout', '30' => '15'
iscsiadm: updated 'node.conn[0].timeo.auth_timeout', '45' => '45'
iscsiadm: updated 'node.conn[0].timeo.noop_out_interval', '5' => '5'
iscsiadm: updated 'node.conn[0].timeo.noop_out_timeout', '5' => '5'
iscsiadm: updated 'node.conn[0].iscsi.MaxXmitDataSegmentLength', '0' => '0'
iscsiadm: updated 'node.conn[0].iscsi.MaxRecvDataSegmentLength', '262144' => '262144'
iscsiadm: updated 'node.conn[0].iscsi.HeaderDigest', 'None' => 'None'
iscsiadm: updated 'node.conn[0].iscsi.DataDigest', 'None' => 'None'
iscsiadm: updated 'node.conn[0].iscsi.IFMarker', 'No' => 'No'
iscsiadm: updated 'node.conn[0].iscsi.OFMarker', 'No' => 'No'
iscsiadm: match session [iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.0fa6846566d9,192.168.111.100,3261][iface0 iser,,]:0
iscsiadm: to [iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.0fa6846566d9,192.168.111.100,3261][iface0 tcp,,]:0
iscsiadm: No records found

--
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.
Andy Grover | 8 Oct 21:19 2014
Picon

[PATCH 0/9] Rewrite event handling

Hi Mike and everyone,

This patchset redoes actor.c to use alarm(2) to wake up for expiring
timers instead of needing to wake up 4 times a second. We do not need
fine granularity for these, so computing everything in seconds works
fine and makes the code simpler.

This is based on previous simplification patches by Adam Jackson and
Chris Leech. The last patch in the series is the biggest, and the
diff is messy as a result of refactoring. I'd recommend applying the
series and reviewing the result, rather than reviewing the diff.

This series is also available in this git repo:

https://github.com/agrover/open-iscsi.git actor-rewrite

I have done basic testing and it works for me in basic login/logout
cases. The one interesting thing is that the event loop runs much less
frequently, so reap_proc() may not execute for a while if nothing else
causes poll() to wake up.

Looking forward to hearing what you think.

Thanks -- Regards -- Andy

Adam Jackson (6):
  actor: Mark actor_check static
  actor: simplify actor_check
  actor: s/ACTOR_TICKS/actor_jiffies/
  actor: Remove ACTOR_TICKS_10MS()
  actor: Unobfuscate ACTOR_MAX_LOOPS
  actor: Simplify actor_poll a little

Andy Grover (2):
  Remove actor_init and rename actor_new to actor_init
  Make running actors event-driven

Chris Leech (1):
  actor: Don't wake up poll() on a timeout if we don't need to

 include/list.h   |   6 ++
 usr/Makefile     |   4 +-
 usr/actor.c      | 297 ++++++++++++++++++++++++-------------------------------
 usr/actor.h      |  14 +--
 usr/event_poll.c |  47 +++++++--
 usr/initiator.c  |  28 +++---
 usr/iscsid.c     |   1 -
 usr/iscsistart.c |   1 -
 8 files changed, 196 insertions(+), 202 deletions(-)

-- 
1.9.3

--

-- 
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 | 8 Oct 08:18 2014
Picon

Re: Antw: [PATCH 2/9] Fix warning about possibly-uninitialized variable

>>> Andy Grover <agrover@...> schrieb am 07.10.2014 um 18:56 in Nachricht
<54341B2C.1090906@...>:
> On 10/06/2014 11:13 PM, Ulrich Windl wrote:
>>>>> Andy Grover <agrover@...> schrieb am 06.10.2014 um 18:36
in Nachricht
>> <1412613374-5752-3-git-send-email-agrover@...>:
>>> Signed-off-by: Andy Grover <agrover@...>
>>> ---
>>>   usr/iscsiadm.c | 5 ++---
>>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
>>> index f886d39..0cdc1bb 100644
>>> --- a/usr/iscsiadm.c
>>> +++ b/usr/iscsiadm.c
>> ...
>>>  <at>  <at>  -2251,8 +2251,7  <at>  <at>  static int exec_host_stats_op(int op, int info_level,
>>> uint32_t host_no)
>>>   	ipc->ctldev_close();
>>>
>>>   exit_host_stats:
>>> -	if (req_buf)
>>> -		free(req_buf);
>>> +	free(req_buf);
>>>   	return rc;
>>>   }
>>
>> Are you sure it's always safe to free(NULL)? I know systems where you get a 
> core dump (SIGSEGV)...
>>
>> Regards,
>> Ulrich
> 
> Are they Linux systems? The man page for free(3) on my box says if ptr 
> is NULL, no operation is performed.

I looked it up: You are right: The C standard says no action is performed when passing a NULL pointer to free().

> 
> Regards -- Andy
> 
> -- 
> 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.

--

-- 
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.

Andy Grover | 7 Oct 20:38 2014
Picon

[PATCHv2 00/13] Warning cleanups

Changes in v2:
* Fix mac_address size issue
* Fix issues with unused but set variables instead of disabling the
  warning

Thanks -- Andy

Andy Grover (13):
  Fix build warnings for unused variables
  Fix warning about possibly-uninitialized variable
  Fix bad sizeof in memset
  Fix missing header
  iscsiuio: Fix warning about non-matching types
  iscsiuio: Fix strict-aliasing warning with struct mac_address
  iscsiuio: Resolve strict aliasing issue in iscsiuio/src/unix/nic.c
  iscsiuio: Fix aliasing issue with IPV6_IS_ADDR_UNSPECIFIED
  iscsiuio: Use attribute(unused) for variables that are unused but
    needed
  iscsiuio: Use attribute(unused) for *icmpv6_hdr
  iscsiuio: Change nic_disable to return void
  iscsiuio: Remove set but unused variables
  iscsiuio: Check return value from nic_queue_tx_packet

 iscsiuio/src/apps/dhcpc/dhcpv6.c |  6 ++----
 iscsiuio/src/uip/ipv6.c          |  2 +-
 iscsiuio/src/uip/ipv6.h          | 39 ++++++++++++---------------------------
 iscsiuio/src/uip/pt.h            |  2 +-
 iscsiuio/src/uip/uip.c           |  2 +-
 iscsiuio/src/uip/uip_arp.c       |  2 --
 iscsiuio/src/unix/libs/bnx2x.c   |  2 +-
 iscsiuio/src/unix/main.c         |  5 ++---
 iscsiuio/src/unix/nic.c          | 19 +++++++++----------
 iscsiuio/src/unix/nic_utils.c    | 16 ++++++++++++----
 iscsiuio/src/unix/nic_utils.h    |  2 +-
 iscsiuio/src/unix/packet.c       |  5 +----
 usr/be2iscsi.c                   |  1 -
 usr/iscsiadm.c                   |  5 ++---
 usr/login.c                      |  2 --
 usr/md5.c                        |  2 +-
 usr/mgmt_ipc.c                   |  1 +
 usr/netlink.c                    |  3 +--
 utils/md5.c                      |  2 +-
 utils/open-isns/bitvector.c      | 15 ++++++---------
 utils/open-isns/dd.c             |  3 +--
 21 files changed, 56 insertions(+), 80 deletions(-)

-- 
1.9.3

--

-- 
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.


Gmane