Commit Graph

290 Commits

Author SHA1 Message Date
Matthew Jones
28759e9f20 Use psutil to find the right job to TERM
* When using proot use psutil to find the ansible child process and
  issue the SIGTERM to instead of the proot process
2015-07-24 12:06:02 -04:00
Matthew Jones
7937b4fbbd Implement a stdout tmp cleanup task
* Cleans up stdout tempfiles generated for download
* Runs every 3 hours, cleans up files older than 1 day
2015-07-22 15:24:52 -04:00
Matthew Jones
9e6c604fc1 Remove extra output from doing a hard mongo shutdown. 2015-07-06 14:38:19 -04:00
Matthew Jones
4fd0fbda08 Invert the conditional checking for whether or not mongo is running 2015-07-06 14:28:27 -04:00
Matthew Jones
26af43dab6 Remove superflous sleep when shutting mongo down 2015-07-06 14:19:12 -04:00
Matthew Jones
9b03d22d75 Fixes to conditionally invoking mongo shutdown
* Make sure we are waiting on the service script
* Improve sudo configuration
* Check pidof before attempting to invoke a hard mongo shutdown
2015-07-06 14:15:41 -04:00
Matthew Jones
5a77d1f0d4 Fix up mongo service handline and task logging
* Use -f instead of -c for mongod when refernecing config file
  for shutdown behavior in the stop task
* Fix up task logging to use new supervisor configuration syntax
2015-07-06 11:49:24 -04:00
Matthew Jones
b45ea4f1f4 Force shutdown of mongo after requesting a service stop. Just in case. 2015-06-23 12:32:43 -04:00
Chris Meyers
fcc789f13b Differentiate between an expired license and a non-existant license 2015-06-16 15:59:23 -04:00
Chris Church
4607972135 Included openstack inventory script from core + changes from some open PRs, fixes to be able to use without custom changes for tower. 2015-06-12 00:58:33 -04:00
John Mitchell
32d1c0e4db fixed copyright date 2015-06-11 16:10:23 -04:00
Matthew Jones
bcc18aa689 Make using named pipe for adding passwords conditional on the version
of ssh used.
2015-06-11 14:48:10 -04:00
Matthew Jones
322fdc37a4 Remove some spurious print statements I left previously 2015-06-11 14:48:09 -04:00
Matthew Jones
ab5c4b5f20 Check connection for scan jobs before actually running the job, fail
early if the system tracking database isn't available
2015-06-09 15:31:23 -04:00
Chris Church
6679afe190 Merge pull request #259 from cchurch/ssh_key_data_fifo
Write SSH key data to named pipe
2015-06-03 23:33:16 -04:00
Luke Sneeringer
cdc7f03c58 Move MongoDB control to tasks. 2015-06-03 10:49:41 -05:00
Chris Church
7770b813ea Write SSH key data to a named pipe and remove immediately after reading to avoid leaving private key data on disk. 2015-06-02 20:23:12 -04:00
Matthew Jones
b3da3b34a3 Changing some legal headers for python source files 2015-05-29 12:10:39 -04:00
Matthew Jones
472f086862 Fix an issue where a well timed cancel could try to cancel a job right
after it has finished causing an error.
2015-05-18 10:19:03 -04:00
Chris Meyers
0472ce7946 include ad-hoc-commands when running system cleanup_jobs 2015-04-29 13:46:08 -04:00
Matthew Jones
a081614c9a Merge branch 'mongo_ancillary_services' into upstream_master
* mongo_ancillary_services:
  Adding the fact cache receiver to the supervisor config
  Implementing tower cleanup task for cleaning up facts
2015-04-27 09:49:35 -04:00
Chris Meyers
b323e26b2f do not generate scm private key file if no ssh data associated with credential 2015-04-26 20:03:48 -04:00
Chris Meyers
612147e355 return empty private data content rather than None for generate private file method 2015-04-26 10:58:15 -04:00
Matthew Jones
22acd51650 Implementing tower cleanup task for cleaning up facts 2015-04-24 14:15:25 -04:00
Chris Meyers
ce953d1ad2 changed inventory sync private data file key to more appropriate cloud_credential from scm_credential. Wrapped openstack credentials in dict 2015-04-23 16:44:30 -04:00
Matthew Jones
3f4aafa501 Merge remote-tracking branch 'refs/remotes/chrismeyers/fix-cloud_credentials2' into upstream_master
* refs/remotes/chrismeyers/fix-cloud_credentials2:
  multiple credentials implementation style more inline with existing code
  allow machine and cloud credentials to co-exist.
2015-04-23 16:09:14 -04:00
Chris Meyers
360aae8c25 multiple credentials implementation style more inline with existing code 2015-04-23 13:34:02 -04:00
Matthew Jones
405be7edd8 Merge branch 'openstack_inventory_support' into upstream_master
* openstack_inventory_support:
  Use inventory_source source_vars to control what address we use for ansible_ssh_host
  Some small changes to tower openstack work
2015-04-23 11:09:41 -04:00
Matthew Jones
abdfb26b3d Use inventory_source source_vars to control what address we use for ansible_ssh_host 2015-04-23 11:07:31 -04:00
Chris Meyers
b63a577b33 allow machine and cloud credentials to co-exist. 2015-04-23 10:11:21 -04:00
Matthew Jones
f45d75c06c Some small changes to tower openstack work
1) Favor private addresses in the openstack inventory sync
2) Force refresh
3) use hostId and promote it to the top level vars object so we can
track individual host changes
2015-04-20 15:11:06 -04:00
Matthew Jones
6c5fd93ce5 Merge pull request #137 from matburt/openstack_inventory_support
Openstack inventory support
2015-04-14 12:43:20 -04:00
Matthew Jones
6525120c15 model and task support for launching openstack inventory updates 2015-04-13 15:05:58 -04:00
Chris Church
aa0c16d726 Add choices for job and ad hoc command verbosity. 2015-04-09 18:55:42 -04:00
Chris Church
8beed7f409 Disable ControlPersist for ad hoc commands, should avoid any issues with proot or needing to clean up sockets afterwards. 2015-04-09 10:32:24 -04:00
Matthew Jones
55f266d323 Move 'become_enabled' to JobOptions to allow a toplevel field to exist
on the Job model also.  Update tasks and migrations to reflect this
2015-04-06 12:34:47 -04:00
Matthew Jones
2e58f5fd00 Migrate ad-hoc feature to use the new ansible become method if provided 2015-04-03 15:17:52 -04:00
Matthew Jones
b6e9382273 Refactor pbexpect string matches to submit become password 2015-04-03 13:57:33 -04:00
Matthew Jones
5ff7558cd3 Updates and fixes for unit tests on supporting ansible "become" 2015-04-02 13:38:38 -04:00
Matthew Jones
d5c9e37499 Refactor credential to use ansible become if using a new enough ansible
version.  Add become flag to job template
2015-04-02 10:05:56 -04:00
Chris Church
f7b8d510dc Implement support for ad hoc commands. 2015-03-30 13:04:19 -04:00
Matthew Jones
fe82b54158 Remove the old version checks from our job runners used to test features
of old Ansible versions:

* INVENTORY_HOSTVARS from pre-1.3
* Vault password prompting from pre-1.5
* Git hostkey acceptance from pre-1.5
2015-03-26 13:42:42 -04:00
Matthew Jones
345e2fc65e Fix a pexpect bug where ansible now looks for "SU password" instead of
"su password" and that screwed us up a bit
2015-03-26 12:15:25 -04:00
Matthew Jones
926b3f775d Support new casing/wording for sudo on Ansible 1.9 2015-03-18 16:37:09 -04:00
Matthew Jones
4d271bef35 Initial Scan Job Template type implementation 2015-03-03 14:48:22 -05:00
Chris Church
c1d90e1897 Keep git URLs in SCP format for project updates. Fixes https://trello.com/c/xUL2FZyu 2015-02-26 15:46:55 -05:00
Matthew Jones
fed4262ee2 Some light implimentation details for basic fact caching and collection 2015-02-19 11:27:40 -05:00
Matthew Jones
bb3732b2c1 Cleaning up some flake8 errors, pyflakes in this case 2015-02-10 17:00:23 -05:00
Matthew Jones
9e97783b13 Fixing up more pep8 issues 2015-02-04 16:32:14 -05:00
Matthew Jones
6e6a709165 Fixing up some pep8 issues 2015-02-03 13:46:58 -05:00