conform isolated system to new early node choice

* Randomly chose an instance in the controller instance group for which
to control the isolated node run. Note the chosen instance via a job
controller_node field
This commit is contained in:
chris meyers
2018-05-25 14:53:24 -04:00
parent e720fe5dd0
commit 8d352a4edf
5 changed files with 57 additions and 27 deletions

View File

@@ -868,15 +868,10 @@ class BaseTask(Task):
'''
@with_path_cleanup
def run(self, pk, isolated_host=None, **kwargs):
def run(self, pk, **kwargs):
'''
Run the job/task and capture its output.
'''
'''
execution_node = settings.CLUSTER_HOST_ID
if isolated_host is not None:
execution_node = isolated_host
'''
instance = self.update_model(pk, status='running',
start_args='') # blank field to remove encrypted passwords
@@ -886,6 +881,8 @@ class BaseTask(Task):
extra_update_fields = {}
event_ct = 0
stdout_handle = None
isolated_host = instance.get_isolated_execution_node_name()
try:
kwargs['isolated'] = isolated_host is not None
self.pre_run_hook(instance, **kwargs)