Changeset 63a35b7
- Timestamp:
- Nov 3, 2009 11:52:28 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-2.00, version-3.01, version-3.02
- Children:
- 1da94bc
- Parents:
- 6409cc5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
r6409cc5 r63a35b7 2419 2419 if id.has_key('localname'): ids.append(id['localname']) 2420 2420 2421 # Collect the allocation/segment ids 2422 for fed in fed_exp.get('federant', []): 2421 # Collect the allocation/segment ids into a dict keyed by the fedid 2422 # of the allocation (or a monotonically increasing integer) that 2423 # contains a tuple of uri, aid (which is a dict...) 2424 for i, fed in enumerate(fed_exp.get('federant', [])): 2423 2425 try: 2424 tb = fed['uri'] 2425 aid = fed['allocID'] 2426 uri = fed['uri'] 2427 aid = fed['allocID'] 2428 k = fed['allocID'].get('fedid', i) 2426 2429 except KeyError, e: 2427 2430 continue 2428 tbparams[ tb] = aid2431 tbparams[k] = (uri, aid) 2429 2432 fed_exp['experimentStatus'] = 'terminating' 2430 2433 if self.state_filename: self.write_state() … … 2436 2439 if len(tbparams) > 0: 2437 2440 thread_pool = self.thread_pool(self.nthreads) 2438 for tbin tbparams.keys():2441 for k in tbparams.keys(): 2439 2442 # Create and start a thread to stop the segment 2440 2443 thread_pool.wait_for_slot() 2441 #uri = self.tbmap.get(tb, None) 2442 uri = tb 2444 uri, aid = tbparams[k] 2443 2445 t = self.pooled_thread(\ 2444 2446 target=self.terminate_segment(log=dealloc_log, 2445 testbed= tb,2447 testbed=uri, 2446 2448 cert_file=self.cert_file, 2447 2449 cert_pwd=self.cert_pwd, 2448 2450 trusted_certs=self.trusted_certs, 2449 2451 caller=self.call_TerminateSegment), 2450 args=(uri, tbparams[tb]), name=tb,2452 args=(uri, aid), name=k, 2451 2453 pdata=thread_pool, trace_file=self.trace_file) 2452 2454 t.start() … … 2458 2460 # ignore errors releasing those allocations 2459 2461 try: 2460 for tbin tbparams.keys():2462 for k in tbparams.keys(): 2461 2463 # This releases access by uri 2462 self.release_access(None, tbparams[tb], uri=tb) 2464 uri, aid = tbparams[k] 2465 self.release_access(None, aid, uri=uri) 2463 2466 except service_error, e: 2464 2467 if status != 'failed' and not force:
Note: See TracChangeset
for help on using the changeset viewer.