On Mon, Oct 06, 2014, Ihar Hrachyshka <ihrac...@redhat.com> wrote:
> Maybe it is indeed wasteful, I don't have numbers; though the fact is
> we don't allow any migrations for databases with any non utf8 tables
> as of [1]. The code was copied in multiple projects (Nova, Glance
> among other things). Also, the same check is present in oslo.db that
> is used by most projects now.
> Also we have migration rules in multiple projects that end up with
> converting all tables to utf8. F.e. it's done in Nova [2].
> So we already run against utf8 tables. Though we don't ever tell users
> to create their databases with utf8 as default charset, opening a can
> of worms. We also don't ever tell users to at least set use_unicode=0
> when running against MySQLdb (which is the default and the only
> supported MySQL driver as of Juno) to avoid significant performance
> drop [3] (same is true for oursql driver, but that one is at least not
> recommended to users thru official docs).

This is a situation where Openstack is frustratingly inconsistent.

While we don't provide any guidance about the default charset, Nova now
creates all tables with the utf8 charset and provided a migration[1] to
fix deployments done before this change.

The same cannot be said for Glance. It inherited the utf8 check, but
never provided a migration to fix deployments done before this change.
It still creates tables with no default charset leading to a situation
where you can deploy Glance with default values but then end up not
being able to run any future migrations.

Glance did have a flag to disable that check, but it was recently
removed[2] with no automated migrations to resolve earlier deployments
(like many of ours).

This frustratingly got approved and merged after my -1 and with no
explanation why they were doing this to operators. It felt like I was
getting the gerrit equivalent of a middle finger.

All of that said, I'm 100% for making all of the projects more
consistent and use utf8 (where it makes sense).

[1]: https://review.openstack.org/#/c/3946/
[2]: https://review.openstack.org/#/c/120002/


OpenStack-dev mailing list

Reply via email to