Migration 22->23 failing on MyISAM

Bug #1189633 reported by Joshua Harlow on 2013-06-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
High
Adam Young

Bug Description

Appears we have a migration failure/missing piece.

-bash-4.1$ rpm -qa | grep -i mysql-server
mysql-server-5.1.69-1.el6_4.x86_64

-bash-4.1$ lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.2 (Santiago)
Release: 6.2
Codename: Santiago

-bash-4.1$ /usr/bin/keystone-manage --config-file=/home/harlowja/openstack/keystone/config/keystone.conf --debug -v db_sync
2013-06-10 21:07:03 DEBUG [migrate.versioning.util] Constructing engine
2013-06-10 21:07:03 DEBUG [migrate.versioning.repository] Loading repository /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/001_add_initial_tables.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/001_add_initial_tables.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_token_id_hash.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_token_id_hash.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_sqlite_downgrade.sql...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_sqlite_downgrade.sql loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_sqlite_upgrade.sql...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_sqlite_upgrade.sql loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/003_sqlite_upgrade.sql...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/003_sqlite_upgrade.sql loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/003_token_valid.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/003_token_valid.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/004_undo_token_id_hash.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/004_undo_token_id_hash.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/005_set_utf8_character_set.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/005_set_utf8_character_set.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/006_add_policy_table.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/006_add_policy_table.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/007_add_domain_tables.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/007_add_domain_tables.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/008_create_default_domain.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/008_create_default_domain.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/009_normalize_identity.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/009_normalize_identity.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/010_normalize_identity_migration.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/010_normalize_identity_migration.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/011_endpoints_v3.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/011_endpoints_v3.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/012_populate_endpoint_type.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/012_populate_endpoint_type.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/013_drop_legacy_endpoints.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/013_drop_legacy_endpoints.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/014_add_group_tables.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/014_add_group_tables.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/015_tenant_to_project.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/015_tenant_to_project.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/017_membership_role.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/017_membership_role.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/018_add_trust_tables.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/018_add_trust_tables.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/019_fixup_role.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/019_fixup_role.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/020_migrate_metadata_table_roles.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/020_migrate_metadata_table_roles.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/021_add_trust_to_token.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/021_add_trust_to_token.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/022_move_legacy_endpoint_id.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/022_move_legacy_endpoint_id.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/023_drop_credential_constraints.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/023_drop_credential_constraints.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/024_add_index_to_expires.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/024_add_index_to_expires.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/025_add_index_to_valid.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/025_add_index_to_valid.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.repository] Repository /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.repository] Config: {'db_settings': {'__name__': 'db_settings', 'use_timestamp_numbering': 'False', 'required_dbs': '[]', 'version_table': 'migrate_version', 'repository_id': 'keystone'}}
2013-06-10 21:07:03 DEBUG [migrate.versioning.util] Disposing SQLAlchemy engine Engine(mysql://root:f9ddd77928daeb71fd20@localhost:3306/keystone?charset=utf8)
2013-06-10 21:07:03 DEBUG [migrate.versioning.util] Constructing engine
2013-06-10 21:07:03 DEBUG [migrate.versioning.repository] Loading repository /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/001_add_initial_tables.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/001_add_initial_tables.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_token_id_hash.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_token_id_hash.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_sqlite_downgrade.sql...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_sqlite_downgrade.sql loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_sqlite_upgrade.sql...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/002_sqlite_upgrade.sql loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/003_sqlite_upgrade.sql...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/003_sqlite_upgrade.sql loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/003_token_valid.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/003_token_valid.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/004_undo_token_id_hash.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/004_undo_token_id_hash.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/005_set_utf8_character_set.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/005_set_utf8_character_set.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/006_add_policy_table.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/006_add_policy_table.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/007_add_domain_tables.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/007_add_domain_tables.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/008_create_default_domain.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/008_create_default_domain.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/009_normalize_identity.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/009_normalize_identity.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/010_normalize_identity_migration.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/010_normalize_identity_migration.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/011_endpoints_v3.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/011_endpoints_v3.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/012_populate_endpoint_type.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/012_populate_endpoint_type.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/013_drop_legacy_endpoints.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/013_drop_legacy_endpoints.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/014_add_group_tables.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/014_add_group_tables.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/015_tenant_to_project.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/015_tenant_to_project.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/017_membership_role.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/017_membership_role.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/018_add_trust_tables.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/018_add_trust_tables.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/019_fixup_role.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/019_fixup_role.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/020_migrate_metadata_table_roles.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/020_migrate_metadata_table_roles.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/021_add_trust_to_token.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/021_add_trust_to_token.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/022_move_legacy_endpoint_id.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/022_move_legacy_endpoint_id.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/023_drop_credential_constraints.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/023_drop_credential_constraints.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/024_add_index_to_expires.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/024_add_index_to_expires.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Loading script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/025_add_index_to_valid.py...
2013-06-10 21:07:03 DEBUG [migrate.versioning.script.base] Script /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/025_add_index_to_valid.py loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.repository] Repository /usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo loaded successfully
2013-06-10 21:07:03 DEBUG [migrate.versioning.repository] Config: {'db_settings': {'__name__': 'db_settings', 'use_timestamp_numbering': 'False', 'required_dbs': '[]', 'version_table': 'migrate_version', 'repository_id': 'keystone'}}
2013-06-10 21:07:03 INFO [migrate.versioning.api] 22 -> 23...
2013-06-10 21:07:03 DEBUG [migrate.versioning.util] Disposing SQLAlchemy engine Engine(mysql://root:f9ddd77928daeb71fd20@localhost:3306/keystone?charset=utf8)
Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 30, in <module>
    cli.main(argv=sys.argv, config_files=config_files)
  File "/usr/lib/python2.6/site-packages/keystone/cli.py", line 235, in main
    CONF.command.cmd_class.main()
  File "/usr/lib/python2.6/site-packages/keystone/cli.py", line 67, in main
    driver.db_sync(CONF.command.version)
  File "/usr/lib/python2.6/site-packages/keystone/identity/backends/sql.py", line 142, in db_sync
    migration.db_sync(version=version)
  File "/usr/lib/python2.6/site-packages/keystone/common/sql/migration.py", line 52, in db_sync
    return versioning_api.upgrade(CONF.sql.connection, repo_path, version)
  File "/usr/lib/python2.6/site-packages/migrate/versioning/api.py", line 186, in upgrade
    return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/usr/lib/python2.6/site-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
    return f(*a, **kw)
  File "/usr/lib/python2.6/site-packages/migrate/versioning/api.py", line 366, in _migrate
    schema.runchange(ver, change, changeset.step)
  File "/usr/lib/python2.6/site-packages/migrate/versioning/schema.py", line 91, in runchange
    change.run(self.engine, step)
  File "/usr/lib/python2.6/site-packages/migrate/versioning/script/py.py", line 145, in run
    script_func(engine)
  File "/usr/lib/python2.6/site-packages/keystone/common/sql/migrate_repo/versions/023_drop_credential_constraints.py", line 43, in upgrade
    migration_helpers.remove_constraints(list_constraints(migrate_engine))
  File "/usr/lib/python2.6/site-packages/keystone/common/sql/migration_helpers.py", line 50, in remove_constraints
    constraint_def['fk_column']))).drop()
  File "/usr/lib/python2.6/site-packages/keystone/common/sql/migration_helpers.py", line 30, in get_fkey_constraint_name
    constraint_name = fkeys[0].name
IndexError: list index out of range

Joshua Harlow (harlowja) on 2013-06-10
description: updated
Dolph Mathews (dolph) on 2013-06-10
Changed in keystone:
status: New → Triaged
importance: Undecided → High
Dolph Mathews (dolph) wrote :

I suspect this migration should be skipped if MyISAM is in use, as it doesn't appear to support FK's as of MySQL 5.6:

  http://dev.mysql.com/doc/refman/5.6/en/ansi-diff-foreign-keys.html

summary: - Migration 22->23 failing
+ Migration 22->23 failing on MyISAM
Dolph Mathews (dolph) wrote :

This was introduced by the fix for bug 1186353

Brant Knudson (blk-u) wrote :

Here's another bit of evidence, this is pre-migration 23:

# mysql -ukeystone -pkeystone -e "show create table credential;" keystone

| credential | CREATE TABLE `credential` (
  `id` varchar(64) NOT NULL,
  `user_id` varchar(64) NOT NULL,
  `project_id` varchar(64) DEFAULT NULL,
  `blob` text NOT NULL,
  `type` varchar(255) NOT NULL,
  `extra` text,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `project_id` (`project_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 |

Whereas on a system with InnoDB:

| credential | CREATE TABLE `credential` (
  `id` varchar(64) NOT NULL,
  `user_id` varchar(64) NOT NULL,
  `project_id` varchar(64) DEFAULT NULL,
  `blob` text NOT NULL,
  `type` varchar(255) NOT NULL,
  `extra` text,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `project_id` (`project_id`),
  CONSTRAINT `credential_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`),
  CONSTRAINT `credential_ibfk_2` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |

Dolph Mathews (dolph) wrote :

Discussed this issue in IRC with mordred and bkhudson, and am considering the following approach:

- Mark this bug as Won't Fix
- Specify engine=innodb wherever applicable to avoid picking up mysql's default (MyISAM on RHEL)
- Create a blurb in docs explaining use of InnoDB

Dolph Mathews (dolph) wrote :

<mordred>: nova is explicitly setting the mysql_engine='InnoDB' flag on all sqlalchemy table creates
BobBall is now known as Guest22311
mordred
<mordred>: and also have a unittest in nova/tests/db/test_migrations.py (line 327) which actually tests that no tables were created as non-innodb

Dolph Mathews (dolph) wrote :

Marking as Won't Fix (mostly as as a formality) with the core issue fixed as described in comment #4 as part of bug 1191110.

Changed in keystone:
status: Triaged → Won't Fix
Changed in keystone:
assignee: nobody → Adam Young (ayoung)
status: Won't Fix → In Progress

Reviewed: https://review.openstack.org/32510
Committed: http://github.com/openstack/keystone/commit/eb1b5eaac61c8f8199d3d54c300c3730bdb4667a
Submitter: Jenkins
Branch: master

commit eb1b5eaac61c8f8199d3d54c300c3730bdb4667a
Author: Adam Young <email address hidden>
Date: Mon Jun 10 20:39:34 2013 -0400

    check for constraint before dropping

    Bug 1189633

    Change-Id: Ieff57d17f224ec31523bfcce288818a08d64f98a

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-07-17
Changed in keystone:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in keystone:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers