• Leigh B. Stoller's avatar
    Two big changes · e6c90969
    Leigh B. Stoller authored
    1. Allow use of the shared nodes via the "exclusive" tag in the rspec.
    
    2. Switch to using the mapper in GetTicket() and in RedeemTicket() as
       per this email I sent:
    
    * GetTicket(): New rspec comes in and I build a virtual topology as I
     parse the rspec. Basically, virt_nodes and virt_lans table entries,
     which are stored into the DB. The rspec can include wildcards or
     specific nodes; I use the "fixed" slot of the virt_nodes table. Note
     that I am not yet handling fixed ifaces. Nice thing about this is
     that all of the show exp tools work.
    
     I run the (new) mapper on it in "solution" mode. This does two
     things; wildcards are mapped, and 2) it verifies that the rspec is
     mappable on the local hardware. Solution mode does not actually
     change the DB, but rather it spits out an XML file that I parse
     (note, we eventually will pass the rspec through, but I am not ready
     for that yet). I then allocate the nodes to the holding area, update
     the rspec, create a ticket, and return it.
    
    * RedeemTicket(): I run the new mapper again, only this time in real
     mode with -update. This is basically a redo of the run above since
     all the nodes are reserved already, but the DB is actually filled
     out this time. I then create the slivers and such.
    
     The other difference is that instead of creating the vlans by hand,
     I can now run snmpit -t to do the work for me. Ditto for tear down
     with snmpit -r.
    
     Another bonus is that I can add (missing) IP addressess during the
     initial rspec parse, and the nodes now boot and have their
     interfaces configured. Virtual interfaces too, including the ones
     inside of virtual nodes.
    
    * All of the above works with shared nodes too:
    
    "<rspec xmlns=\"http://protogeni.net/resources/rspec/0.1\"> " +\
    " <node virtual_id=\"geni1\" "+\
    "       virtualization_type=\"emulab-vnode\" " +\
    "       virtualization_subtype=\"emulab-openvz\" " +\
    "       exclusive=\"0\"> " +\
    "   <interface virtual_id=\"virt0\"/> " +\
    " </node>" +\
    " <node virtual_id=\"geni2\" "+\
    "       virtualization_type=\"emulab-vnode\" " +\
    "       virtualization_subtype=\"emulab-openvz\" " +\
    "       exclusive=\"0\"> " +\
    "   <interface virtual_id=\"virt0\"/> " +\
    " </node>" +\
    " <link virtual_id=\"link0\"> " +\
    "  <interface_ref " +\
    "            virtual_interface_id=\"virt0\" " +\
    "            virtual_node_id=\"geni1\" " +\
    "            /> " +\
    "  <interface_ref " +\
    "            virtual_interface_id=\"virt0\" " +\
    "            virtual_node_id=\"geni2\" " +\
    "            /> " +\
    " </link> " +\
    "</rspec>"
    
    The shared nodes boot, and you can ping on the experimental networks.
    
    Caveats:
    
    * UpdateTicket and UpdateSliver need work as per the mail I sent the
     other day about the state of the sliver between the ticket and the
     sliver operations.
    
    * Collocation specifications are ignored since we do not have any way
     to specify this to assign when wildcards are used. Rob, I am
     wondering if assign has any tricks we can take advantage of.
    
    * Still need to commit all the snmpit changes and get that hooked into
     the CM.
    e6c90969
GeniCM.pm.in 90.4 KB