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 * {{{EMULAB-LICENSE
* *
...@@ -4545,7 +4545,7 @@ sendstoreconf(int sock, int tcp, tmcdreq_t *reqp, char *bscmd, char *vname, ...@@ -4545,7 +4545,7 @@ sendstoreconf(int sock, int tcp, tmcdreq_t *reqp, char *bscmd, char *vname,
char iqn[BS_IQN_MAXSIZE]; char iqn[BS_IQN_MAXSIZE];
char *mynodeid; char *mynodeid;
char *class, *protocol, *placement, *mountpoint, *lease; char *class, *protocol, *placement, *mountpoint, *lease;
int nrows, nattrs, ro, slen; int nrows, nattrs, ro;
/* Remember the nodeid we care about up front. */ /* Remember the nodeid we care about up front. */
mynodeid = reqp->isvnode ? reqp->vnodeid : reqp->nodeid; mynodeid = reqp->isvnode ? reqp->vnodeid : reqp->nodeid;
...@@ -4591,19 +4591,13 @@ sendstoreconf(int sock, int tcp, tmcdreq_t *reqp, char *bscmd, char *vname, ...@@ -4591,19 +4591,13 @@ sendstoreconf(int sock, int tcp, tmcdreq_t *reqp, char *bscmd, char *vname,
if ((strcmp(class, BS_CLASS_SAN) == 0) && if ((strcmp(class, BS_CLASS_SAN) == 0) &&
(strcmp(protocol, BS_PROTO_ISCSI) == 0)) { (strcmp(protocol, BS_PROTO_ISCSI) == 0)) {
/* /*
* Construct IQN string. Leases have a static IQN, * Construct IQN string.
* whereas ephemeral blockstores have IQNs based on * Currently, all leases have a unique IQN based on
* experiment-specific data. * experiment-specific data.
*/ */
if (strlen(lease) && atoi(lease) != 0) { if (snprintf(iqn, sizeof(iqn), "%s:%s:%s:%s",
slen = snprintf(iqn, sizeof(iqn), "%s:lease-%s", BS_IQN_PREFIX, reqp->pid,
BS_IQN_PREFIX, lease); reqp->eid, vname) >= sizeof(iqn)) {
} else {
slen = snprintf(iqn, sizeof(iqn), "%s:%s:%s:%s",
BS_IQN_PREFIX, reqp->pid,
reqp->eid, vname);
}
if (slen >= sizeof(iqn)) {
error("STORAGECONFIG: %s: Not enough room in " error("STORAGECONFIG: %s: Not enough room in "
"IQN string buffer", mynodeid); "IQN string buffer", mynodeid);
mysql_free_result(res); 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