Comment 5 for bug 1202896

Revision history for this message
Sam Morrison (sorrison) wrote : Re: quota_usage data constantly out of sync

Here's an example of a user who is experiencing this issue:

<pre>
mysql> select * from reservations where project_id ='cda9642942d24b7cab4bf1d56f61b5e7';
+---------------------+------------+---------------------+--------+--------------------------------------+----------+----------------------------------+-----------------+-------+---------------------+---------+
| created_at | updated_at | deleted_at | id | uuid | usage_id | project_id | resource | delta | expire | deleted |
+---------------------+------------+---------------------+--------+--------------------------------------+----------+----------------------------------+-----------------+-------+---------------------+---------+
| 2013-07-31 05:36:38 | NULL | 2013-07-31 05:36:39 | 523281 | b1cbdb12-88a6-4601-8b86-5228f31d1ef2 | 4578 | cda9642942d24b7cab4bf1d56f61b5e7 | security_groups | 1 | 2013-08-01 05:36:38 | 523281 |
| 2013-07-31 05:36:41 | NULL | 2013-07-31 05:36:42 | 523284 | 5119268c-1ca4-486b-b173-41f18c166880 | 4578 | cda9642942d24b7cab4bf1d56f61b5e7 | security_groups | 1 | 2013-08-01 05:36:41 | 523284 |
| 2013-07-31 05:36:43 | NULL | 2013-07-31 05:36:44 | 523287 | cfb61f29-f609-4165-b929-773334809869 | 4578 | cda9642942d24b7cab4bf1d56f61b5e7 | security_groups | 1 | 2013-08-01 05:36:43 | 523287 |
| 2013-07-31 05:41:12 | NULL | NULL | 523461 | ae97502d-ec53-46e2-aa9b-3ab17ad5bd23 | 4581 | cda9642942d24b7cab4bf1d56f61b5e7 | instances | 1 | 2013-08-01 05:41:12 | 0 |
| 2013-07-31 05:41:12 | NULL | NULL | 523464 | 34845c5c-2281-4177-bb8b-a78f71499d5d | 4584 | cda9642942d24b7cab4bf1d56f61b5e7 | ram | 8192 | 2013-08-01 05:41:12 | 0 |
| 2013-07-31 05:41:12 | NULL | NULL | 523467 | 86da791d-0adb-4c1f-ae60-5368f813552a | 4587 | cda9642942d24b7cab4bf1d56f61b5e7 | cores | 2 | 2013-08-01 05:41:12 | 0 |
| 2013-07-31 05:48:45 | NULL | 2013-07-31 05:48:45 | 523812 | f21a32c3-dfdc-4d1e-9ca2-0129200975e3 | 4581 | cda9642942d24b7cab4bf1d56f61b5e7 | instances | -1 | 2013-08-01 05:48:44 | 523812 |
| 2013-07-31 05:48:45 | NULL | 2013-07-31 05:48:45 | 523815 | 277d3c09-8b47-4add-87f3-56230c94be3c | 4584 | cda9642942d24b7cab4bf1d56f61b5e7 | ram | -8192 | 2013-08-01 05:48:44 | 523815 |
| 2013-07-31 05:48:45 | NULL | 2013-07-31 05:48:45 | 523818 | efb33b21-de55-4c42-abbb-7ab423a94d45 | 4587 | cda9642942d24b7cab4bf1d56f61b5e7 | cores | -2 | 2013-08-01 05:48:44 | 523818 |
+---------------------+------------+---------------------+--------+--------------------------------------+----------+----------------------------------+-----------------+-------+---------------------+---------+
9 rows in set (0.01 sec)

mysql> select * from quota_usages where project_id = 'cda9642942d24b7cab4bf1d56f61b5e7';
+---------------------+---------------------+------------+------+----------------------------------+-----------------+--------+----------+---------------+---------+
| created_at | updated_at | deleted_at | id | project_id | resource | in_use | reserved | until_refresh | deleted |
+---------------------+---------------------+------------+------+----------------------------------+-----------------+--------+----------+---------------+---------+
| 2013-07-31 05:36:38 | 2013-07-31 05:36:44 | NULL | 4578 | cda9642942d24b7cab4bf1d56f61b5e7 | security_groups | 3 | 0 | 3 | 0 |
| 2013-07-31 05:41:12 | 2013-07-31 05:51:06 | NULL | 4581 | cda9642942d24b7cab4bf1d56f61b5e7 | instances | 0 | 1 | 5 | 0 |
| 2013-07-31 05:41:12 | 2013-07-31 05:51:06 | NULL | 4584 | cda9642942d24b7cab4bf1d56f61b5e7 | ram | 0 | 8192 | 5 | 0 |
| 2013-07-31 05:41:12 | 2013-07-31 05:51:06 | NULL | 4587 | cda9642942d24b7cab4bf1d56f61b5e7 | cores | 0 | 2 | 5 | 0 |
+---------------------+---------------------+------------+------+----------------------------------+-----------------+--------+----------+---------------+---------+
4 rows in set (0.01 sec)

</pre>

I'm not all that familiar with reservations but it looks as if the reservation hasn't been cleaned up properly?

Note we actually usually see the in_use values of the quota_usages table out of sync so this may be a slightly different issue