Incorrect quota usage reported for generic volume groups quotas

Bug #1711381 reported by Abhishek Sharma M
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Abhishek Sharma M

Bug Description

After installation, for the first time when we create a generic volume group, the in_use quota value is shown as 2 (instead of 1).

Changed in cinder:
assignee: nobody → Abhishek Sharma M (abhi.sharma)
Changed in cinder:
status: New → In Progress
Revision history for this message
Abhishek Sharma M (abhi.sharma) wrote :

What I observed is that when i try to create a generic volume group using POST-/v3/{project_id}/groups API, just after the openstack installation, quota usage of generic volume group is shown as 2 (instead of 1). This happens only for the first time. After this, for every x generic volume group created, x will be added to already stored number.
This behavior is not that it happens only when the generic volume group quota is zero, it happens when no row of generic volume group exists in the 'cinder' database in 'quota_usages' table.

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

Fix proposed to branch: master
Review: https://review.openstack.org/495663

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

Reviewed: https://review.openstack.org/495663
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=fc99c3cfdd54999518fd9aecdf4ec905366042b7
Submitter: Jenkins
Branch: master

commit fc99c3cfdd54999518fd9aecdf4ec905366042b7
Author: Abhishek Sharma <email address hidden>
Date: Sun Aug 20 17:33:47 2017 -0500

    Making reservations before group creation

    The problem here was when we do reservation after creating group,
    synchronization during quota_reserve() gets in_use value as 1 as
    the group has already been created befre reserving & quota commit
    updates groups in_use value as +1, hence making 2 for the first
    time. So, reservations have been made before creating groups.

    Change-Id: If5f3cf75e39ed932028be7a2fb583c2576cb04bf
    Closes-Bug: 1711381

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/508070

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/pike)

Reviewed: https://review.openstack.org/508070
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=1192d49aa946f4e6d4efa1c78ce9453e3b86b3ea
Submitter: Jenkins
Branch: stable/pike

commit 1192d49aa946f4e6d4efa1c78ce9453e3b86b3ea
Author: Abhishek Sharma <email address hidden>
Date: Sun Aug 20 17:33:47 2017 -0500

    Making reservations before group creation

    The problem here was when we do reservation after creating group,
    synchronization during quota_reserve() gets in_use value as 1 as
    the group has already been created befre reserving & quota commit
    updates groups in_use value as +1, hence making 2 for the first
    time. So, reservations have been made before creating groups.

    Change-Id: If5f3cf75e39ed932028be7a2fb583c2576cb04bf
    Closes-Bug: 1711381
    (cherry picked from commit fc99c3cfdd54999518fd9aecdf4ec905366042b7)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.0.0b1

This issue was fixed in the openstack/cinder 12.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 11.0.1

This issue was fixed in the openstack/cinder 11.0.1 release.

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.