yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #68771
[Bug 1713724] Re: Edit project validates quota against resources used in current project instead of edited project.
Reviewed: https://review.openstack.org/510188
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=33dc94079cc25128998d2f339e664a775ce82396
Submitter: Zuul
Branch: master
commit 33dc94079cc25128998d2f339e664a775ce82396
Author: David Lyle <dklyle0@xxxxxxxxx>
Date: Fri Oct 6 10:44:03 2017 -0600
Correct quota usage check for instances
Previously, updating the quota value for instance on a project that
the user was not currently scoped to would validate the new quota
value by comparing with the usage of the currently scoped project.
The cause of this error was an incorrect use of the server list
parameters.
According to the comment in nova source:
https://github.com/openstack/nova/blob/d43d1d673403c1bf9e2ffd94d7a711956a3506de/nova/api/openstack/compute/servers.py#L277-L280
and the comments in this bug:
https://bugs.launchpad.net/nova/+bug/1185290
indicate that the tenant_id or project_id flag cannot be used without
the --all-tenants flag.
The fix involves passing the --all-tenants flag when querying instance usage
for any project the user is not currently scoped to. It also removes the
passing of the tenant_id flag when querying the current project.
Tests were also updated to match the new behavior by not passing the
tenant_id to the API call to list servers where the target project is
the currently scoped project.
Change-Id: Iee06bc1c8ccd50f595f4cb274f956c13495c8494
Closes-Bug: #1713724
** Changed in: horizon
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1713724
Title:
Edit project validates quota against resources used in current project
instead of edited project.
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
Hi,
if we tried to add users in project using horizon and that project is different than edited project. Saving can fail on quetas exceed, because current amount of quotas was taken from selected project instead of form-related project.
Maybe you should use instance.project instead of request.project.
Steps to reproduce:
Select some project with some allocated RAM and VCPUS.
Edit a project using admin interface, project must be other then selected.
Set a smaller quotas than selected project already allocated.
Saving is forbidden due to lesser quotas than enforced in the form - this is because quotas was computed from bad project.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1713724/+subscriptions
References