Monday, April 28, 2014

CRITICAL glance [-] ValueError: Tables "migrate_version" have non utf8 collation, please make sure all tables are CHARSET=utf8


Ubuntu 14.04 - Openstack ICEHOUSE release

During the installation of Glance I ran into what seems to be a common problem with this release (supposedly fixed as well) in this release, which is when you run the below command to initialize the database for glance:

# su -s /bin/sh -c "glance-manage db_sync" glance

You receive the below output error.

CRITICAL glance [-] ValueError: Tables "migrate_version" have non utf8 collation, please make sure all tables are CHARSET=utf8

In order to resolve this one (assuming you have access to the mysql database directly) run the commands below.

# mysql -u root -p glance
mysql> alter table migrate_version convert to character set utf8 collate utf8_unicode_ci;
mysql> flush privileges;
mysql> quit
#

You should now be able to run the command below successfully to create the database for glance.

# su -s /bin/sh -c "glance-manage db_sync" glance


Bug ID: https://bugs.launchpad.net/glance/+bug/1279000

4 comments:

  1. Your solution works PERFECT !!!

    I struggled for a few hours with this error, according to the OpenStack wiki by the setting the following parameters:
    ####
    collation-server = utf8_general_ci
    init-connect = 'SET NAMES utf8'
    character-set-server = utf8
    ####
    on /etc/msql/my.cnf under [mysqld] session should eliminate the error but it doesn’t.. Again many thanks for putting this out here.


    ReplyDelete
  2. Saved my Day !!!!
    Thanks a Lot !!!!!!!!!

    ReplyDelete
  3. I ran into this issue too. Your post helped. Thanks

    ReplyDelete

 
© Bruce Martins
All rights reserved
Bloggerized by Free Blogger Templates
Instruction by Blog Teacher