Commit Graph

30667 Commits

Author SHA1 Message Date
Alan Rominger 68f79a1f3a Always use controlplane as project update backup IG (#10949)
* Always use controlplane as project update backup IG

Before, this was done conditionally to container_group jobs
this logic changes it so that controlgroup will always be a
firm backstop for project updates

* Code a little more defensively to make unit tests pass

* Fix unit tests
2021-08-30 14:23:09 -04:00
Jake McDermott b00e5876d4 Merge pull request #10972 from quasd/devel
Check dynamic_input fields also with has_input()
2021-08-30 14:09:10 -04:00
quasd 637d6173bc Check dynamic_input fields also with has_inputs() - Fixes,
using credential plugins in Container Registry credential,
with execution environments

Signed-off-by: quasd <qquasd@gmail.com>
2021-08-30 16:10:34 +03:00
Alan Rominger 424dbe8208 Use ansible-runner imports for cpu and memory calculation (#10954)
* Use ansible-runner imports for cpu and memory calculation

* Fix bug with capacity and memory adjustment
2021-08-27 21:46:53 -04:00
Alex Corey db34423af8 Merge pull request #10950 from AlexSCorey/10947-fix
Fixes erroneous pluralization from rrule
2021-08-27 16:20:05 -04:00
Alex Corey ca76f4db0c Fixes erroneous pluralization from rrule 2021-08-27 15:56:28 -04:00
Alan Rominger 711e5e09ba Delete images by id instead of tag in docker-refresh (#10957) 2021-08-27 11:51:58 -04:00
Alex Corey 6001bd5446 Merge pull request #10921 from AlexSCorey/tower_5194_fix
Properly marks string for translation and removes unused component
2021-08-26 16:43:52 -04:00
Alex Corey 02f60467d7 Properly marks string for translation and removes unused component 2021-08-26 16:23:32 -04:00
Sarah Akus cdce745c55 Merge pull request #10798 from keithjgrant/7834-advanced-search-fix
Only allow legal/logical match types in advanced search
2021-08-26 14:39:40 -04:00
Jim Ladd 467a37f8fe use settings.DEFAULT_EXECUTION_QUEUE_NAME in lieu of default 2021-08-26 11:15:14 -07:00
Jim Ladd 88a6412b54 only need to update IG's policy_instance_list field 2021-08-26 11:15:14 -07:00
Jim Ladd 502eaf9fb9 handle case where default IG does not exist
* also, only add discovered execution node to default group
  if `register`-ing the node actually resulted in a confirmed
  change
2021-08-26 11:15:14 -07:00
Jim Ladd de8eab0434 inspect_execution_nodes should *not* block when retreiving lock
* would otherwise hold up cluster heartbeat task
* furthermore, only really need one node to run through
  `inspect_execution_nodes` each interval
2021-08-26 11:15:14 -07:00
Jim Ladd f317fca9e4 add auto-discovered nodes to default IG
* add advisory_lock to avoid IG update race logic
* update IG by way of policy_instance_list
2021-08-26 11:15:14 -07:00
Jim Ladd 561fc289fb disable discovered instances by default 2021-08-26 11:15:14 -07:00
Jim Ladd 77933e97c0 create default IG when bringing up dev env 2021-08-26 11:15:14 -07:00
Alan Rominger ee4792dbf8 Add an option to create a cluster with control-only nodes (#10946) 2021-08-26 13:37:13 -04:00
Alan Rominger daf4310176 Clean up work_type processing and fix execution vs control capacity (#10930)
* Clean up added work_type processing for mesh_code branch

* track both execution and control capacity

* Remove unused execution_capacity property

* Count all forms of capacity to make test pass

* Force jobs to be on execution nodes, updates on control nodes

* Introduce capacity_type property to abstract some details out

* Update test to cover all job types at same time

* Register OpenShift nodes as control types

* Remove unqualified consumed_capacity from task manager and make unit tests work

* Remove unqualified consumed_capacity from task manager and make unit tests work

* Update unit test to execution vs control TM logic changes

* Fix bug, else handling for work_type method
2021-08-26 07:24:14 -04:00
Alex Corey fb0e55fd1b Merge pull request #10934 from AlexSCorey/10925-WrongDeleteModal
Fixes issue where the wrong text appeared in modal
2021-08-25 11:45:20 -04:00
Alex Corey 2e5ef22585 Fixes issue where the wrong text appeared in modal 2021-08-25 09:27:17 -04:00
Alan Rominger e7dbe90cb5 Merge pull request #10727 from ansible/mesh_code
Code changes to support execution-only nodes in receptor mesh
2021-08-24 13:39:19 -04:00
Alan Rominger 42484cf98d Obtain receptor sockfile from the receptor.conf file (#10932) 2021-08-24 11:20:21 -04:00
Shane McDonald 274e487a96 Attempt to surface streaming errors that were being eaten (#10918) 2021-08-24 10:33:00 -04:00
Alan Rominger 940c189c12 Corresponding AWX changes for runner --worker-info schema update (#10926) 2021-08-24 08:41:36 -04:00
Alan Rominger c3ad479fc6 Minor tweaks for the mesh_code branch from review (#10902) 2021-08-24 08:41:35 -04:00
Alan Rominger 928c35ede5 Model changes for instance last_seen field to replace modified (#10870)
* Model changes for instance last_seen field to replace modified

* Break up refresh_capacity into smaller units

* Rename execution node methods, fix last_seen clustering

* Use update_fields to make it clear save only affects capacity

* Restructing to pass unit tests

* Fix bug where a PATCH did not update capacity value
2021-08-24 08:41:35 -04:00
beeankha 1a9fcdccc2 Change place where controller node is being looked for in the task manager 2021-08-24 08:41:35 -04:00
Alan Rominger 3b1e40d227 Use the ansible-runner worker --worker-info to perform execution node capacity checks (#10825)
* Introduce utilities for --worker-info health check integration

* Handle case where ansible-runner is not installed

* Add ttl parameter for health check

* Reformulate return data structure and add lots of error cases

* Move up the cleanup tasks, close sockets

* Integrate new --worker-info into the execution node capacity check

* Undo the raw value override from the PoC

* Additional refinement to execution node check frequency

* Put in more complete network diagram

* Followup on comment to remove modified from from health check responsibilities
2021-08-24 08:41:35 -04:00
Alan Rominger 4e84c7c4c4 Use the existing get_receptor_ctl method (#10813) 2021-08-24 08:41:35 -04:00
Alan Rominger f47eb126e2 Adopt the node_type field in receptor logic (#10802)
* Adopt the node_type field in receptor logic

* Refactor Instance.objects.register so we do not reset capacity to 0
2021-08-24 08:41:34 -04:00
Alan Rominger 5d4ab13386 Add topology of docker-compose to docs, remove old mount (#10773) 2021-08-24 08:41:34 -04:00
Alan Rominger b53d3bc81d Undo some things not compatible with hybrid node hack (#10763) 2021-08-24 08:41:34 -04:00
Alan Rominger 46ccc58749 Make the AWX nodes fully connected in the development environment (#10758) 2021-08-24 08:41:34 -04:00
Alan Rominger 289beb85d2 Add developer docs for incoming receptor mesh features (#10747)
* Add developer docs for incoming receptor mesh features

* Additional wording about the receptor mesh process

* Wrap up docs feedback changes and polishing

* Add in way more terminology introductions, delete statement about past

* Fix typo around OCP-incluster type
2021-08-24 08:41:34 -04:00
Shane McDonald 460c7c3379 Allow for dynamically scaling automation mesh in dev env 2021-08-24 08:41:32 -04:00
Alan Rominger 9881bb72b8 Treat the awx_1 node as a hybrid node for now, use local work type (#10726) 2021-08-24 08:40:21 -04:00
beeankha 264c560a8a Template docker receptor yaml file, update Makefile to reflect this change 2021-08-24 08:40:21 -04:00
beeankha 2fc581c249 Pull in user's uid vs hardcode to 1000 2021-08-24 08:40:20 -04:00
Jim Ladd a79d7444e5 set userid to 1000 (#10714) 2021-08-24 08:40:20 -04:00
beeankha f8d074db01 Point to correct config file for execution_node_1 2021-08-24 08:40:20 -04:00
Bianca Henderson c3843004aa Update docker-compose (#10664)
* Update docker-compose

- Deploys 1 control and 1 execution node

* Add a new Receptor cluster configuration file

* update receptor peer to awx_1
to match how hop node is configured in cluster (Jim Ladd's commit)

* Move receptor_1 instantiation in the docker-compose setup

* Hard code receptor_1 name

* Update execution node name, move standalone conf file to docker-compose directory

* Reformat docker-compose file, mount another volume, change privileges
2021-08-24 08:40:20 -04:00
Alan Rominger f597205fa7 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
2021-08-24 08:40:19 -04:00
Alan Rominger e7be86867d Fix rebase bug specific to ad hoc commands 2021-08-24 08:40:19 -04:00
Alan Rominger 13300bdbd4 Update rebase to keep old control plane capacity check
Also do some basic work to separate control versus execution capacity
  this is to assure that we don't send jobs to the control node
2021-08-24 08:40:19 -04:00
Alan Rominger b09da48835 Remove some diff that we dont want from PoC 2021-08-24 08:40:19 -04:00
Alan Rominger 39e23db523 Make minor changes to add needed imports 2021-08-24 08:40:19 -04:00
Alan Rominger b10a8b0fa9 Initial functionality tweaks 2021-08-24 08:40:18 -04:00
Ryan Petrello 05cb876df5 implement an initial development environment for receptor-based clusters 2021-08-24 08:40:18 -04:00
Kersom 4a271d6897 Merge pull request #10928 from mabashian/deps-audit-autofix
Auto fix dep audit
2021-08-24 08:34:14 -04:00