Multiple record for same user and resource in quota_usage table

Bug #1484343 reported by Zhenyu Zheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Medium
Gorka Eguileor
OpenStack Compute (nova)
Won't Fix
Medium
Unassigned

Bug Description

Currently, the quota usage table doesn't contain UniqueConstraint policy. Although it has locks when writing data, but under extreme circumstance, for example: launching over 100 instances at the same time for a new tenant(user). In this condition,the quota usage table for this user is empty, and there might be a chance that multiple record are recorded for same resource and same user.

Adding UniqueConstraint policy for this table can solve this problem.

Tags: quotas
Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
tags: added: quotas
summary: - Race conditions for quota_usage tabel
+ Multiple record for same user and resource in quota_usage tabel
description: updated
Changed in nova:
status: New → In Progress
wanghao (wanghao749)
Changed in cinder:
assignee: nobody → wanghao (wanghao749)
Changed in nova:
assignee: Zhenyu Zheng (zhengzhenyu) → wangxiyuan (wangxiyuan)
Changed in nova:
assignee: wangxiyuan (wangxiyuan) → Zhenyu Zheng (zhengzhenyu)
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/217465

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Zhenyu Zheng (<email address hidden>) on branch: master
Review: https://review.openstack.org/212908
Reason: Need to come up with new ideas.

wanghao (wanghao749)
Changed in cinder:
importance: Undecided → Medium
Changed in nova:
status: In Progress → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/217465
Reason: This review is > 4 weeks without comment and currently blocked by a core reviewer with a -2. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and contacting the reviewer with the -2 on this review to ensure you address their concerns.

Revision history for this message
John Garbutt (johngarbutt) wrote : Re: Multiple record for same user and resource in quota_usage tabel

Seems like a very good idea.

Given the use of first, I suspect that caused issues where we just update one copy, and leave the other. Not sure if the order is always deterministic.

Just need to be sure to clean out duplicates, I think it's safe to delete the one we would not access using first. Need this in the script before adding the constraint, similar to what has been done for uuid constraints previously.

Changed in nova:
importance: Undecided → Medium
Revision history for this message
Zhenyu Zheng (zhengzhenyu) wrote :

@John Garbutt, thanks for the information, the clean up thing was actually what blocked this, could you provide more details about the example you talked about?

summary: - Multiple record for same user and resource in quota_usage tabel
+ Multiple record for same user and resource in quota_usage table
Revision history for this message
surbhi sarda (surbhisarda) wrote :

@Zhenyu Zheng Can i work on this bug?

Revision history for this message
Jay Bryant (jsbryant) wrote :

This hasn't been touched for quite some time. I think it can be moved to triaged. Someone else could pick it up.

Changed in cinder:
status: In Progress → Triaged
Sean Dague (sdague)
Changed in nova:
assignee: Zhenyu Zheng (zhengzhenyu) → nobody
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: wanghao (wanghao749) → nobody
Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in nova:
status: Confirmed → Won't Fix
Revision history for this message
Gorka Eguileor (gorka) wrote :
Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 18.0.0.0rc2

This issue was fixed in the openstack/cinder 18.0.0.0rc2 release candidate.

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

This issue was fixed in the openstack/cinder 19.0.0.0b1 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.