2020-08-27 23:34:33 |
melanie witt |
bug |
|
|
added bug |
2020-08-27 23:38:00 |
melanie witt |
summary |
Per-user quotas not scoped correctly when creating or restoring a server |
Per-user quotas not scoped correctly when creating a server |
|
2020-08-27 23:38:12 |
melanie witt |
description |
While looking into an issue reported on the ML [1] around per-user quotas not working properly, I found a bug where quota checking is not scoped correctly when creating or restoring a server.
This causes per-user quota limits not to be honored during these API requests.
The problem is in a utility function we use for checking quota when creating or restoring servers:
https://github.com/openstack/nova/blob/f521f4dbace0e35bedd089369da6f6969da5ca32/nova/compute/utils.py#L1104-L1120
The Quotas.check_deltas method needs a user_id keyword arg in order to scope a quota check to a particular user. However, when we call check_num_instances_quota we don't pass a project_id or user_id because at the time of the quota check, we have not yet created an instance record and thus will not use that to determine the appropriate project and user. Instead, we should rely on the RequestContext.project_id and RequestContext.user_id as defaults in this case, but check_num_instances_quota only defaults project_id and not user_id.
check_num_instances_quota should also default user_id to the RequestContext.user_id when user_id is not explicitly passed.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-August/016861.html |
While looking into an issue reported on the ML [1] around per-user quotas not working properly, I found a bug where quota checking is not scoped correctly when creating a server.
This causes per-user quota limits not to be honored during these API requests.
The problem is in a utility function we use for checking quota when creating or restoring servers:
https://github.com/openstack/nova/blob/f521f4dbace0e35bedd089369da6f6969da5ca32/nova/compute/utils.py#L1104-L1120
The Quotas.check_deltas method needs a user_id keyword arg in order to scope a quota check to a particular user. However, when we call check_num_instances_quota we don't pass a project_id or user_id because at the time of the quota check, we have not yet created an instance record and thus will not use that to determine the appropriate project and user. Instead, we should rely on the RequestContext.project_id and RequestContext.user_id as defaults in this case, but check_num_instances_quota only defaults project_id and not user_id.
check_num_instances_quota should also default user_id to the RequestContext.user_id when user_id is not explicitly passed.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-August/016861.html |
|
2020-08-27 23:38:23 |
melanie witt |
description |
While looking into an issue reported on the ML [1] around per-user quotas not working properly, I found a bug where quota checking is not scoped correctly when creating a server.
This causes per-user quota limits not to be honored during these API requests.
The problem is in a utility function we use for checking quota when creating or restoring servers:
https://github.com/openstack/nova/blob/f521f4dbace0e35bedd089369da6f6969da5ca32/nova/compute/utils.py#L1104-L1120
The Quotas.check_deltas method needs a user_id keyword arg in order to scope a quota check to a particular user. However, when we call check_num_instances_quota we don't pass a project_id or user_id because at the time of the quota check, we have not yet created an instance record and thus will not use that to determine the appropriate project and user. Instead, we should rely on the RequestContext.project_id and RequestContext.user_id as defaults in this case, but check_num_instances_quota only defaults project_id and not user_id.
check_num_instances_quota should also default user_id to the RequestContext.user_id when user_id is not explicitly passed.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-August/016861.html |
While looking into an issue reported on the ML [1] around per-user quotas not working properly, I found a bug where quota checking is not scoped correctly when creating a server.
This causes per-user quota limits not to be honored during these API requests.
The problem is in a utility function we use for checking quota when creating servers:
https://github.com/openstack/nova/blob/f521f4dbace0e35bedd089369da6f6969da5ca32/nova/compute/utils.py#L1104-L1120
The Quotas.check_deltas method needs a user_id keyword arg in order to scope a quota check to a particular user. However, when we call check_num_instances_quota we don't pass a project_id or user_id because at the time of the quota check, we have not yet created an instance record and thus will not use that to determine the appropriate project and user. Instead, we should rely on the RequestContext.project_id and RequestContext.user_id as defaults in this case, but check_num_instances_quota only defaults project_id and not user_id.
check_num_instances_quota should also default user_id to the RequestContext.user_id when user_id is not explicitly passed.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-August/016861.html |
|
2020-08-27 23:39:48 |
OpenStack Infra |
nova: status |
New |
In Progress |
|
2020-08-27 23:43:54 |
melanie witt |
nominated for series |
|
nova/stein |
|
2020-08-27 23:43:54 |
melanie witt |
bug task added |
|
nova/stein |
|
2020-08-27 23:43:54 |
melanie witt |
nominated for series |
|
nova/queens |
|
2020-08-27 23:43:54 |
melanie witt |
bug task added |
|
nova/queens |
|
2020-08-27 23:43:54 |
melanie witt |
nominated for series |
|
nova/train |
|
2020-08-27 23:43:54 |
melanie witt |
bug task added |
|
nova/train |
|
2020-08-27 23:43:54 |
melanie witt |
nominated for series |
|
nova/pike |
|
2020-08-27 23:43:54 |
melanie witt |
bug task added |
|
nova/pike |
|
2020-08-27 23:43:54 |
melanie witt |
nominated for series |
|
nova/ussuri |
|
2020-08-27 23:43:54 |
melanie witt |
bug task added |
|
nova/ussuri |
|
2020-08-27 23:43:54 |
melanie witt |
nominated for series |
|
nova/rocky |
|
2020-08-27 23:43:54 |
melanie witt |
bug task added |
|
nova/rocky |
|
2020-08-27 23:56:17 |
melanie witt |
nova: importance |
Medium |
Low |
|
2020-08-27 23:56:31 |
melanie witt |
nova/pike: importance |
Undecided |
Low |
|
2020-08-27 23:56:34 |
melanie witt |
nova/queens: importance |
Undecided |
Low |
|
2020-08-27 23:56:36 |
melanie witt |
nova/rocky: importance |
Undecided |
Low |
|
2020-08-27 23:56:38 |
melanie witt |
nova/stein: importance |
Undecided |
Low |
|
2020-08-27 23:56:40 |
melanie witt |
nova/train: importance |
Undecided |
Low |
|
2020-08-27 23:56:44 |
melanie witt |
nova/ussuri: importance |
Undecided |
Low |
|
2020-09-11 12:31:42 |
OpenStack Infra |
nova: status |
In Progress |
Fix Released |
|
2021-02-23 20:28:31 |
melanie witt |
nova/ussuri: status |
New |
In Progress |
|
2021-02-23 20:28:31 |
melanie witt |
nova/ussuri: assignee |
|
melanie witt (melwitt) |
|
2021-04-13 11:54:11 |
Elod Illes |
nova/ussuri: status |
In Progress |
Fix Released |
|