Changeset 03b9b14 for fedd


Ignore:
Timestamp:
Dec 5, 2008 2:38:46 PM (16 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
7ca25b3
Parents:
02786fc
Message:

2 changes:

Pass an interface parameter to fed-tun.pl to use different interfaces on the
differnet testbeds. This needs to be replaced with a node_attribute-based
solution.

Open /dev/null for writing when redirecting to it.

Location:
fedd/federation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/allocate_project.py

    r02786fc r03b9b14  
    193193        a service exception.
    194194        """
     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
    195201        self.log.debug("[%s]: %s" % (log_prefix, ' '.join(cmd)))
    196202        if not self.debug:
    197203            try:
    198                 return subprocess.call(cmd)
     204                return subprocess.call(cmd, stdout=dnull, stderr=dnull)
    199205            except OSError, e:
    200206                raise service_error(service_error.internal,
     
    626632        nodes = [ ]
    627633
    628         print req
    629 
    630634        try:
    631635            if req['ReleaseProjectRequestBody']['project'].has_key('name'):
  • fedd/federation/experiment_control.py

    r02786fc r03b9b14  
    438438
    439439        try:
    440             dnull = open("/dev/null", "r")
     440            dnull = open("/dev/null", "w")
    441441        except IOError:
    442442            self.log.debug("[ssh_file]: failed to open /dev/null for redirect")
     
    445445        self.log.debug("[scp_file]: %s" % " ".join(scp_cmd))
    446446        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)
    449448
    450449        return rv == 0
     
    680679        """
    681680        user = tbparams[tb]['user']
    682         host = tbparams[tb]['host']
     681        host = "%s%s" % (tbparams[tb]['host'], tbparams[tb]['domain'])
    683682        pid = tbparams[tb]['project']
    684683
     
    881880        """
    882881
     882        # XXX This is needless complexity.  It must vanish.
    883883        translate_attr = {
    884884            'slavenodestartcmd': 'expstart',
     
    889889            'connectortype': 'gwtype',
    890890            'tunnelcfg': 'tun',
     891            'tunnelinterface': 'tunnelinterface',
    891892            'smbshare': 'smbshare',
    892893        }
     
    12191220            seer_control = "%s%s" % \
    12201221                    (tbparams[gw].get('control', "control"), sdomain)
     1222            tunnel_iface = tbparams[gw].get("tunnelinterface", None)
    12211223
    12221224            if self.fedkit:
     
    12521254            print >>gwconfig, "Active: %s" % active
    12531255            print >>gwconfig, "TunnelCfg: %s" % tunnel_cfg
     1256            if tunnel_iface:
     1257                print >>gwconfig, "Interface: %s" % tunnel_iface
    12541258            print >>gwconfig, "BossName: %s" % boss
    12551259            print >>gwconfig, "FsName: %s" % fs
     
    17271731                for tb in succeeded:
    17281732                    self.stop_segment(tb, eid, tbparams)
     1733                # release the allocations
     1734                for tb in tbparams.keys():
     1735                    self.release_access(tb, tbparams[tb]['aid'])
    17291736                # Remove the placeholder
    17301737                self.state_lock.acquire()
     
    19921999
    19932000                    domain = fed['emulab']['domain']
    1994                     host  = "%s%s" % (fed['emulab']['ops'], domain)
     2001                    host  = fed['emulab']['ops']
    19952002                    aid = fed['allocID']
    19962003                except KeyError, e:
Note: See TracChangeset for help on using the changeset viewer.