** Changed in: nova/havana Status: Fix Committed => 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/1245746
Title: Grizzly to Havana Upgrade wipes out Nova quota_usages table Status in OpenStack Compute (Nova): Incomplete Status in OpenStack Compute (nova) havana series: Fix Released Bug description: In grizzly, there is no user_id in quota_usages table, and the database with quota usages table is like this: mysql> select * from quota_usages; +---------------------+---------------------+------------+----+----------------------------------+-----------+--------+----------+---------------+---------+ | created_at | updated_at | deleted_at | id | project_id | resource | in_use | reserved | until_refresh | deleted | +---------------------+---------------------+------------+----+----------------------------------+-----------+--------+----------+---------------+---------+ | 2013-10-29 03:03:05 | 2013-10-29 03:19:30 | NULL | 1 | 9cb04bffbe784771bd28fa093d749804 | instances | 1 | 0 | NULL | 0 | | 2013-10-29 03:03:05 | 2013-10-29 03:19:30 | NULL | 2 | 9cb04bffbe784771bd28fa093d749804 | ram | 512 | 0 | NULL | 0 | | 2013-10-29 03:03:05 | 2013-10-29 03:19:30 | NULL | 3 | 9cb04bffbe784771bd28fa093d749804 | cores | 1 | 0 | NULL | 0 | +---------------------+---------------------+------------+----+----------------------------------+-----------+--------+----------+---------------+---------+ The problem can be recreated througth the following steps: 1. In upgrade from Grizzly to Havana, migration script 203_make_user_quotas_key_and_value.py adds 'user_id' column to quota_usages table and its shadow table. 2. Migration script 216_sync_quota_usages.py willl delete all the any instances/cores/ram/etc quota_usages without a user_id by delete_null_rows. Since this is a Grizzly to Havana upgrade, and there is no user_id colume in Grizzly ( user_id is added by 203_make_user_quotas_key_and_value.py in Havana), all the instances/cores/ram/etc resources in quota_usages will be deleted. 3. Then script 216_sync_quota_usages.py will try to add new quota_usages entrance based on a query of resources left on the table. Remember from step 2, they are already deleted, therefore there will be no quota entry inserted or updated. The result is the quota_usage entry from Grizzly are wiped out during upgrade to Havana. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1245746/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp