Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1635485

Summary: Wrong Volumes count in Project overview
Product: Red Hat OpenStack Reporter: rohit londhe <rlondhe>
Component: openstack-cinderAssignee: Cinder Bugs List <cinder-bugs>
Status: CLOSED EOL QA Contact: Avi Avraham <aavraham>
Severity: medium Docs Contact: Kim Nylander <knylande>
Priority: medium    
Version: 10.0 (Newton)CC: abishop, brian.rosmaita, cinder-bugs, eharney, jvisser, nlevinki, pgrist, scohen
Target Milestone: Upstream M2Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-07 10:39:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rohit londhe 2018-10-03 05:00:33 UTC
Description of problem:

Wrong Volumes count in Project overview for a particular project.

The quota usage for project "v2389_ABC" is set to -1 i.e infinity, and the number of volume present under this project is 1.

But still we are getting the volume count as per below usage as 194, the same is reflected in the pie chart on a dashboard.

[stack@undercloud (overcloudrc) ~]$ cinder quota-usage 8a6e10670ef947549eda4355236a3a4d
+-----------------------------+--------+----------+-------+
| Type                        | In_use | Reserved | Limit |
+-----------------------------+--------+----------+-------+
| backup_gigabytes            | 0      | 0        | 1000  |
| backups                     | 0      | 0        | 10    |
| gigabytes                   | 17200  | 0        | -1    |
| gigabytes_tripleo-ceph      | 17200  | 0        | -1    |
| gigabytes_tripleo-ceph-fast | 0      | 0        | -1    |
| per_volume_gigabytes        | 0      | 0        | -1    |
| snapshots                   | 0      | 0        | -1    |
| snapshots_tripleo-ceph      | 0      | 0        | -1    |
| snapshots_tripleo-ceph-fast | 0      | 0        | -1    |
| volumes                     | 194    | 0        | -1    |
| volumes_tripleo-ceph        | 194    | 0        | -1    |
| volumes_tripleo-ceph-fast   | 0      | 0        | -1    |
+-----------------------------+--------+----------+-------+

However, when checking cinder db we get the below count.


MariaDB [cinder]> select count(*) from volumes where project_id = '8a6e10670ef947549eda4355236a3a4d' ;
+----------+
| count(*) |
+----------+
|     8758 |
+----------+
1 row in set (0.01 sec)

MariaDB [cinder]> select count(*) from volumes where project_id = '8a6e10670ef947549eda4355236a3a4d' and deleted_at is not NULL;
+----------+
| count(*) |
+----------+
|     8303 |
+----------+

Wanted to know from where the count 194 exactly came?

This is not the number of volumes under project '8a6e10670ef947549eda4355236a3a4d', there is only single volume under this project.

Also, this is not the volume quota set for project '8a6e10670ef947549eda4355236a3a4d'.
Version-Release number of selected component (if applicable):

openstack-cinder-9.1.4-12.el7ost.noarch                     
puppet-cinder-9.5.0-3.el7ost.noarch                         
python-cinder-9.1.4-12.el7ost.noarch                        
python-cinderclient-1.9.0-6.el7ost.noarch  

How reproducible:

Not able to reproduce as this is project specific count.

Steps to Reproduce:
NA.

Actual results:

Should get the correct volume count in dashboard overview pie chart.

Expected results:

Dashboard pie chat as well as CLI not showing the correct count.

Additional info:

Comment 2 Alan Bishop 2018-10-29 16:58:44 UTC
Sorry, but there are too many fundamental issues with Cinder's quota management to pin down the exact cause behind what's happening here. The upstream cinder community has been hoping to redesign the quota subsystem, which is why we've targeted this BZ for OSP-16.