Commit Graph

140 Commits

Author SHA1 Message Date
Ryan Petrello
6da445f7c0 remove /api/v1 and deprecated credential fields 2019-06-06 12:23:00 -04:00
Bill Nottingham
f48713f4ae Use lockf, not flock.
This performs more reliably on certain filesystems in Linux.
2019-05-20 16:56:16 -04:00
softwarefactory-project-zuul[bot]
91968a09c8 Merge pull request #3849 from AlanCoding/password_madness
Reduce passing around of passwords dictionary

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
2019-05-09 13:34:43 +00:00
AlanCoding
2585c5030b move outlier gce cache logic to standard place 2019-05-09 08:24:57 -04:00
AlanCoding
1874e8bb4c Reduce passing around of passwords dictionary 2019-05-08 21:18:34 -04:00
AlanCoding
4191b21052 make test_tasks.py durable to changing Ansible versions 2019-04-30 14:00:51 -04:00
Vismay Golwala
5d570a017a Validate virtual environment while running a job/inventory update
Currently we only check the custom virtual environment path when
it's created. However, to tackle with the case when the venv might
have been changed/deleted afterward, we need to validate it at
run-time too.

Signed-off-by: Vismay Golwala <vgolwala@redhat.com>
2019-04-18 08:09:49 -04:00
softwarefactory-project-zuul[bot]
6d5897f371 Merge pull request #3728 from chrismeyersfsu/speed_boost
instantiate dispatcher once per job run

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
2019-04-18 11:14:32 +00:00
chris meyers
84c09a19d1 instantiate dispatcher once per job run
* Instantiating the callback dispatch queue on each job event callback
is expensive. Instead, instantiate it only once. Note, we do not need to
instantiate the callback queue in the iso case so we do not.
2019-04-17 14:03:00 -04:00
AlanCoding
941009bf6d Apply critical dependency upgrades
fix PyYAML warnings in unit tests
update paramiko source file for license
2019-04-16 16:00:09 -04:00
AlanCoding
5dbc269de1 Revert "Merge pull request #3697 from AlanCoding/conservative_upgrades"
This reverts commit 890de400e2, reversing
changes made to e8de7bc845.
2019-04-15 10:39:56 -04:00
AlanCoding
2c67bec3cb fix PyYAML warnings in unit tests 2019-04-12 15:48:08 -04:00
Ryan Petrello
81a509424a prefetch related source credentials in tasks.py 2019-04-02 11:21:33 -04:00
AlanCoding
19ad7d3983 Inventory plugins data tweaks and finalization
Disable use of azure_rm inventory plugin
Disable use of ec2 inventory plugin
due to compatibility issues that are unresolved

Fix conflicts with ansible runner integration

Add additional content enabled by Ansible core changes
2019-03-26 10:29:39 -04:00
AlanCoding
cd7e358b73 Inventory plugins transition dev finishing work
Bump keystone auth to resolve problem with openstack script

Clarify code path, routing to template vs. managed injector
  behavior is also now reflected in test data files

Refactor test data layout for inventory injector logic

Add developer docs for inventory plugins transition

Memoize only get_ansible_version with no parameters

Make inventory plugin injector enablement a separate
  concept from the initial_version
  switch tests to look for plugin_name as well

Add plugin injectors for tower and foreman.

Add jinja2 native types compat feature

move tower source license compare logic to management command

introduce inventory source compat mode

pin jinja2 for native Ansible types

Add parent group keys, and additional translations

manual dash sanitization for un-region-like ec2 groups

nest zones under regions using Ansible core feature just merged
  implement conditionally only with BOTH group_by options

Make compat mode default be true
  in API models, UI add and edit controllers

Add several additional hostvars to translation
Add Azure tags null case translation

Make Azure group_by key off source_vars
  to be consistent with the script

support top-level ec2 boto_profile setting
2019-03-26 10:29:39 -04:00
AlanCoding
5cbcfbe0c6 Port inventory source injector tests to functional tests
This new batch of tests assures that the injector logic
for inventory source in their old script version remains
untouched with the refactoring underway.

Plugins are also tested by the same means of comparing
to reference files, these will be used to assure that
all parameters that used to be respected are still
respected in the plugin system.
2019-03-26 10:29:38 -04:00
Ryan Petrello
8e4a87d0af fix tests for add /etc/ssh in bind mounted folder 2019-03-26 08:04:16 -04:00
Yanis Guenane
fd50feb258 bwrap/runner: Add /etc/ssh in bind mounted folder
/etc/ssh is currently not bound when run into bwrap, this leads to
error like "Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf"
since it cannot access this file.

https://github.com/ansible/awx/pull/3391 was done pre runner
integration.

Fixes: https://github.com/ansible/awx/issues/3392

Signed-off-by: Yanis Guenane <yanis@guenane.org>
2019-03-26 12:43:59 +01:00
chris meyers
b006510035 do not save sensitive env vars
* job_env gets exposed via the api. Sensitive env variables should be
redacted before saved into job_env.
2019-03-20 14:00:22 -04:00
chris meyers
060585434a update tests 2019-03-20 09:44:38 -04:00
chris meyers
5135b8a969 fixup unit tests for tasks 2019-03-18 14:21:47 -04:00
chris meyers
f7842cf283 refactor and fix unit tests
* fixup task TestGenericRun
* make runner callback functions accessable to testing
* reduce isintance() usage in run() by using build_ pattern
* move process_isolation param building to build_ function so it can be
tested
2019-03-18 14:21:47 -04:00
AlanCoding
711937b104 fix some patches that were never unapplied 2019-02-20 14:40:25 -05:00
Ryan Petrello
b1a33869dc convey OpenStack verify_ssl defaults in the CredentialType schema 2019-02-20 09:02:48 -05:00
Hideki Saito
9f04fbe4a4 Add verify_ssl to OpenStack credential type
To avoid verification failures when using a self-signed certificate file,
 Added "Verify SSL" check box to the openstack credential type edit page.

Signed-off-by: Hideki Saito <saito@fgrep.org>
2019-02-19 12:53:13 -05:00
Ryan Petrello
daeeaf413a clean up unnecessary usage of the six library (awx only supports py3) 2019-01-25 00:19:48 -05:00
Jake McDermott
a8728670e1 handle credential.inputs in decryption utils 2019-01-22 22:56:24 -05:00
Jake McDermott
c01c671642 use credential input access methods in tasks.py 2019-01-20 13:08:30 -05:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
AlanCoding
cccc038600 Updates to logging, specifically for unit tests 2019-01-15 11:34:54 -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
Ryan Petrello
c695ba2e10 fix flake8 2018-10-24 10:11:53 -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
chris meyers
5bfe9bf228 vary the pk 2018-08-09 15:44:59 -04:00
chris meyers
40d6c763b3 add test for first net cred ssh password protected wins 2018-08-09 13:32:42 -04:00
chris meyers
8d440acb0f add test for ssh over network ssh key password preference 2018-08-09 12:51:40 -04:00
chris meyers
9a199b99ac add pexpect test for net cred 2018-08-09 12:40:37 -04:00
Bill Nottingham
ae4135f149 add tests 2018-07-09 12:59:45 -04:00
Paul Neumann
73197f3ae5 Extend unit test for Azure source variable generation
Add tests for generation of Azure source variables. Test cases such
as overwriting a variable with its default value, overwriting a variable
with something different to its default value and add variables not set
by default.
2018-07-09 12:59:14 -04:00
AlanCoding
16696a6fea get rid of duplicate counter variable 2018-06-15 09:29:13 -04:00
Ryan Petrello
0bcbccba33 enforce True or False for boolean credential injectors
see: https://github.com/ansible/tower/issues/2038
2018-06-14 12:34:54 -04:00
chris meyers
b94cf379f6 do not choose offline instances 2018-06-04 10:06:59 -04:00
chris meyers
9d732cdbdf update unit and functional tests 2018-06-04 10:06:59 -04:00
Ryan Petrello
9bc871db47 add a test for tower inventory syncs 2018-05-30 15:13:49 -04:00
Wayne Witzel III
5279b102cb Fix task unit test 2018-05-18 13:52:51 -04:00
chris meyers
97ab6449b9 parallelize test running 2018-05-16 14:29:15 -04:00
Ryan Petrello
1eb5e98743 Merge branch 'release_3.2.4' into release_3.3.0 2018-04-26 11:10:28 -04:00
Ryan Petrello
7074dcd677 don't allow usage of jinja templates in certain ansible CLI flags
see: https://github.com/ansible/tower/issues/1338
2018-04-17 09:20:05 -04:00
Ryan Petrello
88c243c92a mark all unsafe launch-time extra vars as !unsafe
see: https://github.com/ansible/tower/issues/1338
see: https://bugzilla.redhat.com/show_bug.cgi?id=1565865
2018-04-16 16:47:44 -04:00