Commit 2f303d8e authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add some goo to disable linkdelays globally and throw an error.

The placement of this code is whacky cause I needed a spot in
the file that has been sorta stable for the last year or two.
parent 8f0161e0
......@@ -61,3 +61,4 @@ INSERT INTO sitevariables VALUES ('general/version/minor','456','','Source code
INSERT INTO sitevariables VALUES ('general/version/build','06/17/2005','','Build version number');
INSERT INTO sitevariables VALUES ('general/version/major','1','','Source code major revision number');
INSERT INTO sitevariables VALUES ('general/mailman/password','','','Admin password for Emulab generated lists');
INSERT INTO sitevariables VALUES ('general/enable_endnodeshaping','1','1','Use this sitevar to disable endnodeshaping globally on your testbed');
......@@ -644,6 +644,12 @@ my %vnode2rtabid = ();
#
########################################################################
#
# Grab global enable of linkdelays.
#
my $enablelinkdelays = TBGetSiteVar("general/enable_endnodeshaping");
printdb "Generating TOP file.\n";
TBDebugTimeStamp("TOP started");
......@@ -4406,7 +4412,11 @@ sub CreateTopFile()
max($top_bw,$top_rbw) . " 0 0 ethernet " .
($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
......@@ -4554,6 +4564,10 @@ sub CreateTopFile()
$delaylinks{$plink} =
[$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" .
......
Supports Markdown
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