account for isolated job status

* We can not query the dispatcher running on isolated nodes to see if
the playbook is still running because that is the nature of isolated
nodes, they don't run the dispatcher nor do they run the message broker.
Therefore, we should query the control node that is arbitrating the
isolated work. If the control node process in the dispatcher is dead,
consider the iso job dead.
This commit is contained in:
chris meyers 2020-01-27 15:10:55 -05:00 committed by Ryan Petrello
parent 3f2d757f4e
commit ea29f4b91f
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -1361,7 +1361,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
timeout = 5
try:
running = self.celery_task_id in ControlDispatcher(
'dispatcher', self.execution_node
'dispatcher', self.controller_node or self.execution_node
).running(timeout=timeout)
except socket.timeout:
logger.error('could not reach dispatcher on {} within {}s'.format(