mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 08:18:43 -03:30
Treat the awx_1 node as a hybrid node for now, use local work type (#10726)
This commit is contained in:
@@ -209,7 +209,7 @@ class InstanceGroup(HasPolicyEditsMixin, BaseModel, RelatedJobsMixin):
|
|||||||
@property
|
@property
|
||||||
def execution_capacity(self):
|
def execution_capacity(self):
|
||||||
# TODO: update query to exclude based on node_type field
|
# TODO: update query to exclude based on node_type field
|
||||||
return sum([inst.capacity for inst in self.instances.filter(version__startswith='ansible-runner-')])
|
return sum([inst.capacity for inst in self.instances.all()])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def jobs_running(self):
|
def jobs_running(self):
|
||||||
|
|||||||
@@ -3231,7 +3231,10 @@ class AWXReceptorJob:
|
|||||||
else:
|
else:
|
||||||
work_type = 'kubernetes-incluster-auth'
|
work_type = 'kubernetes-incluster-auth'
|
||||||
elif isinstance(self.task.instance, (Job, AdHocCommand)):
|
elif isinstance(self.task.instance, (Job, AdHocCommand)):
|
||||||
work_type = 'ansible-runner'
|
if self.task.instance.execution_node == self.task.instance.controller_node:
|
||||||
|
work_type = 'local'
|
||||||
|
else:
|
||||||
|
work_type = 'ansible-runner'
|
||||||
else:
|
else:
|
||||||
work_type = 'local'
|
work_type = 'local'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user