Add unnecessary record in mysql when I query quota with nonexistent tenant_id

Bug #1665187 reported by Liu Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
New
Undecided
Unassigned

Bug Description

when I query quota with nonexistent tenant_id use trove cli, will add unnecessary record to mysql(database:trove, table:quota_usages).

e.g.

#trove quota-show errtenant
+-----------+--------+----------+-------+
| Resource | In Use | Reserved | Limit |
+-----------+--------+----------+-------+
| backups | 0 | 0 | 5 |
| instances | 0 | 0 | 5 |
| volumes | 0 | 0 | 100 |
+-----------+--------+----------+-------+

MariaDB [(none)]> use trove

MariaDB [trove]> select * from quota_usages where tenant_id="errtenant";
+--------------------------------------+---------------------+---------------------+-----------+--------+----------+-----------+
| id | created | updated | tenant_id | in_use | reserved | resource |
+--------------------------------------+---------------------+---------------------+-----------+--------+----------+-----------+
| 8a22d0e5-142f-4e55-995f-c8751e1cbcbb | 2017-02-15 11:55:25 | 2017-02-15 11:55:25 | errtenant | 0 | 0 | backups |
| 4a306e8d-33a5-44d8-9906-14ccf4d225da | 2017-02-15 11:55:25 | 2017-02-15 11:55:25 | errtenant | 0 | 0 | instances |
| 790efe51-3d57-4970-8acb-65b07c046996 | 2017-02-15 11:55:25 | 2017-02-15 11:55:25 | errtenant | 0 | 0 | volumes |
+--------------------------------------+---------------------+---------------------+-----------+--------+----------+-----------+
3 rows in set (0.00 sec)

It should not modify quota_usages in MySQL.

Liu Yang (ly798)
Changed in trove:
assignee: nobody → Liu Yang (ly798)
status: New → In Progress
Liu Yang (ly798)
Changed in trove:
assignee: Liu Yang (ly798) → nobody
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Liu Yang (<email address hidden>) on branch: master
Review: https://review.openstack.org/434598

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.