Commit Graph

3433 Commits

Author SHA1 Message Date
Chris Meyers
7919c47370 put lock file in project root dir 2017-04-12 09:36:15 -04:00
Chris Meyers
648aa470d7 lock projects on project sync
* Use filesystem, blocking, locks to prevent two project syncs for the
same project from running the project update playbook at the same time.
2017-04-11 15:47:46 -04:00
AlanCoding
3e9bc3b3d4 Hide extra_vars in job notifications 2017-04-07 11:49:03 -04:00
Wayne Witzel III
e750f1a01c Merge pull request #5892 from wwitzel3/release_3.1.2
Do not set the default if field was not passed in to kwargs_extra_vars.
2017-03-27 09:50:35 -04:00
Wayne Witzel III
45c3a389d4 add test, restore old behavior in api test 2017-03-27 09:39:21 -04:00
Wayne Witzel III
18eaacf4bb create _survey_element_validation and use it for updating extra_vars 2017-03-24 17:57:52 -04:00
Wayne Witzel III
c99d4659da Do not set the default if the field was not passed in to kwargs_extra_vars 2017-03-24 16:59:43 -04:00
Aaron Tan
b421670c10 Remove log aggregator port required mark. 2017-03-24 11:57:56 -04:00
Aaron Tan
7ba79c1027 Merge pull request #5792 from jangsutsr/5628_smarter_log_aggregator_host_name_generation
Smarter log aggregator host name generation
2017-03-24 11:46:46 -04:00
Aaron Tan
07e7e4cfd0 Modify according to review feedback. 2017-03-24 11:35:45 -04:00
Ryan Petrello
ba0e9ab775 copy extra_vars when relaunching ad-hoc commands
see: #1744
2017-03-21 09:45:30 -04:00
Aaron Tan
f69c2569d6 Smarter log aggregator host name generation. 2017-03-20 13:20:16 -04:00
Aaron Tan
fe78d86c4a Merge pull request #5747 from jangsutsr/5728_handle_can_start_without_user_input_cornercase
Handle can_start_without_user_input cornercase
2017-03-20 13:03:22 -04:00
Aaron Tan
2e2d88516e Negative functional test added. 2017-03-20 12:21:21 -04:00
Aaron Tan
2edd4b338d Add functional test to gurarantee consistent behavior of provisioning callback with jt launch. 2017-03-17 15:40:55 -04:00
Aaron Tan
6083e9482e Refactor job template callback post to mimic the behavior of normal jt launch. 2017-03-17 13:04:45 -04:00
Aaron Tan
90bcc3d6ab Unit test added. 2017-03-16 11:08:19 -04:00
Aaron Tan
95e41e078c Handle can_start_without_user_input cornercase. 2017-03-15 17:42:59 -04:00
Ryan Petrello
98ad2684d3 when async log shipping fails, log an explanation 2017-03-15 17:23:44 -04:00
Ryan Petrello
b3733d233e always use async http logging - even in celery workers
additionally, add a timeout to requests to avoid thread starvation

see: #5718
see: #5729
2017-03-15 13:17:01 -04:00
Chris Meyers
8d2b3b2b82 Merge pull request #5705 from chrismeyersfsu/fix-5700
add job cancel dependency information
2017-03-14 15:00:15 -04:00
Matthew Jones
bc4174adf8 Ignore .retry files for project updates 2017-03-14 13:23:14 -04:00
Matthew Jones
47a894a339 Fix up cloudforms license unit test 2017-03-13 21:02:36 -04:00
Chris Meyers
33dca18119 more tests 2017-03-13 15:05:33 -04:00
Chris Meyers
a051b41773 add test 2017-03-13 14:45:20 -04:00
Chris Meyers
6a0916371b add job cancel dependency information
* Inventory updates that are canceled and are dependencies of jobs
result in the dependent job being canceled. This code adds a better
description to job_explanation so that a job marked as canceled can be
traced back to the inventory update that triggered this case.
2017-03-13 12:52:33 -04:00
Matthew Jones
2641b2a1c3 Implement cloudforms license
This is a special license that is triggered in the presence of two
directories:
  - /opt/rh/cfme-appliance
  - /opt/rh/cfme-gemset
and the rpms
  - cfme
  - cfme-appliance
  - cfme-gemset

All of which I'm assured are responsible for validating that this is
indeed an enterprise cloudforms environment.

When these are present then a license is used that is near perpetual,
allows for a stupid large number of instances, and turns on all features
2017-03-13 12:00:22 -04:00
Ryan Petrello
f4d4c43d94 prohibit order_by= for sensitive fields
see: #5526
2017-03-10 08:49:59 -05:00
Matthew Jones
071f84d224 Skip requirements test, until it gets some love 2017-03-07 16:48:52 -05:00
Ryan Petrello
255d6afb49 fix a traceback if tower doesn't have LOG_AGGREGATOR_TOWER_UUID set
see: #5527
2017-03-07 16:48:51 -05:00
Chris Meyers
4005cf927e copy existing env before making a safe env
* We should not modify the original env because it's what is going to be
passed to the Ansible process. This will contain all of the passwords,
unobscured. The safe env is what will get saved into the model.
2017-03-07 16:48:48 -05:00
AlanCoding
0046421f05 set log formatter message type 2017-03-07 16:48:48 -05:00
Ryan Petrello
ae321536cd fix a regex that doesn't properly strip certain environment variables
see: #5601
2017-03-07 16:48:48 -05:00
Matthew Jones
50ccd1b003 Fix validation error grammar 2017-03-07 16:48:48 -05:00
Matthew Jones
95a2ed6336 Updates to insights playbook project syncing based on feedback
* Support "name" if given, else use a more reasonable file name for
  the playbook file
* Fix an issue where we wouldn't populate the playbooks correctly in
  the database
* Force downloading the playbooks every time since we can't tell when
  the file might change
2017-03-07 16:48:48 -05:00
Matthew Jones
2656e3f3fa Insights project api side integration
* Extend scm credential type to support username and password for
  redhat portal accounts
* Update project update playbook to work with remote insights server
2017-03-07 16:48:44 -05:00
Matthew Jones
90a26de180 Fix an issue where notifications might not always be triggered
In the case where a notification template were assigned to "failed"
events but not "success" or "any" events.
2017-03-06 15:41:43 -05:00
Chris Meyers
54bcdccdab give a default other than None
1. If the setting isn't in the database, then the specified default is
returned.
2. If the setting IS in the database, then the 'value' field, from the
database, is returned; Unless, the value is null in the database, then
the defined default is returned.
* Take case 1. If the default=None then an AttributeError is raised
* Thus, by setting default='', in case 1. We don't get an AttributeError
because '' will be returned.
* Also note that we don't allow_null=True because then the database
entry could be None. Accessing the setting would raise an AttributeError
in this case. Further, since we set default='' it doesn't matter if null
is in the database.

TL;DR set default=<something_other_than_None>
2017-03-02 13:36:48 -05:00
Chris Meyers
9db49d9819 Merge pull request #5586 from chrismeyersfsu/fix-job_start_websocket_race
emit job status over socket after database commit
2017-02-28 13:25:44 -05:00
Chris Meyers
c4fb88c0d9 remove uneeded post commit wrapper
* Since we changed the lower level method to always use post commit
message emit
2017-02-28 13:10:00 -05:00
Chris Meyers
e09497108e all job status change websockets events should happen after the job hits
the database
2017-02-28 12:56:55 -05:00
Chris Meyers
b85361732b Revert "emit job status over socket after database commit"
This reverts commit edefeeacdaf11cf484a4b4893ee9acde5ef85390.
2017-02-28 12:53:59 -05:00
Chris Meyers
7da52c8bef emit job status over socket after database commit
* Wait until the newly created job record hits the database before
telling the websocket clients that the job's status is "pending"
2017-02-28 12:39:55 -05:00
Ryan Petrello
45819f6b9a requeue websocket messages that don't (yet) have an established user
There's a race between our `ws_connect` and `ws_receive` methods;
it's possible to fall into a scenario where we're handling a legitimate
message *before* django-channels is able to persist the `user_id` into
the channel session.  This results in a scenario where a user can open
a browser tab and never receive new websocket messages.  In this
scenario, we should just toss the message back into the queue and try
again later (up to a reasonable limit of retries).
2017-02-28 11:12:59 -05:00
Matthew Jones
98daaece73 Switch job_type to check from sync when detecting delete_on_update 2017-02-27 16:22:05 -05:00
Chris Meyers
c1bace87ab only cancel deps if we can cancel the inv update 2017-02-27 11:37:29 -05:00
Chris Meyers
f3e514246e cancel jobs dependent on inv update 2017-02-27 11:28:29 -05:00
Chris Meyers
9f8df08e1d update tests 2017-02-27 10:56:34 -05:00
Chris Meyers
a1c76d3adc like inventory updates, check if project update deps already processed 2017-02-27 10:34:44 -05:00
Chris Meyers
dd513621f0 Revert "Merge pull request #5553 from chrismeyersfsu/fix-waiting_blocked"
This reverts commit 9ba2122f4f85eecaeb6fa53ac92ea2811b05e83f, reversing
changes made to c3a5f2c96fd85dd1405a8f5c875ffc988dee16a4.
2017-02-27 09:38:45 -05:00