[Openstack] Grizzly -> Havana nova upgrade failure: Cannot drop index 'instance_uuid'

Joshua Hesketh joshua.hesketh at rackspace.com
Tue Oct 29 23:04:47 UTC 2013


Hi Blair,

So from your dump a few weeks ago you have both fkeys 
'instance_info_caches_ibfk_1' and 
'instance_info_caches_instance_uuid_fkey'? Yet your original bug report 
only lists the former key. Was the original bug report after attempting 
to run migration 185 and failing (ie, no rollback)? If so I suspect 
migration 185 dropped the 'instance_info_caches_instance_uuid_fkey' fkey 
before failing. Perhaps the patch needs to check if either or exist.

Similar question, was the dump you have just shown now after 185 failed 
with my patch? That would also be why you can't see the old fkey.

Thanks,
Josh

Rackspace Australia

On 10/29/13 3:50 PM, Blair Zajac wrote:
> On 10/28/13 6:17 PM, Joshua Hesketh wrote:
>> Hi guys,
>>
>> I have a patch in the works against this that will hopefully fix your 
>> problems:
>> https://review.openstack.org/#/c/54212/
>>
>> One of the gotchas though will be if you have already ran migration 
>> 185 you
>> can't run it again (even if it failed because it'll try and do 
>> operations that
>> it got part way through before).
>>
>> Once the patch is merged you may have to restore your database to a 
>> previous and
>> run the upgrade again.
>
> Hi Josh,
>
> Thanks for the patch.  I went back to a mysqldump from a week ago and 
> loaded it into MySQL and dropped the new 
> shadow_security_group_default_rules table. However, I'm getting the 
> same failure, even though that constraint is gone:
>
> mysql> show create table instance_info_caches \G
> *************************** 1. row ***************************
>        Table: instance_info_caches
> Create Table: CREATE TABLE `instance_info_caches` (
>   `created_at` datetime DEFAULT NULL,
>   `updated_at` datetime DEFAULT NULL,
>   `deleted_at` datetime DEFAULT NULL,
>   `id` int(11) NOT NULL AUTO_INCREMENT,
>   `network_info` mediumtext,
>   `instance_uuid` varchar(36) NOT NULL,
>   `deleted` int(11) DEFAULT NULL,
>   PRIMARY KEY (`id`),
>   UNIQUE KEY `instance_uuid` (`instance_uuid`),
>   CONSTRAINT `instance_info_caches_instance_uuid_fkey` FOREIGN KEY 
> (`instance_uuid`) REFERENCES `instances` (`uuid`)
> ) ENGINE=InnoDB AUTO_INCREMENT=202 DEFAULT CHARSET=utf8
>
>
> mysql> alter table instance_info_caches drop index instance_uuid;
> ERROR 1553 (HY000): Cannot drop index 'instance_uuid': needed in a 
> foreign key constraint
>
>
> Looking at my dump from a week ago, it appears there's two identical 
> constraints with different names:
>
>
>   CONSTRAINT `instance_info_caches_ibfk_1` FOREIGN KEY 
> (`instance_uuid`) REFERENCES `instances` (`uuid`),
>   CONSTRAINT `instance_info_caches_instance_uuid_fkey` FOREIGN KEY 
> (`instance_uuid`) REFERENCES `instances` (`uuid`)
>
>
> Blair
>





More information about the Openstack mailing list