The network related quotas aren't deprecated in quota-class API

Bug #1701211 reported by Alex Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Ghanshyam Mann

Bug Description

The network related quotas are deprecated in the quota-set API since 2.36. (https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/quota_sets.py#L49)

But still existed in the quota-class API. https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/quota_classes.py#L22

We should deprecate those network quotas in the quota-class API also.

Revision history for this message
Alex Xu (xuhj) wrote :
Changed in nova:
status: New → Confirmed
Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

yea, i will updated the spec for this and let's see if we can fix those together.

Changed in nova:
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
Alex Xu (xuhj) wrote :

Also note that the networks quota in the quota class API isn't controlled by the config options. That should be fixed also.

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

+1 for fixing in same microversion.

But it is difficult to fix config controlled things. Fixing it with microversion (for > 2.x) not needed as we are removing the networks quota from quota class.

If fix (without microversion) networks quota (get, update) based on config controlled similar to quota set (where it 400 if network quota is in request but not enabled in config), then it seems return code change (200 ->400). If config option is false then networks quota will not be registered [1]. In that case, if anyone try to update quota class with networks quota, it will at least update DB without any error [2] (ran locally)

..1 https://github.com/openstack/nova/blob/0ca64a8690ac9de720131b522d29dcaed824eb8d/nova/api/openstack/compute/tenant_networks.py#L190

.. 2 https://github.com/openstack/nova/blob/0ca64a8690ac9de720131b522d29dcaed824eb8d/nova/api/openstack/compute/quota_classes.py#L85-L87
https://github.com/openstack/nova/blob/0ca64a8690ac9de720131b522d29dcaed824eb8d/nova/db/sqlalchemy/api.py#L3468-L3485

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova-specs (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/480815

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova-specs (master)

Reviewed: https://review.openstack.org/480815
Committed: https://git.openstack.org/cgit/openstack/nova-specs/commit/?id=451f299ffe1c928361e38f81ce49cdf3775a21d9
Submitter: Jenkins
Branch: master

commit 451f299ffe1c928361e38f81ce49cdf3775a21d9
Author: ghanshyam <email address hidden>
Date: Thu Jul 6 06:12:24 2017 +0300

    Update quota class spec to filter out networks quota

    networks related quotas have been filtered out from quota-set APIs
    but missed out to do that in quota-class APIs

    Change-Id: Ib2937681432641b6341af9cc27a5c1a098c093d9
    Related-Bug: #1701211

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/467999
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=92e0efeefd6782f205dc6a2b1f8e8a97f146596d
Submitter: Jenkins
Branch: master

commit 92e0efeefd6782f205dc6a2b1f8e8a97f146596d
Author: ghanshyam <email address hidden>
Date: Thu Jul 6 08:58:48 2017 +0300

    Fix quota class set APIs

    v2.1 API which does not return the 'server_groups' and
    'server_group_members' quotas in GET & PUT os-quota-class-sets
    API response. v2 API used to return those keys in API response.

    Also filter out the network related quotas from os-quota-class-sets
    APIs

    Fixing this with microversion.
    Closes-Bug: #1701211
    Closes-Bug: #1693168
    implement-blueprint fix-quota-classes-api

    Change-Id: I66aeb7a92fb5ee906fead78030bd84a2e97916e8

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 16.0.0.0b3

This issue was fixed in the openstack/nova 16.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.