← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1265839] Re: duplicate index on block_device_mapping ('instance_uuid', 'device_name')

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => juno-3

-- 
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/1265839

Title:
  duplicate index on block_device_mapping ('instance_uuid',
  'device_name')

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  Due to an upgrade issue in Havana DB migration 186 there is now a
  duplicate index on the block_device_mapping ('instance_uuid',
  'device_name') column for MySQL. (does not affect PostgreSQL).

  DROP TABLE IF EXISTS `block_device_mapping`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `block_device_mapping` (
    `created_at` datetime DEFAULT NULL,
    `updated_at` datetime DEFAULT NULL,
    `deleted_at` datetime DEFAULT NULL,
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `device_name` varchar(255) DEFAULT NULL,
    `delete_on_termination` tinyint(1) DEFAULT NULL,
    `snapshot_id` varchar(36) DEFAULT NULL,
    `volume_id` varchar(36) DEFAULT NULL,
    `volume_size` int(11) DEFAULT NULL,
    `no_device` tinyint(1) DEFAULT NULL,
    `connection_info` mediumtext,
    `instance_uuid` varchar(36) DEFAULT NULL,
    `deleted` int(11) DEFAULT NULL,
    `source_type` varchar(255) DEFAULT NULL,
    `destination_type` varchar(255) DEFAULT NULL,
    `guest_format` varchar(255) DEFAULT NULL,
    `device_type` varchar(255) DEFAULT NULL,
    `disk_bus` varchar(255) DEFAULT NULL,
    `boot_index` int(11) DEFAULT NULL,
    `image_id` varchar(36) DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `snapshot_id` (`snapshot_id`),
    KEY `volume_id` (`volume_id`),
    KEY `block_device_mapping_instance_uuid_idx` (`instance_uuid`),
    KEY `block_device_mapping_instance_uuid_device_name_idx` (`instance_uuid`,`device_name`),
    KEY `block_device_mapping_instance_uuid_virtual_name_device_name_idx` (`instance_uuid`,`device_name`),
    KEY `block_device_mapping_instance_uuid_volume_id_idx` (`instance_uuid`,`volume_id`),
    CONSTRAINT `block_device_mapping_instance_uuid_fkey` FOREIGN KEY (`instance_uuid`) REFERENCES `instances` (`uuid`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;

  
  *** We should drop the block_device_mapping_instance_uuid_virtual_name_device_name_idx index for MySQL in IceHouse.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1265839/+subscriptions


References