Commit 62e38deb authored by Leigh B. Stoller's avatar Leigh B. Stoller

Commit my version of assign_wrapper as assign_wrapper-new, and change

tbswap to use this version inside the testbed project only! All other
projects will see the old version for now; there are just too many
things to test, and the testsuite gets just a fraction of them. Some
highlights (which I will expand on later when I commit this version to
the main version):

* New -t option to create the TOP file, and then exit. The only other
  side effect of this is to update the min/max nodes for the
  experiment in the DB, unles new option -n (impotent mode) is given.

* New -n option to operate in impotent mode; do not allocate nodes and
  do not modify the DB. Okay, so this option is not as great as it
  sounds. I eventually hit the point of diminishing returns, with
  trying to make things work right without DB modification. At some
  point I just throw in the towel and exit. This currently happens after
  interpolating the link results of assign. But, I have found it very
  useful, and could get better with time. Being able to run assign on
  the main DB without sucking up the nodes is nice for debugging.

* Lots of data structure organization, mostly on the virtual topology
  side of assign (you can think of assign as two sections, the part
  that interprets the DB tables and creates the TOP file, and the part
  that reads the results of assign and sets up all the physical stuff
  in the DB). I removed numerous global hashes, and combined them into
  aggregate data structures, such as they are in Perl. My approach for
  this was to read the tables from the DB, and keep them handy,
  extending them as needed with stuff that assign_wrapper generates as
  it proceeds. This has the side effect of cutting down on the number
  of queries as well.

  The next task is to do the physical side reorg, but not up for that
  yet.
parent 7a55da5c
......@@ -34,7 +34,7 @@ SBIN_STUFF = resetvlans console_setup.proxy sched_reload named_setup \
LIBEXEC_STUFF = rmproj wanlinksolve wanlinkinfo \
os_setup mkexpdir console_setup webnscheck webreport \
webstartexp webendexp webbatchexp \
assign_wrapper ptopgen webnodeupdate \
assign_wrapper assign_wrapper-new ptopgen webnodeupdate \
webdelay_config \
webrmgroup webswapexp webnodecontrol \
webmkgroup websetgroups webmkproj \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -509,7 +509,6 @@ sub doSwapout($) {
#
my @failedNodes = ();
print STDERR "Freeing failed nodes.\n";
$db_result =
DBQueryFatal("select rv.node_id, n.allocstate ".
"from reserved as rv ".
......@@ -527,6 +526,8 @@ sub doSwapout($) {
# if doing an update -restart.
if (@failedNodes > 0) {
print STDERR "Freeing failed nodes.\n";
TBDebugTimeStamp("nfree started");
#
# Specify -x switch so when a physical node gets freed,
......@@ -621,7 +622,10 @@ sub doSwapin($) {
# fixed.
#
my $exitcode;
if ($exitcode = system("assign_wrapper -u $pid $eid")) {
my $wrapper = (($pid eq "testbed") ?
"assign_wrapper-new" : "assign_wrapper");
if ($exitcode = system("$wrapper -u $pid $eid")) {
print STDERR "*** Failed to map to reality.\n";
#
......
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