Changeset dadc4da for fedd/federation
- Timestamp:
- Mar 1, 2010 11:07:01 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- f52f5df
- Parents:
- 9c2e4e1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
r9c2e4e1 rdadc4da 1075 1075 # Wait until all finish (keep pinging the log, though) 1076 1076 mins = 0 1077 revoked = False 1077 1078 while not thread_pool.wait_for_all_done(60.0): 1078 1079 mins += 1 1079 1080 alloc_log.info("Waiting for sub threads (it has been %d mins)" \ 1080 1081 % mins) 1082 if not revoked and \ 1083 len([ t.getName() for t in threads if not t.rv ]) > 0: 1084 # a testbed has failed. Revoke this experiment's 1085 # synchronizarion values so that sub experiments will not 1086 # deadlock waiting for synchronization that will never happen 1087 self.log.info("A subexperiment has failed to swap in, " + \ 1088 "revoking synch keys") 1089 var_key = "fedid:%s" % expid 1090 for k in self.synch_store.all_keys(): 1091 if len(k) > 45 and k[0:46] == var_key: 1092 self.synch_store.revoke_key(k) 1093 revoked = True 1081 1094 1082 1095 thread_pool.clear() … … 2659 2672 if len(k) > 45 and k[0:46] in fedid_keys: 2660 2673 self.synch_store.del_value(k) 2661 except synch_store.BadDelet eionError:2674 except synch_store.BadDeletionError: 2662 2675 pass 2663 2676 self.write_store() … … 2687 2700 2688 2701 if self.auth.check_attribute(fid, name): 2689 v = self.synch_store.get_value(name, wait) 2702 try: 2703 v = self.synch_store.get_value(name, wait) 2704 except synch_store.RevokedKeyError: 2705 # No more synch on this key 2706 raise service_error(service_error.federant, 2707 "Synch key %s revoked" % name) 2690 2708 if v is not None: 2691 2709 rv['value'] = v … … 2717 2735 raise service_error(service_error.req, 2718 2736 "Value already set: %s" %name) 2737 except synch_store.RevokedKeyError: 2738 # No more synch on this key 2739 raise service_error(service_error.federant, 2740 "Synch key %s revoked" % name) 2719 2741 return { 'name': name, 'value': v } 2720 2742 else:
Note: See TracChangeset
for help on using the changeset viewer.