Commit 97a59692 authored by Kirk Webb's avatar Kirk Webb

* add "slicename" arg to Slice() constructor
  - so it can be specified manually

* pushed up vnode setup wait time in plabmonitord to 16 minutes.
parent ed65d4a4
......@@ -715,25 +715,29 @@ class Plab:
#
class Slice:
# XXX: maybe add slicename arg
def __init__(self, plab, pid, eid):
def __init__(self, plab, pid, eid, slicename = None):
self.plab = plab
self.pid, self.eid = pid, eid
self.slicemeta = None
self.slicename = slicename
return
def _create(self):
"""
Creates a new slice that initially contains no nodes. Don't call
this directly, use Plab.createSlice instead.
"""
res = DBQueryFatal("select idx from experiments "
"where pid=%s "
"and eid=%s",
(self.pid, self.eid))
if not len(res):
raise RuntimeError, "Didn't get any results while looking for idx"
eindex = res[0][0]
self.slicename = "%s_%s" % (SLICEPREFIX, eindex)
if not self.slicename:
res = DBQueryFatal("select idx from experiments "
"where pid=%s "
"and eid=%s",
(self.pid, self.eid))
if not len(res):
raise RuntimeError, "Didn't get any results while looking for idx"
eindex = res[0][0]
self.slicename = "%s_%s" % (SLICEPREFIX, eindex)
pass
print "Creating Plab slice %s." % self.slicename
......
......@@ -88,6 +88,7 @@ my $logfile = "$TB/log/plabmonitord";
my @oldnodes = ();
my $LOOPSLEEP = 1800; # 1/2 hour between successive loops.
my $PAUSETIME = 120; # 2 minute pause after running vnode_setup
my $SETUPWAIT = 960; # 16 minutes to wait for vnode to setup.
my $BATCHNUM = 20; # degree of parallelization
#
......@@ -167,7 +168,8 @@ while (1) {
#
# Try to setup this batch of vnodes.
#
system("vnode_setup -f -d -n $BATCHNUM $PLABMOND_PID $PLABMOND_EID @vnodes");
system("vnode_setup -f -d -w $SETUPWAIT -n $BATCHNUM ".
"$PLABMOND_PID $PLABMOND_EID @vnodes");
print "sleeping for a bit.\n"
if ($debug);
......
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