Ignore:
Timestamp:
Oct 6, 2011 3:58:02 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, info-ops, master
Children:
3df9b33
Parents:
2933343 (diff), f3898f7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of git://fedd.deterlab.net/fedd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_access.py

    r2933343 rb6a6206  
    934934        vchars_re = '[^' + string.ascii_letters + string.digits  + '-]'
    935935
     936        self.state_lock.acquire()
     937        if aid in self.allocation:
     938            proj = self.allocation[aid].get('project', None)
     939            if not proj:
     940                proj = self.allocation[aid].get('sproject', None)
     941        self.state_lock.release()
     942
     943        if not proj:
     944            raise service_error(service_error.internal,
     945                    "Can't find project for %s" %aid)
     946
    936947        for a in attrs:
    937948            if a['attribute'] in configs:
     
    951962                ename = a['value']
    952963
    953         # Names longer than the emulab max are discarder
    954         if ename and len(ename) <= self.max_name_len:
     964        # Names longer than the emulab max are discarded
     965        # Projects with a group require nonce experiment names as well
     966        if ename and len(ename) <= self.max_name_len and '/' not in proj:
    955967            # Clean up the experiment name so that emulab will accept it.
    956968            ename = re.sub(vchars_re, '-', ename)
     
    973985        self.state_lock.acquire()
    974986        if aid in self.allocation:
    975             proj = self.allocation[aid].get('project', None)
    976             if not proj:
    977                 proj = self.allocation[aid].get('sproject', None)
    978987            user = self.allocation[aid].get('user', None)
    979988            self.allocation[aid]['experiment'] = ename
     
    9921001            self.write_state()
    9931002        self.state_lock.release()
    994 
    995         if not proj:
    996             raise service_error(service_error.internal,
    997                     "Can't find project for %s" %aid)
    9981003
    9991004        if not user:
     
    10921097                            certfile, tmpdir)
    10931098
     1099            if '/' in proj: proj, gid = proj.split('/')
     1100            else: gid = None
     1101
     1102
    10941103            # Set up userconf and seer if needed
    10951104            self.configure_userconf(services, tmpdir)
     
    11091118                    debug=self.create_debug, log=alloc_log, boss=self.boss,
    11101119                    cert=self.xmlrpc_cert)
    1111             rv = starter(self, ename, proj, user, expfile, tmpdir)
     1120            rv = starter(self, ename, proj, user, expfile, tmpdir, gid=gid)
    11121121        except service_error, e:
    11131122            err = e
     
    11611170            raise service_error(service_error.internal,
    11621171                    "Can't find project for %s" % aid)
     1172        else:
     1173            if '/' in proj: proj, gid = proj.split('/')
     1174            else: gid = None
    11631175
    11641176        if not user:
     
    11701182        stopper = self.stop_segment(keyfile=self.ssh_privkey_file,
    11711183                debug=self.create_debug, boss=self.boss, cert=self.xmlrpc_cert)
    1172         stopper(self, user, proj, ename)
     1184        stopper(self, user, proj, ename, gid)
    11731185        return { 'allocID': req['allocID'], 'proof': proof.to_dict() }
Note: See TracChangeset for help on using the changeset viewer.