Commit 0dd12dba authored by Mac Newbold's avatar Mac Newbold

Add a new script: tbresize

(installs into /usr/testbed/bin/tbresize but isn't avail. on ops yet)

Usage: tbresize [-d] -a -e pid,eid -n num -t type [-p prefix]
       tbresize [-d] -r -e pid,eid <node> [<node> ...]
       tbresize -h
Use -h to show this usage message.
Use -d to enable extra debugging output.
Use -a to add nodes to an experiment.
Use -r to remove nodes from an experiment.
Use -e pid,eid to specify the experiment to resize.
Use -n to specify the number of nodes to add.
Use -t to specify the type of the nodes to be added (pc, pc850, pc600,
etc).
Use -p to specify a prefix for vnames (i.e. "node" => node0 .. nodeN).
With -r, specify a list of one or more nodes to be removed (i.e. pcXX).

Can even resize an expt down to no nodes then back up again. If it has
one LAN/link in the expt, it adds the new nodes to it. If it has zero or
more than one, it doesn't connect the new nodes to the topology.

After finding and reserving (or before freeing) it fixes up the right
places in the db and reruns snmpit, then reruns exports_setup and
named_setup and reboots all the nodes that are now in the expt so they get
updated configuration data.

Even visualizes properly after being resized, the only catch is that the
ns file is the original one, not one generated from the db.

Use it, abuse it, have fun with it, and let me know what breaks.
parent 80c932d8
......@@ -1261,6 +1261,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/resetvlans tbsetup/rmacct-ctrl tbsetup/rmproj \
tbsetup/sched_reload tbsetup/sched_reserve tbsetup/reload_daemon \
tbsetup/batchexp tbsetup/batch_daemon \
tbsetup/webdelay_config tbsetup/tbresize \
tbsetup/webbatchexp tbsetup/webreport \
tbsetup/wanlinkinfo tbsetup/wanassign \
tbsetup/webswapexp tbsetup/swapexp \
......
......@@ -318,7 +318,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/resetvlans tbsetup/rmacct-ctrl tbsetup/rmproj \
tbsetup/sched_reload tbsetup/sched_reserve tbsetup/reload_daemon \
tbsetup/batchexp tbsetup/batch_daemon \
tbsetup/webdelay_config \
tbsetup/webdelay_config tbsetup/tbresize \
tbsetup/webbatchexp tbsetup/webreport \
tbsetup/wanlinkinfo tbsetup/wanassign \
tbsetup/webswapexp tbsetup/swapexp \
......
......@@ -15,7 +15,7 @@ include $(OBJDIR)/Makeconf
SUBDIRS = checkpass ns2ir
BIN_STUFF = power snmpit tbend tbswapin tbswapout tbprerun tbreport \
os_load startexp endexp batchexp swapexp \
tbresize os_load startexp endexp batchexp swapexp \
node_reboot nscheck node_update savelogs node_control \
portstats checkports eventsys_control
......
This diff is collapsed.
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