wrong calculation on user quota

Bug #1542598 reported by TaoBai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Tom Patzig

Bug Description

Here is the failure test case:

In a pure manila environment. Create two users for telent "demo" : "user1" and "user2"

Step1:
create two shares and each 1 share 1GB with "user1". You could check the quota usage through "manila absolute-limits" that two shares and 2 GB are used
This is step is right.

Step2:
Change to "user2". Delete the two shares just created by user1 . Then use "manila absolute-limits" to check the quota usage, this 1 share and 1 GB is used even there is no share left any more.

I compared with Nova db with similiar case found that the big difference is in the db table "quota_usages". If "user2" delete the resource created by "user1". In nova, the user1's quota usage will be decreased even you are using "user2"but for manila, user2's quota usage decreased until to "-1".

tags: added: bugsmash-mitaka
Marc Koderer (m-koderer)
Changed in manila:
assignee: nobody → Marc Koderer (m-koderer)
Marc Koderer (m-koderer)
Changed in manila:
assignee: Marc Koderer (m-koderer) → Tom Patzig (tom-patzig)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
status: New → In Progress
Revision history for this message
TaoBai (baitao2020) wrote :

Hoping this bugfix could be cherry pick to Liberty release. thanks

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/290998

Changed in manila:
milestone: none → mitaka-rc1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (stable/liberty)

Change abandoned by Tom Patzig (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/290998
Reason: will be cherry-picked again, once master change merged

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

Reviewed: https://review.openstack.org/289992
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=8d3e72f8b25ca9ae86544dc7ab249f9941dee5f1
Submitter: Jenkins
Branch: master

commit 8d3e72f8b25ca9ae86544dc7ab249f9941dee5f1
Author: Tom Patzig <email address hidden>
Date: Tue Mar 8 16:55:04 2016 +0100

    Update quota of proper user on resource delete

    When deleting a resource (share, snapshot, share-network) the quota
    usage of the current user gets updated, which might not be the same
    user, who created that resource. That means the quota usage will never
    be reduced for initial user.
    This fix adds the resources user_id to the quota update statements, to
    update the quota_usage for the user, that created this resource,
    irregardless who deletes it.

    Change-Id: Iefe8f4d0e7c526e3ed94c1994ba62f1a2a929ba2
    Closes-Bug: #1542598

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila 2.0.0.0rc1

This issue was fixed in the openstack/manila 2.0.0.0rc1 release candidate.

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

This issue was fixed in the openstack/manila 2.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (stable/liberty)

Change abandoned by Joshua Hesketh (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/290998
Reason: This branch (stable/liberty) is at End Of Life

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.