quota_usages in_use value change incorrectly when delete a resizing instance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
wangpan |
Bug Description
reproduce steps in devstack:
1. create an instance with flavor m1.small using demo user
2. resize it from m1.small to m1.tiny
3. when the task_state of instance is 'resize_finish', delete it by demo user
4. query the nova db like below:
mysql> select * from quota_usages ;
+------
| created_at | updated_at | deleted_at | deleted | id | project_id | resource | in_use | reserved | until_refresh |
+------
| 2013-01-08 04:43:21 | 2013-01-15 07:32:20 | NULL | 0 | 1 | c0fb216d13cc46c
| 2013-01-08 04:43:21 | 2013-01-15 07:32:20 | NULL | 0 | 2 | c0fb216d13cc46c
| 2013-01-08 04:43:21 | 2013-01-15 07:32:20 | NULL | 0 | 3 | c0fb216d13cc46c
+------
this is a race condition issue, so it is probabilistic to reproduce it, but you can add a time.sleep(10) to nova/compute/
LOG.debug(
time.sleep(10)
self.network_
when you see the debug log during resize, you delete the instance, and this issue will occur almost every time.
the reason is that, when we delete an instance, we use instance[
Changed in nova: | |
milestone: | none → grizzly-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-3 → 2013.1 |
tags: | added: quotas |
Fix proposed to branch: master /review. openstack. org/19772
Review: https:/