← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1301036] Re: openstack.common.db.sqlalchemy.migration utf8 table check issue on initial migration

 

Reviewed:  https://review.openstack.org/84870
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=c15fac2b9a074de2d81b67b857bab38f1b1e3fb3
Submitter: Jenkins
Branch:    milestone-proposed

commit c15fac2b9a074de2d81b67b857bab38f1b1e3fb3
Author: Morgan Fainberg <m@xxxxxxxxxxxxx>
Date:   Wed Apr 2 14:10:12 2014 -0700

    Sync from oslo db.sqlalchemy.migration
    
    Sync the updated migration module to prevent errors on non-utf8
    migrate_version and alembic_version tables (not controlled by the
    schema migration directory).
    
    Change from oslo commits:
    [2fd457bf2cc] Ignore migrate versioning tables in utf8 sanity check
    
    Change-Id: I6aef126b8d09c7a44f3815c4143ef1d4e5463426
    Closes-Bug: #1301036


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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1301036

Title:
  openstack.common.db.sqlalchemy.migration utf8 table check issue on
  initial migration

Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released
Status in Orchestration API (Heat):
  New
Status in Ironic (Bare Metal Provisioning):
  Invalid
Status in OpenStack Identity (Keystone):
  Fix Released
Status in Oslo - a Library of Common OpenStack Code:
  In Progress
Status in “keystone” package in Ubuntu:
  Triaged
Status in “keystone” source package in Trusty:
  Triaged

Bug description:
  The code in openstack.common.db.sqlachemy.migration that does the
  sanity checking on the UTF8 table is a bit overzealous and checks the
  migration_version (and alembic equivalent) table for utf8 status. This
  will cause migrations to fail in any case where the db isn't forcing a
  default character set of utf8, the db engine isn't forced to utf8, or
  the migration_version table isn't fixed before migrations occur.

  This was duplicated by doing a clean Ubuntu 12.04 install with mysql,
  using the default latin1 character set and simply creating the DB with
  ``create database keystone;``

  The result is migrations fail at migration 0 unless the db sanity
  check is disabled (e.g. glance).

  root@precise64:~/keystone# keystone-manage --config-file /etc/keystone.conf db_sync
  2014-04-01 14:03:23.858 19840 CRITICAL keystone [-] ValueError: Tables "migrate_version" have non utf8 collation, please make sure all tables are CHARSET=utf8

  This is unaffected by the character set in the connection string.

  The solution is to explicitly ignore the migrate_version (and alembic
  equivalent) table in the sanity check.

  Code in question is here:

  http://git.openstack.org/cgit/openstack/keystone/tree/keystone/openstack/common/db/sqlalchemy/migration.py?id=51772e1addf8ab6f7483df44b7243fd7842eba4a#n200

  This will affect any project using this code for migrations when using
  the mysql engine.

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


References