Commit Graph
99 Commits
Author SHA1 Message Date
Matthew Jones 3bd1405cc5 Merge branch 'release_3.0.3' into stable
* release_3.0.3:
  Revert "Revert "Add needed types for selinux change""
  Revert "Add needed types for selinux change"
  interpret backslash escapes when displaying url in welcome message
  Bump the SELinux policy version
2016-10-31 09:36:09 -04:00
Matthew Jones 34f20bd954 Merge branch 'release_3.0.3' into stable
* release_3.0.3:
  Add needed types for selinux change
2016-10-28 15:07:25 -04:00
Matthew Jones 0cfbd6e062 Merge branch 'release_3.0.3' into stable
* release_3.0.3:
  Update SELinux policy to allow httpd_t to execute files in lib_t and var_lib_t
2016-10-28 14:02:42 -04:00
Matthew Jones 0f651c8903 Merge branch 'release_3.0.3' into stable
* release_3.0.3: (48 commits)
  Bumping changelog for 3.0.3
  Update rax.py inventory
  Revert "filter internal User.admin_roles from the /roles API list view"
  fix spelling of disassociated
  Resolves 404 when assigning resources/users to organizations in card view. Sidesteps a bug in the Refresh() utility, where pagination calculations are not made against filtered results.
  Sync azure changes to Tower virtual environment
  Add regions here as well.
  Also bump boto for new regions, per ryansb.
  More regions!
  Revert "bump shade version"
  bump shade version
  Hack copying of job_template.related.survey_spec into ui job copy flow, resolves #3737
  Revert "bump shade version"
  bump shade version
  Switch pg user auth from trust to peer
  Remove support@ansible.com, clean up some old links.
  filter internal User.admin_roles from the /roles API list view
  Exclude test directory from setup bundle tarballs
  fixed manual project select2 population
  YAML parsing groups and hosts extra variables
  ...
2016-10-28 11:37:57 -04:00
Matthew Jones 870f8d6b1e Fix up deb packaging paths 2016-09-29 13:18:24 -04:00
Matthew Jones 4d22af0d3c Fix up ubuntu apt repo paths 2016-09-29 13:16:58 -04:00
Matthew Jones f30c8c0bb8 Update postgres yum/apt repo locations
*Thanks postgres team

(cherry picked from commit b398fcc5b97ed478273e3d124aaaaa3af2879965)
2016-09-29 10:42:08 -04:00
Matthew Jones dbca95fb2a Update postgres yum/apt repo locations
*Thanks postgres team
2016-09-29 10:37:18 -04:00
Matthew Jones 162f0b81d1 Remove unneeded maxread
searchwindowsize was the important bit here
2016-09-28 13:15:53 -04:00
Matthew Jones 56d4210047 Implement Performance improvements shown in #3492
* Make callback workers tunable
* Disable callback worker recycling - doesn't appear to be needed
  anymore
* Tweak pexpect behavior by limiting its read buffer size and search
  window
* Use copy instead of deepcopy for job event callback emitter censor
2016-09-14 16:08:47 -04:00
Matthew Jones 48e15d98b5 Merge branch 'release_3.0.2' into stable
* release_3.0.2: (150 commits)
  Updating changelogs for 3.0.2 release
  fixing deprecated_team.organization credential migration
  Fix issue when installing bundled ansible on el6
  fixed localed date stuff
  update test to check org_auditor access
  ensure team organizations are assigned to credentials
  temporarily pin the pytest version until the ldap error can be fixed
  fixed locale
  fix date locale angular scheduler
  Make sure org admins can see credential after migration, comment updates on related tests add clause in test to verify automatic setting of org of new team credential
  Update team admin credential migration test to current state-of-knowledge
  fix ng-toast rel, resolves #3197 (#3316)
  allow users to edit their first and last name
  Revert "Prevent ignored task from being displayed as failing."
  Revert "Modify job event save behavior"
  fixing old tests for new user creation permissions
  Clean venv on 'make clean'
  Resolve KeyError by coercing instance_id to a str
  Update cloudforms dynamic inventory
  Update foreman inventory script
  ...
2016-08-31 14:30:58 -04:00
Matthew Jones 3beef1d988 Workaround a cascade setnull polymorphic issue
See: https://github.com/django-polymorphic/django-polymorphic/issues/229
2016-08-17 12:55:12 -04:00
Matthew Jones 8fcc194c82 Attempt to wait for job host summaries
Sometimes the job host summaries can land a little later after the job
has finished so sometimes events are still filtering in when the
notifications are triggered
2016-08-10 11:30:02 -04:00
Matthew Jones 4881529688 Merge branch 'ui_release_3.0.1' into release_3.0.2
* ui_release_3.0.1: (54 commits)
  Returning btn-primary to blue
  Fixed adhoc relaunch logic to match normal adhoc launch logic
  Breadcrumb appears correctly on first run
  Fixed display of non-breaking names
  Continuing audit work
  remove aws ask at runtime prompt from cred form config, resolves #3055 (#3058)
  fix missing URI encoding in event summary serch, kickback on #2980 (#3050)
  Switch base class for StateConflict
  Fixed password show/hide on enter for survey maker password type previews
  Fixed password show/hide on enter for survey taker survey questions where type is password
  Prevent populate_user from being registered multiple times.
  Fixing iterator used when jobs list refreshes
  Explicit super user check for JT can_delete
  Fix for populating teams for LDAP user.
  Update hubspot template for marketting
  Fix up flake8
  Rolled back the onExit solution previously implemented to handle the backspace navigation on the job launch modal.  New solution listens for state changes within the directive and cleans itself up.
  Switch disallowed object delete to 409
  Password enter show/hide fix
  add test for CustomInventoryScript serializer
  ...
2016-08-01 13:29:19 -04:00
Matthew Jones 3e1c0111f5 Merge branch 'api_release_3.0.1' into release_3.0.2
* api_release_3.0.1:
  add code to HostAccess can_add so the browsable API will work
  update unit tetsts
  use get_object_or_400 to fetch Role
  refactor to unit tests
  restrict User.admin_role membership changes through RoleUsersList
  fix test
  do not allow membership changes to User.admin_role
  RoleTeam and TeamRole sublist NotFound exception handling and test update
  add system job templates to the unified JT list
  Reorganize activity stream around org admin/auditors
  Allow instant cancel for new jobs
  orphan project protection in job delete access
  pass context into Job and JobList serializer classes
  pass context to unified job template subclasses
  Allow auditors to see same /api/v1/config information as admins
2016-08-01 13:23:37 -04:00
Matthew Jones 0189cd3d0c Bump version for 3.0.2 2016-08-01 11:55:30 -04:00
Matthew Jones bfd037e00b Switch base class for StateConflict
This fixes the output format for the 409 exception return
2016-07-25 17:39:19 -04:00
Matthew Jones ebdf0e49b5 Explicit super user check for JT can_delete 2016-07-25 17:39:19 -04:00
Matthew Jones d3a541483c Fix up flake8 2016-07-25 17:39:19 -04:00
Matthew Jones d389233b88 Switch disallowed object delete to 409
In the case of running job conflicts
2016-07-25 17:39:19 -04:00
Matthew Jones 60e012f75b Force requests to emit application/json
When sending webhook notifications
2016-07-25 12:46:12 -04:00
Matthew Jones 495115af6a Bump version number for 3.0.1 release 2016-07-21 10:51:44 -04:00
Matthew Jones 3ab8a93461 Merge branch 'release_3.0.0' into stable
* release_3.0.0: (2364 commits)
  remove aws ask at runtime prompt from cred form config, resolves #3055 (#3058)
  fix missing URI encoding in event summary serch, kickback on #2980 (#3050)
  Switch base class for StateConflict
  Fixed password show/hide on enter for survey maker password type previews
  Fixed password show/hide on enter for survey taker survey questions where type is password
  Prevent populate_user from being registered multiple times.
  Fixing iterator used when jobs list refreshes
  Explicit super user check for JT can_delete
  Fix for populating teams for LDAP user.
  Update hubspot template for marketting
  Fix up flake8
  Rolled back the onExit solution previously implemented to handle the backspace navigation on the job launch modal.  New solution listens for state changes within the directive and cleans itself up.
  Switch disallowed object delete to 409
  Password enter show/hide fix
  add test for CustomInventoryScript serializer
  Fixed bug where hitting enter in a password field in the job launch/survey maker modal would toggle the show/hide.
  Setting the local var CredentialList to the deep clone seems to be problematic.  Moving this out so that the original object itself is overwritten which is how it's done in other places. (#3017)
  Jobs list page size (#3019)
  resolves kickback on #2980 (#3008)
  Use the correct yum attribute name
  ...
2016-07-18 20:40:13 -04:00
Matthew Jones b587b892b0 Switch base class for StateConflict
This fixes the output format for the 409 exception return
2016-07-18 12:29:51 -04:00
Matthew Jones c36080e149 Explicit super user check for JT can_delete 2016-07-15 13:48:42 -04:00
Matthew Jones df1c1ae473 Fix up flake8 2016-07-15 12:50:59 -04:00
Matthew Jones eb97b8c916 Switch disallowed object delete to 409
In the case of running job conflicts
2016-07-15 11:47:02 -04:00
Matthew Jones c852503163 Fix up some flake8 issues 2016-07-14 12:40:37 -04:00
Matthew Jones 00e55e3813 Add delete protection from certain objects
Certain objects can be sensitive to being deleted while jobs are
running, this protects those objects
2016-07-14 12:22:33 -04:00
Matthew Jones e9afee6149 Revert required org on notification templates
This reverts the validation of a required Organization on the
Notification Template.   After discussion with jlaska and jladd, I think
this can behave fine in this situation.   It's more like a Credential
then where without an Organization the NT only becomes available to
Super Users and the creator of the NT.
2016-07-13 11:10:18 -04:00
Matthew Jones e9a0f41152 Fix an ommitted fields 500 error
If organization or notification_template is omitted entirely from the
POST for a new item then a 500 error would be raised
2016-07-13 10:45:49 -04:00
Matthew Jones d6679936da Update license info, add tool for helpsies 2016-07-12 16:30:30 -04:00
Matthew Jones 2f843d15e0 Also forcefully kill the main process 2016-07-11 14:45:41 -04:00
Matthew Jones 43c5105a57 No more Mr. Nice Tower
or how I learned to stop worrying and use SIGKILL.

Ansible has a bug that could potentially leave tower's jobs hanging
around indefinitely requiring manual shell intervention.   I'm going to
put this here and until Ansible can get to the bottom of it.
2016-07-11 14:37:09 -04:00
Matthew Jones 6447434aa1 Hanele credential in notifications when deleted 2016-07-11 10:16:33 -04:00
Matthew Jones ae9b4d3e58 Revert "Fix up hook conditions for rbac activity stream"
This reverts commit 36c14f83bcb11fcdbd31140ce182ab87e3db4644.
2016-07-08 13:13:22 -04:00
Matthew Jones 26b0d345f8 Notification guarding for deleted inventory 2016-07-08 13:04:42 -04:00
Matthew Jones 1c860b81ac Fix up hook conditions for rbac activity stream 2016-07-08 13:03:34 -04:00
Matthew Jones 4c7f54cf72 Fix an activity stream associate with deleted obj
In some scenarios the activity stream associate could be invoked where
obj2 doesn't exist... the .get() will fail and tank the caller
preventing the save.   This guards that and blocks the activity stream
event, saving the save (whew!)
2016-07-08 12:56:52 -04:00
Matthew Jones 6a1973c873 Disallow deleting job templates when there are jobs running 2016-07-07 12:03:41 -04:00
Matthew Jones 3e0ed4c1a1 Fix up organization default exposed by unit test 2016-07-06 16:36:22 -04:00
Matthew Jones f75eba471e Fix flake8 'not in' 2016-07-06 16:09:38 -04:00
Matthew Jones 2528952090 Require organization when creating new notification templates 2016-07-05 15:31:54 -04:00
Matthew Jones 77f2bd1c0d Missing ad-hoc notification template assignment 2016-07-05 14:34:49 -04:00
Matthew Jones cec1f413a4 Switch notification to use jobhostsummary name
In case the host is removed prior to the notification being emitted
we'll use the host_name cached on the jobhostsummary object iself.
2016-07-05 12:32:37 -04:00
Matthew Jones d899c33ac4 Handle errors that come out of job deps generation 2016-07-01 15:40:46 -04:00
Matthew Jones 9bd05abcf3 Derive ad-hoc - inventory source notification templates 2016-06-29 13:48:00 -04:00
Matthew Jones 8055bcc94e Create activity stream event on group delete
Normally this is bypassed for recursive deletes, this manually creates
one beyond the bypass
2016-06-27 16:53:47 -04:00
Matthew Jones 4eb6adb5e7 Add notification_template to summary fields 2016-06-27 15:35:34 -04:00
Matthew Jones 80b044580d Fix up flake8 for notification tests 2016-06-27 15:12:10 -04:00
Matthew Jones 78e10241da Disallow DELETE on a notification_template
When there are pending notifications
2016-06-27 11:36:29 -04:00
Matthew Jones 288ecc1c5b Ignore management jobs on activity stream 2016-06-23 16:14:56 -04:00
Matthew Jones a9162278f8 Perform length validation on notification lists
Wherever we use a list for notification template configuration we'll now
validate that it contains at least one item at submission time.
2016-06-23 11:31:59 -04:00
Matthew Jones 960b6e22aa Fix up broken CredentialOwnerTeams view
Missing the object when requesting whether the user can access it or not
2016-06-22 15:17:45 -04:00
Matthew Jones 8d67d3a6fc Don't auto-gen the demo project update on preload 2016-06-22 14:49:27 -04:00
Matthew Jones 0fda36116a Change org admin role access for inventory scripts
Previously a super user was required to create and administer custom
inventory scripts.   Since these are tied to organizations this commit
extends orgadmin admininstration abilities to custom scripts within
their organization
2016-06-22 13:58:14 -04:00
Matthew Jones 87f1f6f8e6 Update inventory script visibility access level
admin roles on inv scripts can now see the actual script contents.  Read
role doesn't convey that capability.

This should be pretty similar to before from a read_role
perspective... it now allows more folks to see the script contents
2016-06-22 13:48:38 -04:00
Matthew Jones 2a4fa0ed9d Increment sent messages for pagerduty backend 2016-06-22 12:09:04 -04:00
Matthew Jones c812e85f65 Change email notification formatting.
Instead of pretty printing the datastructure we'll now dump out the
result in json format with indent=4 for pretty viewing.
2016-06-22 11:52:49 -04:00
Matthew Jones 462d43060e Fix up missing notifications in invsrc 2016-06-17 11:52:13 -04:00
Matthew Jones 526c7d719f Disable rax ssl verification everywhere 2016-06-16 15:48:36 -04:00
Matthew Jones 251dae657a Force schedule save during celery startup 2016-06-16 13:14:53 -04:00
Matthew Jones cded126f5b worker_ready is unused here 2016-06-15 14:40:50 -04:00
Matthew Jones 19c8fe915f Add a celery worker init task
We'll use this task to perform any worker specific startup actions.
Initially this is used to re-sync any Tower schedules on startup.
2016-06-15 12:09:39 -04:00
Matthew Jones 9b49ff15bd Mass rename foreman -> satellite6
For end-user facing elements. We still maintain foreman for some
underlying logic needed by the modules
2016-06-15 11:16:15 -04:00
Matthew Jones 8e5f502d00 Use ansible venv to be used during inv import 2016-06-14 15:21:09 -04:00
Matthew Jones 9e56913893 Capture some change info in activity stream for associate/disassociate events 2016-06-13 12:41:50 -04:00
Matthew Jones 4d52d0748f Include core ec2 fix for tag sync limit 2016-06-13 11:24:47 -04:00
Matthew Jones 753b338205 Make sure project team list is filtered for access 2016-06-10 15:10:37 -04:00
Matthew Jones b612f65479 Fix up the project teams list
This was still referencing the old mechanism for pulling associative
information.  This updates it to query against the new role system
2016-06-10 15:06:14 -04:00
Matthew Jones f545640f58 Fix an issue calling build_env for system jobs 2016-06-10 10:21:36 -04:00
Matthew Jones c124aeaf14 Change ldap and other sso defaults to remove from team/admin
Previously the default was not to remove an sso user from a team or as
an admin if they were removed from the SSO service.  This changes that
and updates some readme-type lines.
2016-06-09 16:02:29 -04:00
Matthew Jones 3cb8c26381 Force rackspace inventory to not verify ssl 2016-06-09 14:41:19 -04:00
Matthew Jones ebbadbf8da Upgrade python-saml for security issue 2016-06-09 14:23:10 -04:00
Matthew Jones ad0915a6d0 Add libcloud dependency to tower venv 2016-06-09 14:20:34 -04:00
Matthew Jones 3e8aaa4b5e Fix an issue showing attach/detach docs
There's a condition in sub_list_create_api_view.md template that
controls whether or not the attach/detach documentation is shown for
sublist elements that support it.   Looks like it's been this way for a
while.  This updates that condition to work anywhere it's needed
2016-06-09 09:56:44 -04:00
Matthew Jones 908111f656 Remove mongo key from being installed on the dev container 2016-06-08 12:34:59 -04:00
Matthew Jones 20fe9e9614 Updating docker dev workflow
* Moving to new docker compose file format
* Adding some things that will be needed for python dependencies
2016-06-08 12:25:14 -04:00
Matthew Jones 870175555f Remove pywinrm from tower venv 2016-06-07 16:51:43 -04:00
Matthew Jones 3b2a6eda4e Upgrade pywinrm per @nitzmahone's recommendation 2016-06-07 16:51:20 -04:00
Matthew Jones f889113711 Granularize venv selection
Not a good idea to select the virtualenv in the base class.  Force
selection to happen in the concrete classes by calling a helper method
to set up the proper virtualenv.   This should fix any issues where
tower is selecting the wrong virtualenv to run against.
2016-06-07 14:47:20 -04:00
Matthew Jones 8adcc4092c Use defaults when validating jt properties.
Don't assume attrs will be populated.  Check the instance also
2016-06-07 14:14:24 -04:00
Matthew Jones bdf5ee1fea Import latest ec2.py and fix an issue
Upgrading ec2.py to fix an issue where the module wasn't obeying
"replace_dash_in_groups" property.
2016-06-07 14:01:00 -04:00
Matthew Jones c4b06ce7c0 Force survey min/max type during comparisons 2016-06-07 10:42:03 -04:00
Matthew Jones 5d32d6e17a Add password to survey spec documentation 2016-06-06 13:24:21 -04:00
Matthew Jones 936db91560 Fix scan jobs not auto-starting inventory syncs
Originally it would exclude any depdendies if inventory or project was none
2016-06-06 12:30:38 -04:00
Matthew Jones 7e7a611366 Scan job success notification could fail
We can't assume a project is part of a scan job template so here we'll
short circuit that
2016-06-06 12:07:54 -04:00
Matthew Jones b0de8038d0 Fix validation issues for scan job templates
Also adding some jobtemplate serializer-based validation unit tests
2016-06-06 12:01:56 -04:00
Matthew Jones 26b31fedbc Expose any external account as a user property
This adds a field to the user object to denote whether and what kind of
user account it is.

For normal accounts this field will be null.
For social auth accounts it will be "social"
for radius accounts it will be "radius"

This change also prevents a radius user from changing their local
password thus bypassing the password caching feature of django-radius
2016-06-02 16:58:19 -04:00
Matthew Jones 1881af8e77 Fix passively creation of notification templates
Passively creating notification templates on m2m endpoints was failing
serializer validation due to a bug trying to look up the related
object.  In reality that check should only happen when the view is the
NotificationTemplateDetail view.
2016-06-02 15:04:51 -04:00
Matthew Jones 0591647333 Implement a flag that allows simulteanous job launches on job templates 2016-06-02 15:04:51 -04:00
Matthew Jones 3a43e36d4a Merge branch 'release_2.4.5' into stable
* release_2.4.5:
  Update setup for bundled ansible-2 dependencies
  fix ansible2.0 bundle deps bootstrap
  Use yum's compare_providers() function instead of just pulling the latest alphabetically.
2016-06-01 16:41:24 -04:00
Matthew Jones 8708fcf8ce Handle corner case when a job spawns notifications
If a dependent task fails a job might not have a started or finished
time when emitting the notification
2016-06-01 15:04:29 -04:00
Matthew Jones 79cbd68a13 Rev boto and add ap-northeast-2 to ec2 regions 2016-06-01 14:22:08 -04:00
Matthew Jones 7514ed389a Don't trim whitespace from customer inv scripts 2016-05-20 13:30:10 -04:00
Matthew Jones e5ec5c9726 Change prefix for imported sattelite groups 2016-05-18 10:22:12 -04:00
Matthew Jones 9ba98d9cac Rename channels to rooms for hipchat notifications 2016-05-17 15:33:22 -04:00
Matthew Jones 430b548395 Exclude the job template limit during callback
This causes some unexpected behavior when commas instead of colons are
used during the job template limit due to a bug in ansible.  It has the
effect of expanding the number of hosts that it will run on instead of
just one which is what we are expecting
2016-05-17 10:35:14 -04:00
Matthew Jones ae4cfc98ce Update to house's latest legacy azure inv script 2016-05-13 10:47:18 -04:00