Changeset 03b9b14
- Timestamp:
- Dec 5, 2008 2:38:46 PM (16 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- 7ca25b3
- Parents:
- 02786fc
- Location:
- fedd/federation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/allocate_project.py
r02786fc r03b9b14 193 193 a service exception. 194 194 """ 195 try: 196 dnull = open("/dev/null", "w") 197 except IOError: 198 self.log.warn("[run_cmd]: failed to open /dev/null for redirect") 199 dnull = None 200 195 201 self.log.debug("[%s]: %s" % (log_prefix, ' '.join(cmd))) 196 202 if not self.debug: 197 203 try: 198 return subprocess.call(cmd )204 return subprocess.call(cmd, stdout=dnull, stderr=dnull) 199 205 except OSError, e: 200 206 raise service_error(service_error.internal, … … 626 632 nodes = [ ] 627 633 628 print req629 630 634 try: 631 635 if req['ReleaseProjectRequestBody']['project'].has_key('name'): -
fedd/federation/experiment_control.py
r02786fc r03b9b14 438 438 439 439 try: 440 dnull = open("/dev/null", " r")440 dnull = open("/dev/null", "w") 441 441 except IOError: 442 442 self.log.debug("[ssh_file]: failed to open /dev/null for redirect") … … 445 445 self.log.debug("[scp_file]: %s" % " ".join(scp_cmd)) 446 446 if not self.debug: 447 if dnull: rv = call(scp_cmd, stdout=dnull, stderr=dnull) 448 else: rv = call(scp_cmd) 447 rv = call(scp_cmd, stdout=dnull, stderr=dnull) 449 448 450 449 return rv == 0 … … 680 679 """ 681 680 user = tbparams[tb]['user'] 682 host = tbparams[tb]['host']681 host = "%s%s" % (tbparams[tb]['host'], tbparams[tb]['domain']) 683 682 pid = tbparams[tb]['project'] 684 683 … … 881 880 """ 882 881 882 # XXX This is needless complexity. It must vanish. 883 883 translate_attr = { 884 884 'slavenodestartcmd': 'expstart', … … 889 889 'connectortype': 'gwtype', 890 890 'tunnelcfg': 'tun', 891 'tunnelinterface': 'tunnelinterface', 891 892 'smbshare': 'smbshare', 892 893 } … … 1219 1220 seer_control = "%s%s" % \ 1220 1221 (tbparams[gw].get('control', "control"), sdomain) 1222 tunnel_iface = tbparams[gw].get("tunnelinterface", None) 1221 1223 1222 1224 if self.fedkit: … … 1252 1254 print >>gwconfig, "Active: %s" % active 1253 1255 print >>gwconfig, "TunnelCfg: %s" % tunnel_cfg 1256 if tunnel_iface: 1257 print >>gwconfig, "Interface: %s" % tunnel_iface 1254 1258 print >>gwconfig, "BossName: %s" % boss 1255 1259 print >>gwconfig, "FsName: %s" % fs … … 1727 1731 for tb in succeeded: 1728 1732 self.stop_segment(tb, eid, tbparams) 1733 # release the allocations 1734 for tb in tbparams.keys(): 1735 self.release_access(tb, tbparams[tb]['aid']) 1729 1736 # Remove the placeholder 1730 1737 self.state_lock.acquire() … … 1992 1999 1993 2000 domain = fed['emulab']['domain'] 1994 host = "%s%s" % (fed['emulab']['ops'], domain)2001 host = fed['emulab']['ops'] 1995 2002 aid = fed['allocID'] 1996 2003 except KeyError, e:
Note: See TracChangeset
for help on using the changeset viewer.