Databases created before and after compacting migrations are different

Bug #1593175 reported by Michal Dulko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Critical
Sean McGinnis

Bug Description

Looks like there are differences in DBs created before and after review 324897. After excluding non-relevant differences:

 $ diff cinder.sql cinder-old.sql
 181,185c181,183
 < `volume_type_id` varchar(36) DEFAULT NULL,
 < `encryption_id` varchar(36) NOT NULL,
 < PRIMARY KEY (`encryption_id`),
 < KEY `volume_type_id` (`volume_type_id`),
 < CONSTRAINT `encryption_ibfk_1` FOREIGN KEY (`volume_type_id`) REFERENCES `volume_types` (`id`)
 ---
 > `volume_type_id` varchar(36) NOT NULL,
 > `encryption_id` varchar(36) NOT NULL DEFAULT '',
 > PRIMARY KEY (`encryption_id`)
 532c530
 < `volume_id` varchar(36) DEFAULT NULL,
 ---
 > `volume_id` varchar(36) NOT NULL,
 548c546
 < KEY `volume_id` (`volume_id`),
 ---
 > KEY `snapshots_volume_id_fkey` (`volume_id`),
 550,551c548,549
 < CONSTRAINT `snapshots_ibfk_1` FOREIGN KEY (`volume_id`) REFERENCES `volumes` (`id`),
 < CONSTRAINT `snapshots_ibfk_2` FOREIGN KEY (`cgsnapshot_id`) REFERENCES `cgsnapshots` (`id`)
 ---
 > CONSTRAINT `snapshots_ibfk_1` FOREIGN KEY (`cgsnapshot_id`) REFERENCES `cgsnapshots` (`id`),
 > CONSTRAINT `snapshots_volume_id_fkey` FOREIGN KEY (`volume_id`) REFERENCES `volumes` (`id`)
 746c744
 < KEY `volume_type_id` (`volume_type_id`),
 ---
 > KEY `volume_type_extra_specs_ibfk_1` (`volume_type_id`),

1. Additional index and constraint.
2. Difference in nullability of the column.
3. Difference in naming of a constraint.
4. Difference in naming of a constraint where same name indicates different constraint (oh!).
5. Difference in naming of a constraint.

I'm concerned the most about 3, 4, 5 - we will not have a reliable way of dropping these constraints in future migrations.

I think we should make an exception and merge fixes to that migration in particular.

Eric Harney (eharney)
Changed in cinder:
importance: Undecided → High
importance: High → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/330756

Changed in cinder:
assignee: nobody → Sean McGinnis (sean-mcginnis)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/330570
Reason: We have a fix (or very close to one) so I would rather not revert this whole thing.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/330756
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ad2e53891992adaab5a5963638f3af90cc30f9bd
Submitter: Jenkins
Branch: master

commit ad2e53891992adaab5a5963638f3af90cc30f9bd
Author: Sean McGinnis <email address hidden>
Date: Thu Jun 16 14:20:44 2016 -0500

    Correct DB modifications from compaction

    There were a few minor differences in the compacted DB schema
    causing problems in some situations. This changes some definitions
    missed in the initial migration compaction.

    Change-Id: I53451892732078e96b53d780d50f823802e5e03d
    Closes-Bug: #1593175

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 9.0.0.0b2

This issue was fixed in the openstack/cinder 9.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.