Changes between Version 1 and Version 2 of Internal/EmulabInEmulab


Ignore:
Timestamp:
May 21, 2015 2:16:57 PM (10 years ago)
Author:
Jesse Ross
Comment:

Added comments sent by keith to goran

Legend:

Unmodified
Added
Removed
Modified
  • Internal/EmulabInEmulab

    v1 v2  
    1 Essential reading: [https://wiki.emulab.net/wiki/elabinelab Emulab page on ElabInElab]
     1== Overview ==
     2The [https://wiki.emulab.net/wiki/elabinelab Emulab page on ElabInElab] makes for very useful background reading.
     3
     4The following sections are derived from notes by Keith, expanding on the Emulab docs as they pertain to us:
     5
     6
     7== History ==
     8
     9The historic behavior is that an emulab-in-emulab would steal an experimental interface and use it as the control interface. Nobody ever does that anymore.  We added another ns-commnd to have the inner nodes use the regular control interfaces. This extension doesn't seem to be documented:    {{{tb-elabinelab-singlenet}}}
     10
     11Some of what they say there may not work here anymore. e.g. we've never tried the stuff that immediately attempts to swap in an experiment once the inner elab finishes building.
     12
     13Another important ns command, which is not described in that document, is
     14
     15{{{
     16namespace eval TBCOMPAT {
     17#   set elabinelab_maxpcs <n> where n is the number of client pc's
     18    set elabinelab_maxpcs 0
     19}
     20}}}
     21
     22== Sample NS File ==
     23A complete ns file to create an Emulab-in-Emulab with the operating system FBSD9-ENE with 3 pc's would look like this:
     24
     25{{{
     26source tb_compat.tcl
     27set ns [new Simulator]
     28
     29tb-elab-in-elab 1
     30tb-elabinelab-singlenet
     31
     32set os FBSD9-ENE       
     33
     34namespace eval TBCOMPAT {
     35    set elabinelab_maxpcs 3
     36    set elabinelab_nodeos("boss") $os
     37    set elabinelab_nodeos("ops") $os
     38}
     39
     40$ns run
     41}}}
     42
     43== Creating the Emulab-In-Emulab ==
     44
     45So you create an experiment with this as an ns file and swap it in.
     46
     47The build may fail; if it fails, it still declares the experiment to be swapped in but you have to do some manual intervention.
     48
     49On the real boss run
     50
     51{{{os_load  -i  FBSD9-ENE  <whatever the myboss and myops node in your experiment are>}}}
     52
     53Wait until both nodes have reloaded and come up so that you can ssh into them.
     54
     55Then, on the real boss, run the command
     56
     57{{{elabinelab <your PID> <your EID>}}}
     58
     59''Do not interrupt this''.  It will take 30-40 minutes, if it works. Shorter if it fails.  If it fails try again, including this os_load.
     60
     61== Interacting With Your elab-in-elab ==
     62
     63You should be able to ssh into from users or boss.isi into nodes called myboss and myops in your experiment.  The creator is given admin privs on the inside even if the creator doesn't have on the outside.
     64
     65You can use firefox with the foxyproxy extension to interact with the web server on the inside as described in:   https://trac.deterlab.net/wiki/ElabElabSshProxy
     66
     67Even if this all works, there's some stuff that need to be done manually before you can swap an experiment in on the inside
     68
     69The partition table starts out empty, so you need to do a sched_reload of all the nodes from the inside boss.
     70
     71I agree that I should fix the build scripts to do this, and it probably needs to be the outside boss elabinelab script.
     72
     73Another bug that needs to be fixed is that in order to get the nodes on the inside to reload, the inside boss request the outside boss to power cycle them, which, in the case of nodes using the older serial-controlled RPC power controllers fails because the power cycle command won't work if it is already off.
     74
     75[the bug is that power cycle on this controllers should always work and this needs to be fixed in {{{boss.isi:/usr/testbed/lib/power_rpc27}}}]
     76
     77== How It Works, and Exercising a New Version ==
     78If you've specified the ns-command
     79{{{
     80            tb-elab-in-elab 1
     81}}}
     82in your NS file, then, as implied above {{{tbswap}}} runs {{{boss:/usr/testbed/sbin/elabinelab}}} on your behalf.
     83
     84This dumps some information from the database into {{{/proj/<YourProj>/exp/<YourId>/dbstate.tar.gz}}}
     85
     86It copies {{{boss:/usr/testbed/etc/rc.mkelab}}} to the inside users node and runs it, and then does the same for the boss, which are wrapper scripts that retrieve and install the source.
     87
     88If there is a file {{{/proj/<YourProj>/exp/<YourID>/rc.mkelab}}} it will use that one instead, which will allow you to build the next generation version without disrupting the working one.
     89
     90The standard version will similarly by default retrieve the source from {{{boss:/usr/testbed/src/emulab-src.tar.gz}}} , but if there is a file {{{/proj/<YourProj>/exp/<YourID>/emulab-src.tar.gz}}} then it will use *that* version instead.
     91
     92== Another Note ==
     93The tcl that gets invoked in parsing the nsfile for the encompassing experiment is {{{users:/usr/testbed/lib/ns2ir/elabinelab.ns}}}