mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 05:55:59 -03:30
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user