• Leigh Stoller's avatar
    Major rework of the script interface to Emulab. Up to now we have been · 5ef8f70a
    Leigh Stoller authored
    supporting both a shell script driven interface, plus the newer XMLRPC
    interface. This change removes the script driven interface from boss,
    replacing it with just the XMLRPC interface. Since we like to maintain
    backwards compatability with interfaces we have advertised to users (and
    which we know are being used), I have implemented a script wrapper that
    exports the same interface, but which converts the operations into XMLRPC
    requests to the server. This wrapper is written in python and uses our
    locally grown xmlrpc-over-ssh library. Like the current "demonstation"
    client, you can take this wrapper to your machine that has python and ssh
    installed, and use it there; you do not need to use these services from
    just users.emulab.net. Other things to note:
    
    * The wrapper is a single python script that has a "class" for each wrapped
      script. Running the wrapper without any arguments will list all of the
      operations it supports. You can invoke the wrapper with the operation as
      its argument:
    
        {987} stoller$ script_wrapper.py swapexp --help
        swapexp -e pid,eid in|out
        swapexp pid eid in|out
        where:
             -w   - Wait for experiment to finish swapping
             -e   - Project and Experiment ID
             in   - Swap experiment in  (must currently be swapped out)
            out   - Swap experiment out (must currently be swapped in)
    
        Wrapper Options:
            --help      Display this help message
            --server    Set the server hostname
            --login     Set the login id (defaults to $USER)
            --debug     Turn on semi-useful debugging
    
       But more convenient is to create a set of symlinks so that you can just
       invoke the operation by its familiar scriptname. This is what I have
       done on users.emulab.net.
    
        {987} stoller$ /usr/tesbed/bin/swapexp --help
        swapexp -e pid,eid in|out
        swapexp pid eid in|out
    
    
    * For those of you talking directly to the RPC server from python, I have
      added a wrapper class so that you can issue requests to any of the
      modules from a single connection. Instead using /xmlrpc/modulename, you
      can use just /xmlrpc, and use method names of the form experiment.swapexp,
      node.reboot, etc.
    
      Tim this should be useful for the netlab client which I think opens up
      multiple ssh connections?
    
    * I have replaced the paperbag shell with a stripped down xmlrpcbag shell
      that is quite a bit simpler since we no longer allow access to anything
      but the RPC server. No interactive mode, no argument processing, no
      directory changing, etc. My main reason for reworking the bag is to make
      it easier to understand, maintain, and verify that it is secure. The new
      bag also logs all connections to syslog (something we should have done in
      the orginal). I also added some setrlimit calls (core, maxcpu). I also
      thought about niceing the server down, but that would put RPC users at a
      disadvantage relative to web interface users. When we switch the web
      interface to use the XMLRPC backend, we can add this (reniceing from the
      web server would be a pain cause of its scattered implementation).
    5ef8f70a
Name
Last commit
Last update
..
GNUmakefile.in Loading commit data...
genlastlog.c Loading commit data...
lastlog_daemon.in Loading commit data...
paper.identity.pub Loading commit data...
suexec.c Loading commit data...
suexec.h Loading commit data...