Ignore:
Timestamp:
Feb 1, 2013 5:15:31 PM (11 years ago)
Author:
Ted Faber <faber@…>
Branches:
master
Children:
e48d8eb
Parents:
f7fc551
Message:

Moving to new name and creating real federation connections

File:
1 moved

Legend:

Unmodified
Added
Removed
  • fedd/federation/containers_segment.py

    rf7fc551 rc261c0f  
    2424        ssh_emulab_segment.__init__(self, log=log, keyfile=keyfile, debug=debug)
    2525        xmlrpc_emulab_segment.__init__(self, boss=boss, ops=ops, cert=cert)
    26         self.start_mixed = '/share/benito/start_mixed %s %s %s'
    27         self.start_qemu =  '/share/benito/start_qemu %s %s %s'
     26        # XXX: better way to work this...
     27        self.containerize = '/share/containers-dev/containerize.py --config /share/containers-dev/site.conf %s %s %s'
    2828
    2929    def get_mapping(self, pid, eid):
    3030        """
    31         Benito's info reporting is not sufficient to support this yet
     31        Containers's info reporting is not sufficient to support this yet
    3232        """
    3333        pass
     
    103103        """
    104104
    105         # benito listens to the filename extension.  tclfile here is really
     105        # containers listens to the filename extension.  tclfile here is really
    106106        # topdl, but we'll move it to a different filename.
    107107        if tclfile.endswith('.tcl'):
    108108            topdlfile = os.path.join(tmpdir, 'experiment.xml')
    109             os.rename(tclfile, topdlfile)
     109            self.ssh_cmd(user, self.ops, 'mv %s %s' % (tclfile, topdlfile))
    110110        else:
    111111            topdlfile = tclfile
     
    117117            self.terminate_exp(pid, eid)
    118118
    119         top = topdl.topology_from_xml(filename=topdlfile, top='experiment')
    120         embedded = False
    121         for e in top.elements:
    122             if isinstance(e, topdl.Computer) and \
    123                     e.get_attribute('partition') is not None:
    124                 embedded = True
    125                 break
    126         # on the for
    127         else:
    128             embedded = False
    129 
    130         if embedded:
    131             cmd = self.start_mixed  %  (pid, eid, topdlfile)
    132         else:
    133             cmd = self.start_qemu % (pid, eid, topdlfile, 20)
     119        cmd = self.containerize  %  (pid, eid, topdlfile)
    134120
    135121        if not self.ssh_cmd(user, self.ops, cmd):
    136             self.log.error("Cannot create benito experiment")
     122            self.log.error("Cannot create containers experiment")
     123            return False
     124
     125        if not self.set_up_experiment_filespace(user, self.ops,
     126                pid, eid, tmpdir):
    137127            return False
    138128
Note: See TracChangeset for help on using the changeset viewer.