Commit f1de5f79 authored by Paul Rich's avatar Paul Rich
Browse files

Switching back to using UPDATE_THREAD_TIMEOUT instead of instance var.

parent 406499f5
...@@ -81,7 +81,6 @@ class CraySystem(BaseSystem): ...@@ -81,7 +81,6 @@ class CraySystem(BaseSystem):
''' '''
start_time = time.time() start_time = time.time()
self.update_thread_timeout = UPDATE_THREAD_TIMEOUT
super(CraySystem, self).__init__(*args, **kwargs) super(CraySystem, self).__init__(*args, **kwargs)
_logger.info('BASE SYSTEM INITIALIZED') _logger.info('BASE SYSTEM INITIALIZED')
self._common_init_restart() self._common_init_restart()
...@@ -407,9 +406,9 @@ class CraySystem(BaseSystem): ...@@ -407,9 +406,9 @@ class CraySystem(BaseSystem):
self.logger.critical("_run_update_state: error occurred, timings below.") self.logger.critical("_run_update_state: error occurred, timings below.")
for func_name, error, td in metadata_lst: for func_name, error, td in metadata_lst:
self.logger.critical("%s: %s", func_name, td) self.logger.critical("%s: %s", func_name, td)
self.logger.info('_run_update_state sleeping for %s, tid:%s', self.update_thread_timeout, self.logger.info('_run_update_state sleeping for %s, tid:%s', UPDATE_THREAD_TIMEOUT,
get_current_thread_identifier()) get_current_thread_identifier())
Cobalt.Util.sleep(self.update_thread_timeout) Cobalt.Util.sleep(UPDATE_THREAD_TIMEOUT)
self.logger.critical('_run_update_state exiting, tid:%s', get_current_thread_identifier()) self.logger.critical('_run_update_state exiting, tid:%s', get_current_thread_identifier())
self.node_update_thread_kill_queue.get(timeout=1.0) self.node_update_thread_kill_queue.get(timeout=1.0)
self.node_update_thread_dead = True self.node_update_thread_dead = True
......
...@@ -1397,6 +1397,7 @@ class TestCraySystem2(object): ...@@ -1397,6 +1397,7 @@ class TestCraySystem2(object):
fake_reserve_called = False fake_reserve_called = False
Cobalt.Components.system.CraySystem.BACKFILL_EPSILON = 120 Cobalt.Components.system.CraySystem.BACKFILL_EPSILON = 120
Cobalt.Components.system.CraySystem.DRAIN_MODE = "first-fit" Cobalt.Components.system.CraySystem.DRAIN_MODE = "first-fit"
Cobalt.Components.system.CraySystem.UPDATE_THREAD_TIMEOUT = 0.2
#----boilerplatestuff---- #----boilerplatestuff----
# kill it # kill it
...@@ -1438,6 +1439,7 @@ class TestCraySystem2(object): ...@@ -1438,6 +1439,7 @@ class TestCraySystem2(object):
fake_reserve_called = False fake_reserve_called = False
Cobalt.Components.system.CraySystem.BACKFILL_EPSILON = 120 Cobalt.Components.system.CraySystem.BACKFILL_EPSILON = 120
Cobalt.Components.system.CraySystem.DRAIN_MODE = "first-fit" Cobalt.Components.system.CraySystem.DRAIN_MODE = "first-fit"
Cobalt.Components.system.CraySystem.UPDATE_THREAD_TIMEOUT = 0.2
#----boilerplatestuff---- #----boilerplatestuff----
# kill it # kill it
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment