Changeset c261c0f for fedd/federation/containers_segment.py
- Timestamp:
- Feb 1, 2013 5:15:31 PM (11 years ago)
- Branches:
- master
- Children:
- e48d8eb
- Parents:
- f7fc551
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/containers_segment.py
rf7fc551 rc261c0f 24 24 ssh_emulab_segment.__init__(self, log=log, keyfile=keyfile, debug=debug) 25 25 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' 28 28 29 29 def get_mapping(self, pid, eid): 30 30 """ 31 Benito's info reporting is not sufficient to support this yet31 Containers's info reporting is not sufficient to support this yet 32 32 """ 33 33 pass … … 103 103 """ 104 104 105 # benitolistens to the filename extension. tclfile here is really105 # containers listens to the filename extension. tclfile here is really 106 106 # topdl, but we'll move it to a different filename. 107 107 if tclfile.endswith('.tcl'): 108 108 topdlfile = os.path.join(tmpdir, 'experiment.xml') 109 os.rename(tclfile, topdlfile)109 self.ssh_cmd(user, self.ops, 'mv %s %s' % (tclfile, topdlfile)) 110 110 else: 111 111 topdlfile = tclfile … … 117 117 self.terminate_exp(pid, eid) 118 118 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) 134 120 135 121 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): 137 127 return False 138 128
Note: See TracChangeset
for help on using the changeset viewer.