Commit f793770e authored by Mike Hibler's avatar Mike Hibler

Undo change to derive IQN from dataset.

It is back to unique per experiment, per dataset.
parent 0f7ee1ad
/*
* Copyright (c) 2000-2014 University of Utah and the Flux Group.
* Copyright (c) 2000-2015 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -4545,7 +4545,7 @@ sendstoreconf(int sock, int tcp, tmcdreq_t *reqp, char *bscmd, char *vname,
char iqn[BS_IQN_MAXSIZE];
char *mynodeid;
char *class, *protocol, *placement, *mountpoint, *lease;
int nrows, nattrs, ro, slen;
int nrows, nattrs, ro;
/* Remember the nodeid we care about up front. */
mynodeid = reqp->isvnode ? reqp->vnodeid : reqp->nodeid;
......@@ -4591,19 +4591,13 @@ sendstoreconf(int sock, int tcp, tmcdreq_t *reqp, char *bscmd, char *vname,
if ((strcmp(class, BS_CLASS_SAN) == 0) &&
(strcmp(protocol, BS_PROTO_ISCSI) == 0)) {
/*
* Construct IQN string. Leases have a static IQN,
* whereas ephemeral blockstores have IQNs based on
* Construct IQN string.
* Currently, all leases have a unique IQN based on
* experiment-specific data.
*/
if (strlen(lease) && atoi(lease) != 0) {
slen = snprintf(iqn, sizeof(iqn), "%s:lease-%s",
BS_IQN_PREFIX, lease);
} else {
slen = snprintf(iqn, sizeof(iqn), "%s:%s:%s:%s",
BS_IQN_PREFIX, reqp->pid,
reqp->eid, vname);
}
if (slen >= sizeof(iqn)) {
if (snprintf(iqn, sizeof(iqn), "%s:%s:%s:%s",
BS_IQN_PREFIX, reqp->pid,
reqp->eid, vname) >= sizeof(iqn)) {
error("STORAGECONFIG: %s: Not enough room in "
"IQN string buffer", mynodeid);
mysql_free_result(res);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment