Commit 06e7a51b authored by Leigh B. Stoller's avatar Leigh B. Stoller

Back out previous assign_wrapper change and moved it to tbswap where it

is easier to check for linux nodes, and still have a hope it will patch
into older snapshots.
parent 2f303d8e
......@@ -644,12 +644,6 @@ my %vnode2rtabid = ();
#
########################################################################
#
# Grab global enable of linkdelays.
#
my $enablelinkdelays = TBGetSiteVar("general/enable_endnodeshaping");
printdb "Generating TOP file.\n";
TBDebugTimeStamp("TOP started");
......@@ -4413,10 +4407,6 @@ sub CreateTopFile()
($emulated ? " emulated" : "") .
($trivial_ok ? " trivial_ok\n" : "\n"));
fatal("Endnodeshaping is disabled! ".
"You must modify your experiment!\n")
if (! $enablelinkdelays);
#
# We allow users to oversubscribe by letting them turn
# off the bandwidth shaping. If however, if the link was
......@@ -4565,10 +4555,6 @@ sub CreateTopFile()
[$member,$delay,$bw,$loss,
$member,$rdelay,$rbw,$rloss,0];
fatal("Endnodeshaping is disabled! ".
"You must modify your experiment!\n")
if (! $enablelinkdelays);
print(TOPFILE "link $plink $node lan/$lan " .
max($top_bw,$top_rbw) . " 0 0 ethernet" .
($emulated ? " emulated" : "") .
......
......@@ -76,6 +76,11 @@ sub RETRY() { return 2; }
sub UPDATE() { return 1; }
sub UPDATE_RECOVER() { return 0; }
#
# Grab global enable of linkdelays.
#
my $enablelinkdelays = TBGetSiteVar("general/enable_endnodeshaping");
#
# Turn off line buffering on output
#
......@@ -731,6 +736,32 @@ sub doSwapin($) {
#
if ($type > UPDATE_RECOVER) {
#
# Hacky test to allow disabling of linkdelays if the node is going
# to run Linux. See sitevar above.
#
if (! $enablelinkdelays) {
$db_result =
DBQueryFatal("select distinct e.pid,e.eid,vl.vnode,vn.osname ".
" from experiments as e ".
"left join virt_lans as vl on vl.pid=e.pid and ".
" vl.eid=e.eid ".
"left join virt_nodes as vn on vn.pid=e.pid and ".
" vn.eid=e.eid and vn.vname=vl.vnode ".
"left join os_info as o on o.osname=vn.osname and ".
" (o.pid=vl.pid or o.pid='" . TBOPSPID() . "') ".
"where (vl.uselinkdelay!=0 or e.uselinkdelays!=0 or ".
" e.forcelinkdelays!=0) and ".
" (o.os is NULL or o.os='Linux') and ".
" e.pid='$pid' and e.eid='$eid'");
if ($db_result->numrows) {
print "*** Endnodeshaping is disabled on Linux Images!\n";
print "*** You must modify your experiment to swap it in.\n";
return 1;
}
}
print "Mapping to physical reality ...\n";
TBDebugTimeStamp("assign_wrapper started");
......
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