yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #62247
[Bug 1670627] Fix merged to nova (master)
Reviewed: https://review.openstack.org/443395
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=018068c4caac324643c7c6a4360fad855dd096eb
Submitter: Jenkins
Branch: master
commit 018068c4caac324643c7c6a4360fad855dd096eb
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date: Wed Mar 8 21:51:07 2017 -0500
Decrement quota usage when deleting an instance in cell0
When we fail to schedule an instance, e.g. there are no hosts
available, conductor creates the instance in the cell0 database
and deletes the build request. At this point quota usage
has been incremented in the main 'nova' database.
When the instance is deleted, the build request is already gone
so _delete_while_booting returns False and we lookup the instance
in cell0 and delete it from there, but that flow wasn't decrementing
quota usage like _delete_while_booting was.
This change adds the same quota usage decrement handling that
_delete_while_booting performs.
Change-Id: I4cb0169ce0de537804ab9129bc671d75ce5f7953
Partial-Bug: #1670627
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1670627
Title:
quota is always in-use after delete the ERROR instances
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) ocata series:
Confirmed
Bug description:
1. stop nova-compute
2. boot an instance
3. the instance is in ERROR
4. delete the instance
5. repeat 1-4 for several times(actually, I create the instance by heat, heat will retry to create the instance 5 times by default and will delete the error instance before every retrying)
6. I can't boot instance after nova-compute back, the reason is "Quota exceeded for instances: Requested 1, but already used 10 of 10 instances"
7. but in fact, there is no instance return by cmd nova-list
8. I find that the quota is still in-use, see table 'quota_usages':
mysql> select *from quota_usages;
+---------------------+---------------------+------------+----+----------------------------------+-----------+--------+----------+---------------+---------+----------------------------------+
| created_at | updated_at | deleted_at | id | project_id | resource | in_use | reserved | until_refresh | deleted | user_id |
+---------------------+---------------------+------------+----+----------------------------------+-----------+--------+----------+---------------+---------+----------------------------------+
| 2017-03-07 06:26:08 | 2017-03-07 08:48:09 | NULL | 1 | 2b623ba1dddc476cbb7728a944d539c5 | instances | 10 | 0 | NULL | 0 | 8d57d7a267b54992b382a6607ecd700a |
| 2017-03-07 06:26:08 | 2017-03-07 08:48:09 | NULL | 2 | 2b623ba1dddc476cbb7728a944d539c5 | ram | 5120 | 0 | NULL | 0 | 8d57d7a267b54992b382a6607ecd700a |
| 2017-03-07 06:26:08 | 2017-03-07 08:48:09 | NULL | 3 | 2b623ba1dddc476cbb7728a944d539c5 | cores | 10 | 0 | NULL | 0 | 8d57d7a267b54992b382a6607ecd700a |
| 2017-03-07 09:17:37 | 2017-03-07 09:35:14 | NULL | 4 | 12bdc74d666d4f7687c0172a003f190d | instances | 13 | 0 | NULL | 0 | 98887477e65e43f383f8a9ec732a3eae |
| 2017-03-07 09:17:37 | 2017-03-07 09:35:14 | NULL | 5 | 12bdc74d666d4f7687c0172a003f190d | ram | 6656 | 0 | NULL | 0 | 98887477e65e43f383f8a9ec732a3eae |
| 2017-03-07 09:17:37 | 2017-03-07 09:35:14 | NULL | 6 | 12bdc74d666d4f7687c0172a003f190d | cores | 13 | 0 | NULL | 0 | 98887477e65e43f383f8a9ec732a3eae |
+---------------------+---------------------+------------+----+----------------------------------+-----------+--------+----------+---------------+---------+----------------------------------+
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1670627/+subscriptions
References