ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.54k stars 3.35k forks source link

[WIP] Org hosts limit #3174

Closed jbradberry closed 5 years ago

jbradberry commented 5 years ago
SUMMARY

This PR implements the feature allowing users to limit the number of hosts from a license an organization is allowed to use.

ISSUE TYPE
COMPONENT NAME
AWX VERSION
awx: 3.0.0
ADDITIONAL INFORMATION
softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build failed.

softwarefactory-project-zuul[bot] commented 5 years ago

Build failed.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build failed.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build failed.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

one-t commented 5 years ago

Hey! I decided to fire up tower with this branch and hack on it a little- I've found that jobs cannot be launched in the current state.

tower.log

2019-02-12 23:42:59,853 WARNING  awx.api.generics status 400 received by user admin attempting to access /api/v2/job_templates/5/launch/ from 174.127.234.140

Response to POSTing to $tower_url/api/v2/job_templates/$ID/launch

Possibly unhandled rejection: {"data":{"detail":"Bad data found in related field inventory."},"status":400,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"/api/v2/job_templates/5/launch/","headers":{"Accept":"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest","X-CSRFToken":"TMvvj6K1mB2ia7QO8RIhafrEFo2S6S2zd98whSbGRPbU3jJzVFiOLP9gTUONnFSX"}},"statusText":"Bad Request","xhrStatus":"complete"}
wenottingham commented 5 years ago

Yes, that description of the use case is correct.

jbradberry commented 5 years ago

Hey! I decided to fire up tower with this branch and hack on it a little- I've found that jobs cannot be launched in the current state.

tower.log

2019-02-12 23:42:59,853 WARNING  awx.api.generics status 400 received by user admin attempting to access /api/v2/job_templates/5/launch/ from 174.127.234.140

Response to POSTing to $tower_url/api/v2/job_templates/$ID/launch

Possibly unhandled rejection: {"data":{"detail":"Bad data found in related field inventory."},"status":400,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"/api/v2/job_templates/5/launch/","headers":{"Accept":"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest","X-CSRFToken":"TMvvj6K1mB2ia7QO8RIhafrEFo2S6S2zd98whSbGRPbU3jJzVFiOLP9gTUONnFSX"}},"statusText":"Bad Request","xhrStatus":"complete"}

Ugh, yeah ok, I think I see where I messed up. I should be able to get a fix up pretty quickly.

softwarefactory-project-zuul[bot] commented 5 years ago

Build failed.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build failed.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

AlanCoding commented 5 years ago

I need to back up a little bit to the feature design, how will an organization admin find out in the UI what their current host count is vs. what their allocation is?

AlanCoding commented 5 years ago

What roles are allowed to change max_hosts of an organization?

If an organization admin can just increase their max hosts, then it seems like that provides limited system protection, because there will be many users who can decide to consume more of the license allocation.

wenottingham commented 5 years ago

What roles are allowed to change max_hosts of an organization?

Sysadmin only.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

unlikelyzero commented 5 years ago

I am one of the two test owners assigned to this project. I'll be filing issues against this as I find them today.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build failed.

softwarefactory-project-zuul[bot] commented 5 years ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

AlexSCorey commented 5 years ago

This addresses issue https://github.com/ansible/awx/issues/3290

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded.

softwarefactory-project-zuul[bot] commented 5 years ago

Build succeeded (gate pipeline).