Commit 7f5bdb81 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Set the new role in the reserved column in assign_wrapper.

parent 51627fc5
......@@ -112,6 +112,9 @@ use Exporter;
TBDB_JAILIPBASE TBDB_JAILIPMASK
TBDB_RSRVROLE_NODE TBDB_RSRVROLE_VIRTHOST TBDB_RSRVROLE_DELAYNODE
TBDB_RSRVROLE_SIMNODE
TBDB_EXPT_WORKDIR
TBSetNodeEventState TBGetNodeEventState
TBSetNodeAllocState TBGetNodeAllocState
......@@ -497,6 +500,12 @@ my $TBDB_STATS_STARTCLOCK;
sub TBDB_JAILIPBASE() { "@JAILIPBASE@"; }
sub TBDB_JAILIPMASK() { "@JAILIPMASK@"; }
# Reserved node "roles"
sub TBDB_RSRVROLE_NODE() { "node"; }
sub TBDB_RSRVROLE_VIRTHOST() { "virthost"; }
sub TBDB_RSRVROLE_DELAYNODE() { "delaynode"; }
sub TBDB_RSRVROLE_SIMNODE() { "simnode"; }
#
# Auth stuff.
#
......
......@@ -2561,7 +2561,7 @@ sub InitPnode($pnode, $vnode)
" where node_id='$pnode'");
$vname = "nsenode${nsenode_id}";
DBQueryFatal("update reserved set vname='$vname'" .
DBQueryFatal("update reserved set vname='$vname',erole='simnode' " .
"where node_id='$pnode'");
$nsenode_id++;
......@@ -2602,7 +2602,7 @@ sub InitPnode($pnode, $vnode)
#
$vname = newvhostvname($pnode);
DBQueryFatal("update reserved set vname='$vname' " .
DBQueryFatal("update reserved set vname='$vname',erole='virthost' " .
"where node_id='$pnode'");
$expt_stats{"jailnodes"} += 1;
......@@ -2647,7 +2647,8 @@ sub InitPnode($pnode, $vnode)
" ready=0" .
" where node_id=\"$pnode\"");
DBQueryFatal("update reserved set vname='$vname' " .
DBQueryFatal("update reserved set ".
" vname='$vname',erole='delaynode' " .
"where node_id='$pnode'");
$expt_stats{"delaynodes"} += 1;
......
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