Commit Graph
100 Commits
Author SHA1 Message Date
Alan Rominger af5f8e8a4a Always set project sync execution_node to current host (#11204) 2021-10-05 13:08:40 -04:00
Alan Rominger 7c9626b0e7 Fix bug that would run --worker-info health checks on control or hybrid nodes (#11161)
* Fix bug that would run health check on control nodes

* Prevent running execution node health check against main cluster nodes
2021-09-29 09:34:22 -04:00
Alan Rominger 3664cc3369 Disable autodiscovery except for docker-compose (#11142) 2021-09-27 11:36:11 -04:00
Alan Rominger 3fc63489f1 Filter controller_node selection to online nodes (#11120) 2021-09-24 23:01:32 -04:00
Alan Rominger b5dee61e57 Delete wording that we have reversed position on (#11129) 2021-09-24 09:38:48 -04:00
Alan Rominger 62e9e7ea80 Avoid setting controller_node to an execution node for container jobs (#11117) 2021-09-23 09:16:10 -04:00
Alan Rominger 0ac3a377fd Make some needed updates to docker-refresh target (#11089) 2021-09-17 09:11:52 -04:00
Alan Rominger 1319fadc60 Fix overwrite bug where hosts with no instance ID var are re-created (#10910)
* Write tests to assure air-tightness of overwrite

* Candidate fix for group overwrite air-tightness

* Another proposed fix for the id mapping

* Further double down on tracking old instance_id

* Separate unchanging data case and fix some test issues

* parametrize final confusion test

* cut down some more on test cases and fix bug with prior fix

* Rewrite of _delete_host code sharing with update method

This is a start-to-finish rewrite of the host overwrite bug fix
this method is much more conservative,
it does this by keeping the overall code structure where hosts
are deleted before host updates are made

To fix the bug, we share code between the method that deletes hosts
and the method that updates the hosts
A data structure is created and passed to both methods

By having both methods use the same data structure which maps
the in-memory hosts to DB hosts, we assure that the deletions
will ONLY delete hosts that will not be updated
2021-09-16 15:29:57 -04:00
Alan Rominger e914c23c42 Pass --delete flag to worker for execution node cleanup (#11078)
* Pass --delete flag to worker for execution node cleanup

* Remove the pdd_wrapper_ directory
2021-09-16 11:21:41 -04:00
Alan Rominger 46ac9506e6 Assure consistent ordering with default IG first (#11034)
* Assure consistent ordering with default IG first

* Write conditional a little more defensively to pass tests
2021-09-08 11:11:46 -04:00
Alan Rominger 6a17e5b65b Allow manually running a health check, and make other adjustments to the health check trigger (#11002)
* Full finalize the planned work for health checks of execution nodes

* Implementation of instance health_check endpoint

* Also do version conditional to node_type

* Do not use receptor mesh to check main cluster nodes health

* Fix bugs from testing health check of cluster nodes, add doc

* Add a few fields to health check serializer missed before

* Light refactoring of error field processing

* Fix errors clearing error, write more unit tests

* Update health check info in docs

* Bump migration of health check after rebase

* Mark string for translation

* Add related health_check link for system auditors too

* Handle health_check cluster node timeout, add errors for peer judgement
2021-09-03 16:37:37 -04:00
Alan RomingerandAlex Corey 22782f8c5f Add wording about expectations for enabled status and default group (#10993)
* Add wording about expections for enabled status and default group

* fix pluralization

Co-authored-by: Alex Corey <acorey@redhat.com>

* Correct grammar mistake

Co-authored-by: Alex Corey <acorey@redhat.com>
2021-09-03 10:35:29 -04:00
Alan RomingerandJeff Bradberry eb0528c157 dev environment - change location of receptor socket and sync awx and receptor nodes function (#11005)
* Change the location of the receptor socket

to /var/run/awx-receptor, to match what the installer is currently doing.

* Sync awx and receptor nodes for control socket

Co-authored-by: Jeff Bradberry <jeff.bradberry@gmail.com>
2021-09-02 09:18:25 -04:00
Alan Rominger 1d3a36d821 Fix the hostname of execution nodes in dev environment (#10992) 2021-09-01 13:35:39 -04:00
Alan Rominger 5a6e9a06e2 Exclude control-only nodes from IG policy calculations (#10985)
* Exclude control-only nodes from IG policy calculations

Also, as a reverse to this, exclude execution-only nodes from
  the calculations if the group in question is the controlplane

* Incorporate review comments
2021-09-01 08:09:46 -04:00
Alan Rominger dc4b014d12 Make status command in error handling cleaner (#10823) 2021-08-31 12:02:39 -04:00
Alan Rominger 573b2bc44f Redefine execution plane (#10979) 2021-08-31 10:33:14 -04:00
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
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
Alan Rominger 711e5e09ba Delete images by id instead of tag in docker-refresh (#10957) 2021-08-27 11:51:58 -04: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
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
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
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
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
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
Alan Rominger 397fab793d Avoid waiting for deletion in error cases 2021-07-13 13:49:09 -04:00
Alan Rominger 8772ca2e3a Development of patch for inventory source migration error 2021-07-13 11:47:01 -04:00
Alan Rominger 3e6cbd5114 Wait until inventory is fully deleted in silent_delete 2021-07-13 07:50:58 -04:00
Alan Rominger 122f282e5d Add back in fixture 2021-07-09 13:32:31 -04:00
Alan Rominger 9b319cf2bf Fix pep8 failure 2021-07-09 13:08:57 -04:00
Alan Rominger cb8441ed3d Remove added assertion that was wrong 2021-07-09 12:30:06 -04:00
Alan Rominger 08cb497689 Run flake8 on the AWX collection in CI 2021-07-09 12:01:28 -04:00
Alan Rominger 17f9b57028 Remove unused exception about custom venvs 2021-07-07 11:38:37 -04:00
Alan Rominger e96080a512 No result_traceback is blank, not null 2021-07-07 11:37:30 -04:00
Alan Rominger b329d9cbf4 Make quay.io the registry URL default 2021-06-29 13:26:51 -04:00
Alan Rominger f0cd6b2457 Run flake8 on awxkit 2021-06-29 11:32:59 -04:00
Alan Rominger b8f5dda6da Fix ansible-test pep8 bug and add notable release 2021-06-28 22:37:10 -04:00
Alan Rominger f126a6343b Fix bug setting execution_node to null (not blank) (#5169) 2021-06-28 10:51:06 -04:00
Alan Rominger f1273d5810 Show tracebacks from dependency failures (#5154) 2021-06-28 10:51:05 -04:00
Alan Rominger 390e1f9a0a Fix obvious logical bug with project folder pre-creation (#5155) 2021-06-28 10:51:04 -04:00
Alan Rominger d0b7d970c4 Create partition for 2 job types that bypass TM (#5138)
* Create partition for 2 job types that bypass TM

* Mock create_partition in unit tests
2021-06-28 10:51:03 -04:00
Alan Rominger 02cccbe608 Close file before returning 2021-06-25 14:47:44 -04:00
Alan Rominger 1831b2591a Null iso IG jobs before deleting (#5122)
This is a workaround for polymorphic SET_NULL bug
2021-06-22 10:57:16 -04:00
Alan Rominger 1422bb2043 Fix tower upgrade (#5114)
* Hack to avoid creating both tower and controller CredentialType

* Remove line used for testing
2021-06-22 10:49:41 -04:00
Alan Rominger 4a85983eb7 Symlink modules for 2.9 compat (#5103)
* Symlink modules for 2.9 compat

* Avoid symlinks in completeness tests
2021-06-22 10:49:40 -04:00
Alan Rominger 0508a9267c Minor patch to right wording for 400 error (#5109) 2021-06-22 10:49:39 -04:00
Alan Rominger 53fe08af61 Update collection inventory_source options 2021-06-22 10:49:38 -04:00
Alan Rominger a8083296e6 Make safe variable duplications for rename (#5093)
* Make safe variable duplications to controller

* Back out some changes to be smarter

* Update test to new vars
2021-06-22 10:49:38 -04:00
Alan Rominger cc616206b3 Pass current apps to CredentialType setup method 2021-06-22 10:49:37 -04:00
Alan Rominger 6db4732bf3 Rename the TOWER_ settings 2021-06-22 10:49:36 -04:00
Alan Rominger ead7907173 Update another test for tower to controller rename 2021-06-22 10:49:36 -04:00
Alan Rominger 8c1bc97c2f Fix up unit tests after tower to controller rename 2021-06-22 10:49:36 -04:00
Alan Rominger 5a7a1b8f20 Remove inventory_as_dict which would mess with downstream templating (#5085) 2021-06-22 10:49:34 -04:00
Alan Rominger 15444bef70 Show inventory source POST in OPTIONS for inventory admins (#5076) 2021-06-22 10:49:31 -04:00
Alan Rominger 0b6208047c Correct the function of the -q option for migration helper commands 2021-06-16 16:26:38 -04:00
Alan Rominger f14129de9b Further copy editing of EE docs 2021-06-16 16:18:21 -04:00
Alan Rominger 2309feb6bd Make ExecutionEnvironment awxkit class able to handle null values in payload 2021-06-16 15:41:06 -04:00
Alan Rominger 52d6f36b7c Incorporate review comments about EE docs 2021-06-16 14:24:48 -04:00
Alan Rominger 21aa1fc11f Handle inventory types where Automation Hub collection names differ
Move imports added by Bill to be in-line, because utils should not import models at top

Remove more get_licenser inline imports
2021-06-16 13:39:52 -04:00
Alan Rominger 4478052b71 Update and expand docs/ folder for EEs 2021-06-16 11:23:59 -04:00
Alan Rominger 92c6ddf13c Prefer installer defaults over user-defined global EEs
Add a basic level of testing around get_default_execution_environment
2021-06-14 14:13:39 -04:00
Alan Rominger b39b80b036 Make ExecutionEnvironment awxkit class able to handle null values in payload 2021-06-11 13:32:46 -04:00
Alan Rominger 579d49033a Remove debugging log message 2021-06-08 13:33:54 -04:00
Alan Rominger 210d5084f0 Move skip flag up from event_data and pop it off 2021-06-08 13:33:54 -04:00
Alan Rominger 53e8a9e709 Fix bug 2021-06-08 13:33:53 -04:00
Alan Rominger 15effd7ade Add some conditions for always-send and never-send event types
Always send websocket messages for
  high priority events like playbook_on_stats

Never send websocket messages for
  events with no output
  unless they are a high priority event type
2021-06-08 13:33:53 -04:00
Alan Rominger b919befc90 Add option to record websocket received time 2021-06-08 13:33:53 -04:00
Alan Rominger 4052603238 make sure log format does not error 2021-06-08 13:33:53 -04:00
Alan Rominger b306c6f258 Put new setting in defaults so unit tests will run 2021-06-08 13:33:52 -04:00
Alan Rominger 4b6b8f2bdd Finish up the immediate or average rate method 2021-06-08 13:33:52 -04:00
Alan Rominger 70420dc3e4 THIS DOES NOT WORK pass events if they fit either timing criteria 2021-06-08 13:33:52 -04:00
Alan Rominger 50ca2d47ce Further log adjustments 2021-06-08 13:33:52 -04:00
Alan Rominger faa0a6cf9a fix up log wording 2021-06-08 13:33:52 -04:00
Alan Rominger 01228cea02 Implement max event websocket rate as setting 2021-06-08 13:33:50 -04:00
Alan Rominger cbb461ab71 Fix bug 2021-06-08 13:33:23 -04:00
Alan Rominger b551608f16 Move websocket skip logic into event_handler 2021-06-08 13:33:22 -04:00
Alan Rominger b43d8e2c7f Enforce a 30-per-second max event websocket rate 2021-06-08 13:32:05 -04:00
Alan Rominger 5ab449c90f Add event-specific template to all event types 2021-06-08 11:01:14 -04:00
Alan Rominger d79f73ab7a Remove references to Ansible venv path because it does not exist 2021-06-07 21:14:35 -04:00
Alan Rominger b26eaa3bd2 Remove uses of ansible_virtualenv_path 2021-06-07 21:14:35 -04:00
Alan Rominger dad5533816 Enter flake8 rules in tox config as actual config entries 2021-06-07 16:21:50 -04:00
Alan Rominger 5beb68f527 Remove templates from views that were removed 2021-06-07 11:15:19 -04:00
Alan Rominger 2eb1e4bbe3 Add OPTIONS documentation for new job limit feature 2021-06-07 11:11:22 -04:00
Alan Rominger efcbea1fc5 Skip sliced jobs from the workflow EE logic 2021-06-03 16:20:47 -04:00