[Bug 1279000] Fix merged to glance (master)

OpenStack Infra 1279000 at bugs.launchpad.net
Wed Aug 5 06:48:05 UTC 2015


Reviewed:  https://review.openstack.org/207297
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=e5d10c3c1b52b62ed685b98500fc4416964d0951
Submitter: Jenkins
Branch:    master

commit e5d10c3c1b52b62ed685b98500fc4416964d0951
Author: Sabari Kumar Murugesan <smurugesan at vmware.com>
Date:   Wed Jul 29 10:06:46 2015 -0700

    Fix existing migrations to create utf-8 tables for MySQL DB
    
    oslo.db mandates all tables should be created with utf-8 charset
    when using MySQL DB. We added an option (deprecated) to skip this
    sanity check and it was subsequently removed in Liberty.
    
    This patch fixes existing migration scripts to create tables with
    utf-8 charset. Since oslo.db does a sanity check before running
    the migrations, it's safe to assume that only new tables created
    since the previous migration will be affected.
    
    Closes-bug: #1279000
    
    Change-Id: Ia31dc9e5d4494d1b9633f916fa6e2704d33dffb0

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to glance in Ubuntu.
https://bugs.launchpad.net/bugs/1279000

Title:
  db migrate script to set charset=utf8 for all tables

Status in Glance:
  Fix Released
Status in OpenStack + Chef:
  Fix Released
Status in oslo-incubator:
  Fix Released
Status in glance package in Ubuntu:
  Fix Released
Status in glance source package in Trusty:
  Fix Released

Bug description:
  2014-02-11 17:42:15.495 26564 CRITICAL glance [-] ValueError: Tables "image_locations,image_members,image_properties,image_tags,images,migrate_version,task_info,tasks" have non utf8 collation, please make sure all tables are CHARSET=utf8
  2014-02-11 17:42:15.495 26564 TRACE glance Traceback (most recent call last):
  2014-02-11 17:42:15.495 26564 TRACE glance   File "/usr/local/csi/share/csi-glance.venv//bin/glance-manage", line 13, in <module>
  2014-02-11 17:42:15.495 26564 TRACE glance     sys.exit(main())
  2014-02-11 17:42:15.495 26564 TRACE glance   File "/usr/local/csi/share/csi-glance.venv/lib/python2.6/site-packages/glance/cmd/manage.py", line 220, in main
  2014-02-11 17:42:15.495 26564 TRACE glance     return CONF.command.action_fn()
  2014-02-11 17:42:15.495 26564 TRACE glance   File "/usr/local/csi/share/csi-glance.venv/lib/python2.6/site-packages/glance/cmd/manage.py", line 121, in sync
  2014-02-11 17:42:15.495 26564 TRACE glance     CONF.command.current_version)
  2014-02-11 17:42:15.495 26564 TRACE glance   File "/usr/local/csi/share/csi-glance.venv/lib/python2.6/site-packages/glance/cmd/manage.py", line 98, in sync
  2014-02-11 17:42:15.495 26564 TRACE glance     migration.db_sync(db_migration.MIGRATE_REPO_PATH, version)
  2014-02-11 17:42:15.495 26564 TRACE glance   File "/usr/local/csi/share/csi-glance.venv/lib/python2.6/site-packages/glance/openstack/common/db/sqlalchemy/migration.py", line 195, in db_sync
  2014-02-11 17:42:15.495 26564 TRACE glance     _db_schema_sanity_check()
  2014-02-11 17:42:15.495 26564 TRACE glance   File "/usr/local/csi/share/csi-glance.venv/lib/python2.6/site-packages/glance/openstack/common/db/sqlalchemy/migration.py", line 216, in _db_schema_sanity_check
  2014-02-11 17:42:15.495 26564 TRACE glance     ) % ','.join(table_names))
  2014-02-11 17:42:15.495 26564 TRACE glance ValueError: Tables "image_locations,image_members,image_properties,image_tags,images,migrate_version,task_info,tasks" have non utf8 collation, please make sure all tables are CHARSET=utf8
  2014-02-11 17:42:15.495 26564 TRACE glance

  glance-manage fail to come up with above error. It's like due to following commit in oslo wherein we enforce charset=utf8 for all tables.
  7aa94df Add a db check for CHARSET=utf8

  I think we should have a migration script to change the charset for
  all tables.

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



More information about the Ubuntu-openstack-bugs mailing list