Commit Graph

835 Commits

Author SHA1 Message Date
AlanCoding
7417f9925f Minor cleanup of task environment vars 2018-11-16 13:28:42 -05:00
AlanCoding
758a488aee Add task manager rescheduling hooks, de-duplication, lifecycle tests 2018-11-14 11:31:34 -05:00
Ryan Petrello
05156a5991 move from GEC_PEM_FILE_PATH to GCE_CREDENTIALS_FILE_PATH 2018-11-05 15:44:31 -05:00
AlanCoding
6dc58af8e1 slicing rename test cleanup and bugfix 2018-10-31 11:04:12 -04:00
AlanCoding
bbd3edba47 rename to slicing and schema tweaks 2018-10-31 11:04:12 -04:00
AlanCoding
20226f8984 Polish split jobs API info & add fields to UI
*clarify help text and squash migrations
*adds new internal_limit field to Job model for faster reference
*if field is non-blank, populate shard params in summary_fields
*add summary information to UI job/wfj details, JT selector
2018-10-31 11:04:10 -04:00
AlanCoding
dab678c5cc Implement splitting logic in inventory & job task code 2018-10-31 11:04:10 -04:00
AlanCoding
526ca3ae42 automatically delete project files in entire cluster 2018-10-25 16:36:58 -04:00
Ryan Petrello
9316c9ea3e implement simple retries for wayward inventory deletes 2018-10-19 10:10:52 -04:00
Ryan Petrello
ff1e8cc356 replace celery task decorators with a kombu-based publisher
this commit implements the bulk of `awx-manage run_dispatcher`, a new
command that binds to RabbitMQ via kombu and balances messages across
a pool of workers that are similar to celeryd workers in spirit.
Specifically, this includes:

- a new decorator, `awx.main.dispatch.task`, which can be used to
  decorate functions or classes so that they can be designated as
  "Tasks"
- support for fanout/broadcast tasks (at this point in time, only
  `conf.Setting` memcached flushes use this functionality)
- support for job reaping
- support for success/failure hooks for job runs (i.e.,
  `handle_work_success` and `handle_work_error`)
- support for auto scaling worker pool that scale processes up and down
  on demand
- minimal support for RPC, such as status checks and pool recycle/reload
2018-10-11 10:53:30 -04:00
Shane McDonald
580004b395 Merge remote-tracking branch 'downstream/release_3.3.0' into devel
# Conflicts:
#	awx/main/notifications/slack_backend.py
2018-09-18 08:11:50 -04:00
Ryan Petrello
43aa0fc741 consolidate celery init signals to avoid an instance registration race 2018-09-07 09:29:53 -04:00
Ryan Petrello
9ae41dc3ba write custom inventory scripts to AWX_PRIVATE_DATA_DIR
this makes it so that custom inventory scripts can access credential
files laid down in `/tmp/awx_N_<xyz>`

see: https://github.com/ansible/tower/issues/2951
2018-08-30 08:32:27 -04:00
AlanCoding
74fc0fef04 Manually pin reference list at start of pg_lock block 2018-08-24 15:28:28 -04:00
Ryan Petrello
5f6907ba83 show a better error when a custom venv doesn't exist on an isolated node
see: https://github.com/ansible/tower/issues/2852
2018-08-15 13:31:25 -04:00
Ryan Petrello
18f6f68540 Merge remote-tracking branch 'tower/release_3.3.0' into devel 2018-08-10 11:54:34 -04:00
chris meyers
3960a72c8a first net password-protected ssh key wins 2018-08-09 17:53:13 -04:00
chris meyers
f5aed74503 fill in network ssh password protected keys 2018-08-09 17:52:45 -04:00
chris meyers
2f49dc774a first net password-protected ssh key wins 2018-08-09 13:25:15 -04:00
chris meyers
48a0038f53 fill in network ssh password protected keys 2018-08-09 12:15:27 -04:00
Alan Rominger
0c0d5d4eba Merge pull request #2719 from AlanCoding/differential_policy
Apply policy results differentially
2018-07-31 16:25:14 -04:00
AlanCoding
8eaae97768 Apply policy results differentially
This avoids client-side scripting problems
where they grab the instance list during the
re-calculation which leads to incorrect assumptions
2018-07-31 15:03:36 -04:00
Ryan Petrello
8e3b72e1e5 more network UI cleanup (whoops) 2018-07-31 14:53:11 -04:00
Alan Rominger
0004c42f6d Merge pull request #2628 from AlanCoding/all_projects
Apply lock file to all project updates
2018-07-31 10:36:12 -04:00
Ryan Petrello
3cdd0a94bd simplify dynamic queue binding
we recently made a change so that instances no longer bind to
instance-group specific queues, but now instead they each bind to
a direct queue for their specific hostname
(https://github.com/ansible/tower/pull/1922)

Because of this, we shouldn't *need* to reconfigure the queue binds at
runtime anymore when group membership changes. Under our new model,
every celeryd listens on a queue named after its hostname; when the
scheduler finds a task to run, it picks an Instance in the target
Instance Group and sends the task to the queue for that Instance's
hostname.
2018-07-28 00:48:37 -04:00
Ryan Petrello
15aaca8f03 make InstanceGroup.policy_instance_list non-exclusive by default
see: https://github.com/ansible/tower/issues/2583
2018-07-25 17:26:13 -04:00
John Westcott IV
0ba8022eac #2073 - Support setting to prevent Tower from pulling from requirements.yml files for an SCM project 2018-07-23 09:37:49 -04:00
AlanCoding
abdc7b9232 apply lock file to all project updates 2018-07-20 14:23:35 -04:00
AlanCoding
7221c9dae1 add log statement if canceling takes way too long 2018-07-17 12:06:20 -04:00
AlanCoding
a5803255ac add missing job lifecycle log for schedule spawns 2018-07-13 11:13:47 -04:00
AlanCoding
a634b6b9e7 move static inventory update options to constants 2018-07-10 14:45:55 -04:00
moss
14def1e693 add want_hostcollections for sat6 source vars
Signed-off-by: moss <smossber@redhat.com>
2018-07-09 12:59:35 -04:00
Paul Neumann
4b7f106e9f Enable source variables for Azure inventory 2018-07-09 12:58:59 -04:00
moss
0f50dfd617 add want_hostcollections for sat6 source vars
Signed-off-by: moss <smossber@redhat.com>
2018-07-09 10:45:16 -04:00
Paul Neumann
33f9834747 Enable source variables for Azure inventory 2018-06-25 20:26:20 +02:00
Alan Rominger
d1bc9758db Merge pull request #2060 from AlanCoding/one_less_counter
Get rid of duplicate counter variable
2018-06-20 09:46:03 -04:00
Ryan Petrello
ff2f7aa950 expedite the heartbeat when an isolated node is registered 2018-06-19 15:37:02 -04:00
Ryan Petrello
471ff69257 stop setting celery's hostname dynamically (it's passed via the cli) 2018-06-19 12:16:00 -04:00
Ryan Petrello
ef6433c6f9 Revert "fix celery task reaper"
This reverts commit 1359208a99.
2018-06-18 16:18:20 -04:00
chris meyers
1359208a99 fix celery task reaper
* celery workers have internal queue names that are named after the
system hostname. This may differ from what tower knows the host by,
Instance.hostname
This adds a mapping so we can convert internal celery names to Instance
names for purposes of reaping jobs.
2018-06-15 16:56:53 -04:00
AlanCoding
16696a6fea get rid of duplicate counter variable 2018-06-15 09:29:13 -04:00
Ryan Petrello
84eacfc360 fix a few isolated dev issues
the main goal of this change is to make `make docker-isolated` work out
of the box

- specify the proper version for awx-expect --version
- update some deprecated playbook bits
- change the isolated container to privileged so bwrap will work
- fix awx-manage test_isolated_connection
- expedite the first isolated heartbeat so you don't have to wait 10m;
  this is accomplished by _not_ setting Instance.last_isolated_check to
  now() at insertion time (which causes the next check not to happen for
  10 minutes)
- fix a bug that caused isolated node execution to fail when bwrap was
  enabled

see: https://github.com/ansible/tower/issues/2150

This reverts commit 9863fe71dc.
2018-06-13 14:17:58 -04:00
chris meyers
fb11967114 remove isolated instance group queue listening 2018-06-08 13:46:58 -04:00
chris meyers
7b0b4f562d get isolated execution at the point its needed
* Instead of passing around the isolated host that the task is to
execute on; grab the isolated execution host from the instance further
down the call stack. Without passing the isolated hostname around.
2018-06-04 10:06:59 -04:00
chris meyers
8d352a4edf conform isolated system to new early node choice
* Randomly chose an instance in the controller instance group for which
to control the isolated node run. Note the chosen instance via a job
controller_node field
2018-06-04 10:06:59 -04:00
chris meyers
e720fe5dd0 decide the node a job will run early
* Deciding the Instance that a Job runs on at celery task run-time makes
it hard to evenly distribute tasks among Instnaces. Instead, the task
manager will look at the world of running jobs and choose an instance
node to run on; applying a deterministic job distribution algo.
2018-06-04 10:06:59 -04:00
Ryan Petrello
8c5f3404bf Merge pull request #2006 from ryanpetrello/port-jinja2-always
allow Jinja2 in ansible -a when ALLOW_JINJA_IN_EXTRA_VARS is 'always'
2018-06-01 07:32:48 -04:00
Ryan Petrello
99d2f3ea34 allow Jinja2 in ansible -a when ALLOW_JINJA_IN_EXTRA_VARS is 'always' 2018-05-31 11:49:50 -04:00
AlanCoding
124fcd6f62 delete network canvas objects in delete inventory task 2018-05-30 12:03:20 -04:00
Ryan Petrello
870adc14f9 fix a bug in the instance policy algorithm when both min and % are used
see: https://github.com/ansible/tower/issues/897
2018-05-24 12:28:46 -04:00