Closed jbradberry closed 5 years ago
Build succeeded.
Build failed.
Build failed.
Build succeeded.
Build succeeded.
Build succeeded.
Build succeeded.
Build succeeded.
Build succeeded.
Build failed.
Build succeeded.
Build failed.
Build succeeded.
Build succeeded.
Build succeeded.
Build succeeded.
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"}
Yes, that description of the use case is correct.
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.
Build failed.
Build succeeded.
Build failed.
Build succeeded.
Build succeeded.
Build succeeded.
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?
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.
What roles are allowed to change
max_hosts
of an organization?
Sysadmin only.
Build succeeded.
Build succeeded.
Build succeeded.
Build succeeded.
Build succeeded.
Build succeeded.
I am one of the two test owners assigned to this project. I'll be filing issues against this as I find them today.
Build succeeded.
Build failed.
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.
Build succeeded.
Build succeeded.
This addresses issue https://github.com/ansible/awx/issues/3290
Build succeeded.
Build succeeded.
Build succeeded (gate pipeline).
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
ADDITIONAL INFORMATION
max_hosts
field to theOrganization
modelorg_host_limit_error
field to theInventoryUpdate
model