Changeset 3132419
- Timestamp:
- Feb 15, 2010 8:51:04 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- c3a3fe3
- Parents:
- 1899afd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
r1899afd r3132419 986 986 fail_soft = False 987 987 988 slaves= [ k for k in allocated.keys() \989 if k != master andnot topo[k].get_attribute('transit')]988 non_transit = [ k for k in allocated.keys() \ 989 if not topo[k].get_attribute('transit')] 990 990 transit = [ k for k in allocated.keys() \ 991 991 if topo[k].get_attribute('transit')] … … 1052 1052 1053 1053 if len(failed) == 0: 1054 for tb in slaves:1054 for tb in non_transit: 1055 1055 # Create and start a thread to start the segment, and save it 1056 1056 # to get the return value later … … 1075 1075 caller=self.call_StartSegment, 1076 1076 log_collector=log_collector), 1077 args=(uri, aid, topo[tb], False, attrs, connInfo[tb],1078 services),1077 args=(uri, aid, topo[tb], tb == master, 1078 attrs, connInfo[tb], services), 1079 1079 name=tb, 1080 1080 pdata=thread_pool, trace_file=self.trace_file) … … 1091 1091 thread_pool.clear() 1092 1092 1093 # If none failed, start the master1094 1093 failed = [ t.getName() for t in threads if not t.rv ] 1095 1096 if len(failed) == 0:1097 uri = self.tbmap.get(master, None)1098 if not uri:1099 raise service_error(service_error.internal,1100 "Unknown testbed %s !?" % master)1101 1102 if tbparams[master].has_key('allocID') and \1103 tbparams[master]['allocID'].has_key('fedid'):1104 aid = tbparams[master]['allocID']['fedid']1105 else:1106 raise service_error(service_error.internal,1107 "No alloc id for testbed %s !?" % master)1108 t = self.pooled_thread(1109 target=self.start_segment(log=log, debug=self.debug,1110 testbed=master, cert_file=self.cert_file,1111 cert_pwd=self.cert_pwd,1112 trusted_certs=self.trusted_certs,1113 caller=self.call_StartSegment,1114 log_collector=log_collector),1115 args =(uri, aid, topo[master], True, attrs,1116 connInfo[master], services),1117 name=master, pdata=thread_pool, trace_file=self.trace_file)1118 threads.append(t)1119 t.start()1120 # Wait until the master finishes (keep pinging the log, though)1121 mins = 01122 while not thread_pool.wait_for_all_done(60.0):1123 mins += 11124 alloc_log.info("Waiting for master (it has been %d mins)" \1125 % mins)1126 # update failed to include the master, if it failed1127 failed = [ t.getName() for t in threads if not t.rv ]1128 1129 1094 succeeded = [tb for tb in allocated.keys() if tb not in failed] 1095 1130 1096 # If one failed clean up, unless fail_soft is set 1131 1097 if failed:
Note: See TracChangeset
for help on using the changeset viewer.