Description of problem: Upgrading from Grizzly to Havana fails when trying to run cinder's database migrations. Version-Release number of selected component (if applicable): Starting with: 2013.1.3-1.el6 Upgrading to: 2013.2.0.8.b3.el6 How reproducible: Always Steps to Reproduce: 1. Install 2013.1.3-1 2. Start cinder 3. Stop cinder 4. Install 2013.2.0.8.b3 4. Run "cinder-manage db sync" Actual results: [root@test1 test_rdo_upgrade(keystone_admin)]# cinder-manage db sync 2013-09-19 11:41:56.954 556 ERROR 010_add_transfers_table [-] Table |Table('transfers', MetaData(bind=Engine(mysql://cinder:7f6a941a6b2348a2.101.6/cinder)), Column('created_at', DateTime(), table=<transfers>), Column('updated_at', DateTime(), table=<transfers>), Column('deleted_at', DateTime(), table=<transfers>), Column('deleted', Boolean(), table=<transfers>), Column('id', String(length=36), table=<transfers>, primary_key=True, nullable=False), Column('volume_id', String(length=36), ForeignKey('volumes.id'), table=<transfers>, nullable=False), Column('display_name', String(length=255), table=<transfers>), Column('salt', String(length=255), table=<transfers>), Column('crypt_hash', String(length=255), table=<transfers>), Column('expires_at', DateTime(), table=<transfers>), schema=None)| not created! 2013-09-19 11:41:56.955 556 CRITICAL cinder [-] (OperationalError) (1005, "Can't create table 'cinder.transfers' (errno: 150)") '\nCREATE TABLE transfers (\n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tdeleted_at DATETIME, \n\tdeleted BOOL, \n\tid VARCHAR(36) NOT NULL, \n\tvolume_id VARCHAR(36) NOT NULL, \n\tdisplay_name VARCHAR(255), \n\tsalt VARCHAR(255), \n\tcrypt_hash VARCHAR(255), \n\texpires_at DATETIME, \n\tPRIMARY KEY (id), \n\tCHECK (deleted IN (0, 1)), \n\tFOREIGN KEY(volume_id) REFERENCES volumes (id)\n)ENGINE=InnoDB\n\n' () Expected results: cinder-manage upgrades database schema properly. Additional info: Reproducible starting from a clean EL6 system with: https://github.com/kk7ds/test_rdo_upgrade
For easier copying, here's the failing SQL statement: CREATE TABLE transfers ( created_at DATETIME, updated_at DATETIME, deleted_at DATETIME, deleted BOOL, id VARCHAR(36) NOT NULL, volume_id VARCHAR(36) NOT NULL, display_name VARCHAR(255), salt VARCHAR(255), crypt_hash VARCHAR(255), expires_at DATETIME, PRIMARY KEY (id), CHECK (deleted IN (0, 1)), FOREIGN KEY(volume_id) REFERENCES volumes (id) )ENGINE=InnoDB; I think it must have something to do with constraints required for the Foreign Key relationship that aren't happy, but I'm not sure exactly.
Possible explanation: https://bugs.launchpad.net/cinder/+bug/1233861
Refers to EOL'ed versions that are no longer maintained.