Run capacity checks with container isolation (#10688)

This requires swapping out the container images
  for the execution nodes from awx-ee to the awx image

For completeness, the hop node image is switched to the raw
  receptor image

A few outright bugs are fixed here
  memory calculation just was not right at all
  the execution_capacity calculation was reverse of intention

Drop in a few TODOs about error handling from debugging
This commit is contained in:
Alan Rominger
2021-07-21 09:53:22 -04:00
parent e7be86867d
commit f597205fa7
3 changed files with 35 additions and 19 deletions

View File

@@ -209,7 +209,7 @@ class InstanceGroup(HasPolicyEditsMixin, BaseModel, RelatedJobsMixin):
@property
def execution_capacity(self):
# TODO: update query to exclude based on node_type field
return sum([inst.capacity for inst in self.instances.exclude(version__startswith='ansible-runner-')])
return sum([inst.capacity for inst in self.instances.filter(version__startswith='ansible-runner-')])
@property
def jobs_running(self):