[Openstack-docs] MySQL and UTF-8

Joe Topjian joe at topjian.net
Sun Mar 23 15:47:37 UTC 2014


This discussion went off-list while I asked Matt and Phil some follow-up
questions. Looping -docs back in as a solution has been found.

I was using a mix of both utf8_unicode_ci and utf8_general_ci. Both the
MySQL server and the Cinder database itself *must* be configured only for
utf8_general_ci. A mix of both or using just utf8_unicode_ci will not work.


On Sat, Mar 22, 2014 at 6:18 PM, Phil Hopkins <phil.hopkins at rackspace.com>wrote:

>  I was able to get it to run on both RHEL and ubuntu.
>
>  Phil
>
> Sent from my iPhone
>
> On Mar 22, 2014, at 7:00 PM, "Matt Kassawara" <mkassawara at gmail.com>
> wrote:
>
>   The Cinder db sync works for me on Ubuntu Icehouse milestone 3 with a
> fresh database:
>
>  root at hst-osctl6:/etc/cinder# cinder-manage db sync
> 2014-03-22 17:53:47.878 14209 INFO migrate.versioning.api [-] 0 -> 1...
> 2014-03-22 17:53:48.078 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.078 14209 INFO migrate.versioning.api [-] 1 -> 2...
> 2014-03-22 17:53:48.336 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.337 14209 INFO migrate.versioning.api [-] 2 -> 3...
> 2014-03-22 17:53:48.349 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.349 14209 INFO migrate.versioning.api [-] 3 -> 4...
> 2014-03-22 17:53:48.392 14209 INFO 004_volume_type_to_uuid [-] Created
> foreign key volume_type_extra_specs_ibfk_1
> 2014-03-22 17:53:48.395 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.395 14209 INFO migrate.versioning.api [-] 4 -> 5...
> 2014-03-22 17:53:48.410 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.410 14209 INFO migrate.versioning.api [-] 5 -> 6...
> 2014-03-22 17:53:48.423 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.423 14209 INFO migrate.versioning.api [-] 6 -> 7...
> 2014-03-22 17:53:48.437 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.438 14209 INFO migrate.versioning.api [-] 7 -> 8...
> 2014-03-22 17:53:48.449 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.449 14209 INFO migrate.versioning.api [-] 8 -> 9...
> 2014-03-22 17:53:48.463 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.464 14209 INFO migrate.versioning.api [-] 9 -> 10...
> 2014-03-22 17:53:48.481 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.482 14209 INFO migrate.versioning.api [-] 10 -> 11...
> 2014-03-22 17:53:48.507 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.507 14209 INFO migrate.versioning.api [-] 11 -> 12...
> 2014-03-22 17:53:48.524 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.524 14209 INFO migrate.versioning.api [-] 12 -> 13...
> 2014-03-22 17:53:48.542 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.543 14209 INFO migrate.versioning.api [-] 13 -> 14...
> 2014-03-22 17:53:48.561 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.561 14209 INFO migrate.versioning.api [-] 14 -> 15...
> 2014-03-22 17:53:48.571 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.571 14209 INFO migrate.versioning.api [-] 15 -> 16...
> 2014-03-22 17:53:48.594 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.595 14209 INFO migrate.versioning.api [-] 16 -> 17...
> 2014-03-22 17:53:48.636 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.637 14209 INFO migrate.versioning.api [-] 17 -> 18...
> 2014-03-22 17:53:48.662 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.662 14209 INFO migrate.versioning.api [-] 18 -> 19...
> 2014-03-22 17:53:48.679 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.680 14209 INFO migrate.versioning.api [-] 19 -> 20...
> 2014-03-22 17:53:48.695 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.695 14209 INFO migrate.versioning.api [-] 20 -> 21...
> 2014-03-22 17:53:48.707 14209 INFO 021_add_default_quota_class [-] Added
> default quota class data into the DB.
> 2014-03-22 17:53:48.711 14209 INFO migrate.versioning.api [-] done
> 2014-03-22 17:53:48.711 14209 INFO migrate.versioning.api [-] 21 -> 22...
> 2014-03-22 17:53:48.725 14209 INFO migrate.versioning.api [-] done
>
>
>
> On Sat, Mar 22, 2014 at 5:28 PM, Joe Topjian <joe at topjian.net> wrote:
>
>> Hello,
>>
>>  I saw the note about MySQL and UTF-8 in Anne's "What's Up Doc?" email.
>> I'm coincidentally setting up a new OpenStack cloud and am running into an
>> issue related to this.
>>
>>  Matt, with reference to your patch<https://review.openstack.org/#/c/80799/>,
>> can you confirm that you were able to run "cinder-manage db sync" without
>> error?
>>
>>  When I run this command, it fails on both:
>>
>>
>> /usr/lib/python2.7/dist-packages/cinder/db/sqlalchemy/migrate_repo/versions/003_glance_metadata.py
>>
>>  and
>>
>>  009_add_snapshot_metadata_table.py
>>
>>  I have to add:
>>
>>  mysql_charset='utf8'
>>
>>  below
>>
>>  mysql_engine='InnoDB'
>>
>>  for both files in order for the db sync command to work without error.
>>
>>  This is with Havana, but I checked both<https://github.com/openstack/cinder/blob/master/cinder/db/sqlalchemy/migrate_repo/versions/003_glance_metadata.py>
>> py<https://github.com/openstack/cinder/blob/master/cinder/db/sqlalchemy/migrate_repo/versions/009_add_snapshot_metadata_table.py>files in HEAD and they haven't changed, so I'm assuming I'll run into the
>> same issue in Icehouse.
>>
>>  I also see that other files<https://github.com/openstack/cinder/tree/master/cinder/db/sqlalchemy/migrate_repo/versions>already have the "mysql_charset" setting in place, and I also see a similar
>> bug <https://bugs.launchpad.net/cinder/+bug/1233861> opened for another
>> migrate file. Perhaps 003 and 009 also need bugs opened?
>>
>>  Let me know if you are not running into this issue and I'll repost this
>> question to one of the other OpenStack lists for bug confirmation. I
>> figured I'd post here first to see if we can work out the issue and quickly
>> append the docs and/or open a bug report.
>>
>>  Thanks,
>> Joe
>>
>> _______________________________________________
>> Openstack-docs mailing list
>> Openstack-docs at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>>
>>
>   _______________________________________________
> Openstack-docs mailing list
> Openstack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20140323/3e8fddf1/attachment.html>


More information about the Openstack-docs mailing list