1. 08 Sep, 2004 1 commit
  2. 01 Sep, 2004 2 commits
    • Leigh B. Stoller's avatar
      I'm a bozo. · 4f7a0efd
      Leigh B. Stoller authored
      4f7a0efd
    • Leigh B. Stoller's avatar
      SSL version of the XMLRPC server. · a9c1045e
      Leigh B. Stoller authored
      * SSL based server (sslxmlrpc_server.py) that wraps the existing Python
        classes (what we export via the existing ssh XMLRPC server). I also have a
        demo client that is analogous the ssh demo client (sslxmlrpc_client.py).
        This client looks for an ssl cert in the user's .ssl directory, or you can
        specify one on the command line. The demo client is installed on ops, and
        is in the downloads directory with the rest of the xmlrpc stuff we export
        to users. The server runs as root, forking a child for each connection and
        logs connections to /usr/testbed/log/sslxmlrpc.log via syslog.
      
      * New script (mkusercert) generates SSL certs for users. Two modes of
        operation; when called from the account creation path, generates a
        unencrypted private key and certificate for use on Emulab nodes (this is
        analagous to the unencrypted SSH key we generate for users). The other mode
        of operation is used to generate an encrypted private key so that the user
        can drag a certificate to their home/desktop machine.
      
      * New webpage (gensslcert.php3) linked in from the My Emulab page that
        allows users to create a certificate. The user is prompted for a pass
        phrase to encrypt the private key, as well as the user's current Emulab
        login password. mkusercert is called to generate the certificate, and the
        result is stored in the user's ~/.ssl directory, and spit back to the user
        as a text file that can be downloaded and placed in the users homedir on
        their local machine.
      
      * The server needs to associate a certificate with a user so that it can
        flip to that user in the child after it forks. To do that, I have stored
        the uid of the user in the certificate. When a connection comes in, I grab
        the uid out of the certificate and check it against the DB. If there is a
        match (see below) the child does the usual setgid,setgroups,setuid to the
        user, instantiates the Emulab server class, and dispatches the method. At
        the moment, only one request per connection is dispatched. I'm not sure
        how to do a persistant connection on the SSL path, but probably not a big
        deal right now.
      
      * New DB table user_sslcerts that stores the PEM formatted certificates and
        private keys, as well as the serial number of the certificate, for each
        user. I also mark if the private key is encrypted or not, although not
        making any use of this data. At the moment, each user is allowed to get
        one unencrypted cert/key pair and one encrypted cert/key pair. No real
        reason except that I do not want to spend too much time on this until we
        see how/if it gets used. Anyway, the serial number is used as a crude form
        of certificate revocation. When the connection is made, I suck the serial
        number and uid out of the certificate, and look for a match in the table.
        If cert serial number does not match, the connection is rejected. In other
        words, revoking a certificate just means removing its entry from the DB
        for that user. I could also compare the certificate itself, but I am not
        sure what purpose that would serve since that is what the SSL handshake is
        supposed to take of, right?
      
      * Updated the documentation for the XMLRPC server to mention the existence
        of the SSL server and client, with a pointer into the downloads directory
        where users can pick up the client.
      a9c1045e
  3. 25 Aug, 2004 1 commit
  4. 23 Aug, 2004 1 commit
  5. 11 Aug, 2004 1 commit
    • Leigh B. Stoller's avatar
      Add new per-lan table, which currently is just for Mike: · d09d9696
      Leigh B. Stoller authored
      1.269: Add new table to generate a per virt_lan index for use with
             veth vlan tags. This would be so much easier if the virt_lans
             table had been split into virt_lans and virt_lan_members.
             Anyway, this table might someday become the per-lan table, with a
             table of member settings. This would reduce the incredible amount of
             duplicate info in virt_lans!
      
      	CREATE TABLE virt_lan_lans (
      	  pid varchar(12) NOT NULL default '',
      	  eid varchar(32) NOT NULL default '',
      	  idx int(11) NOT NULL auto_increment,
      	  vname varchar(32) NOT NULL default '',
      	  PRIMARY KEY  (pid,eid,idx),
      	  UNIQUE KEY vname (pid,eid,vname)
      	) TYPE=MyISAM;
      
             This arrangement will provide a unique index per virt_lan, within
             each pid,eid. That is, it starts from 1 for each pid,eid. That is
             necessary since the limit is 16 bits, so a global index would
             quickly overflow. The above table is populated with:
      
      	insert into virt_lan_lans (pid, eid, vname)
                  select distinct pid,eid,vname from virt_lans;
      d09d9696
  6. 15 Jul, 2004 2 commits
    • Leigh B. Stoller's avatar
    • Leigh B. Stoller's avatar
      Overview: Add Event Groups: · ed964507
      Leigh B. Stoller authored
      	set g1 [new EventGroup $ns]
      	$g1 add  $link0 $link1
      	$ns at 60.0 "$g1 down"
      
      See the new advanced tutorial section on event groups for a better
      example.
      
      Changed tbreport to dump the event groups table when in summary mode.
      At the same time, I changed tbreport to use the recently added
      virt_lans:vnode and ip slots, decprecating virt_nodes:ips in one more
      place. I also changed the web interface to always dump the event and
      event group summaries.
      
      The parser gets a new file (event.tcl), and the "at" method deals with
      event group events by expanding them inline into individual events
      sent to each member. For some agents, this is unavoidable; traffic
      generators get the initial params in the event, so it is not possible
      to send a single event to all members of the group. Same goes for
      program objects, although program objects do default to the initial
      command now, at least on new images.
      
      Changed the event scheduler to load the event groups table. The
      current operation is that the scheduler expands events sent to a
      group, into a set of distinct events sent to each member of the
      group. At some point we proably want to optimize this by telling the
      agents (running on the nodes) what groups they are members of.
      
      Other News: Added a "mustdelay" slot to the virt_lans table so the
      parser can tell assign_wrapper that a link needs to be delayed, say if
      there are events or if the link is red/gred. Previously,
      assign_wrapper tried to figure this out by looking at the event list,
      etc. I have removed that code; see database-migrate for instructions
      on how to initialize this slot in existing experiments. assign_wrapper
      is free to ignore or insert delays anyway, but having the parser do
      this makes more sense.
      
      I also made some "rename" changes to the parser wrt queues and lans
      and links. Not really necessary, but I got sidetracked (for several
      hours!) trying to understand that rename stuff a little better, and
      now I do.
      ed964507
  7. 13 Jul, 2004 1 commit
  8. 12 Jul, 2004 2 commits
  9. 07 Jul, 2004 1 commit
  10. 28 Jun, 2004 1 commit
  11. 25 Jun, 2004 1 commit
  12. 24 Jun, 2004 1 commit
  13. 23 Jun, 2004 5 commits
  14. 21 Jun, 2004 1 commit
  15. 18 Jun, 2004 1 commit
  16. 17 Jun, 2004 1 commit
    • Leigh B. Stoller's avatar
      Add a usemodelnet slot to the experiments table to indicate · b6707a07
      Leigh B. Stoller authored
             that an experiment prefers to use modelnet for traffic shaping.
             At some future time maybe we can mix modelnet with delay nodes,
             but please do not hold your breath waiting.
      
      	alter table experiments add usemodelnet tinyint(1) NOT NULL \
      		default '0' after useprepass;
      
             Add modelnet_cores and modelnet_edges variables to hold user
             tunable number of physical core nodes and edge nodes to throw
             at a virtual topology.
      
      	alter table experiments add modelnet_cores tinyint(4) unsigned \
      		NOT NULL default '0' after usemodelnet;
              alter table experiments add modelnet_edges tinyint(4) unsigned \
      		NOT NULL default '0' after modelnet_cores;
      
             Add ismodelnet and isphantom slots to node_types table. ismodelnet
             is set for modelnet nodes (which are also going to be isvirt).  Add
             isphantom to mark nodes that do no get underlying physical nodes;
             there will be an entry in the reserved table but no entries in the
             nodes table. Initially, modelnet virtual nodes will all be phantoms.
             Will possibly change later.
      
      	alter table node_types add ismodelnet tinyint(1) NOT NULL \
      		default '0' after isvirtnode;
      	alter table node_types add isphantom tinyint(1) NOT NULL \
      		default '0' after ismodelnet;
      
             Not sure that isphantom is going to work cause of the number of
             queries that join reserved with the nodes table. I might end up
             making nodes dynamic instead, creating and detroying them on the
             fly. I would prefer that isphantom works, but I am willing to live
             with isdynamic since we can use that for all of our virtual nodes.
      
      	alter table node_types add isdynamic tinyint(1) NOT NULL \
      		default '0' after isphantom;
      b6707a07
  17. 16 Jun, 2004 1 commit
  18. 15 Jun, 2004 1 commit
  19. 09 Jun, 2004 2 commits
    • Robert Ricci's avatar
      Add duplicate fields from the location_info table into the new_nodes · b6341a4e
      Robert Ricci authored
      table - this will allow us to place them on the map while they are still
      in limbo.
      
       ALTER TABLE new_nodes ADD COLUMN (floor varchar(32) default NULL,
          building varchar(32) default NULL,
          loc_x int(10) unsigned NOT NULL default '0',
          loc_y int(10) unsigned NOT NULL default '0',
          contact tinytext,
          phone tinytext,
          room varchar(32) default NULL);
      b6341a4e
    • Leigh B. Stoller's avatar
      Add floorimages and buildings tables for wireless floormap support. · 632ef32b
      Leigh B. Stoller authored
      This is rather primitive still; We just need a place to define
      buildings and floors in buildings, so that we do not hardwire them
      into the code. This can get arbitrarily complicated, but not until we
      need it.
      
      	CREATE TABLE buildings (
      	  building varchar(32) NOT NULL default '',
      	  image_path tinytext,
      	  title tinytext NOT NULL,
      	  PRIMARY KEY  (building)
      	) TYPE=MyISAM;
      
      The image_path is optional for buildings. The title is a string to
      print along with the images (Merril Engineering Building).
      
      	CREATE TABLE floorimages (
      	  building varchar(32) NOT NULL default '',
      	  floor varchar(32) NOT NULL default '',
      	  image_path tinytext,
      	  thumb_path tinytext,
      	  x1 int(6) NOT NULL default '0',
      	  y1 int(6) NOT NULL default '0',
      	  x2 int(6) NOT NULL default '0',
      	  y2 int(6) NOT NULL default '0',
      	  PRIMARY KEY  (building, floor)
      	) TYPE=MyISAM;
      
      The image_path is not optional; it is either an absolute path or a
      filename in $TB/www. The thumb_path is for a tiny view of it. Floor is
      something like 1, 2, 3 but could also be basement, lobby, penthouse,
      etc. The x,y coordinates are intended to be bounding box coords of the
      "interesting" part of the image so that it is easier to scale specific
      entries from the location_info table. But, not really sure about this
      yet; needs more thought and some investigation about appropriate ways
      to store coordinate values like this.
      632ef32b
  20. 08 Jun, 2004 2 commits
    • Leigh B. Stoller's avatar
      Add another index to virt_lans. · d1998932
      Leigh B. Stoller authored
      d1998932
    • Leigh B. Stoller's avatar
      Add slots to virt_lans to rationalize the relationship between · 43a804e9
      Leigh B. Stoller authored
      virt_lans and virt_nodes. The intent is to migrate away from
      the convention we use in virt_nodes:ips and virt_lans:member
      to a more acceptable representation (one that does not rely
      on textual conventions like space separated lists of colon
      seperated entities. Instead:
      
      	virt_nodes
      		vname:	nodeA
              virt_lans
      		vname:  link0
      		vport:  0
      		ip:     1.1.1.2
      
      		vname:  link1
      		vport:  1
      		ip:     1.1.2.2
      
      	alter table virt_lans add vnode varchar(32) NOT NULL default '' \
      		after vname;
      	alter table virt_lans add vport tinyint(3) NOT NULL default '0' \
      		after vnode;
              alter table virt_lans add ip varchar(15) NOT NULL default '' \
      		after vport;
      
      Then run this script to update these new fields from the
      existing ips,member slots. This must be run after installing
      the parser changes, or you can just run it again.
      
      	./ipmember.pl
      
      This is a transitional phase; the old slots will be left in place
      until they are no longer used, at which time we will also add a
      unique key to the table (pid,eid,vname,vnode,vport). assign_wrapper
      will be the hardest to change, but other scripts should be easy.
      
      Whats vport about? Rather then rely on IP addresses to form a
      unique key, we use vport (a small integer) so that we can delay the
      IP assignment until later (after initial DB insertion).
      43a804e9
  21. 04 Jun, 2004 1 commit
  22. 01 Jun, 2004 1 commit
  23. 25 May, 2004 2 commits
  24. 21 May, 2004 1 commit
  25. 18 May, 2004 1 commit
  26. 07 May, 2004 1 commit
  27. 03 May, 2004 1 commit
    • Leigh B. Stoller's avatar
      Change to eventlist table; bump size of vname from 20 to 64. I do not · d5c51dd2
      Leigh B. Stoller authored
      see (or remember) any reason for this slot to be 20 chars, when the
      name of every other vname slot is 32. I looked in the event scheduler
      and there do not appear to be any problems there with bumping it. Note
      that I choose 64 cause we tend to construct agent names that might be
      longer then 32 since they are based on real vnames (lan0, node0, etc).
      d5c51dd2
  28. 19 Apr, 2004 1 commit
  29. 15 Apr, 2004 1 commit
  30. 09 Apr, 2004 1 commit