[openstack-dev] [TripleO][keystone] default region name

Brant Knudson blk at acm.org
Thu Jan 8 14:13:16 UTC 2015


On Thu, Jan 8, 2015 at 7:28 AM, Steven Dake <sdake at redhat.com> wrote:

> On 01/07/2015 10:21 PM, Zhou, Zhenzan wrote:
>
>> Hi,
>>
>> Does anyone know why TripleO uses "regionOne" as default region name? A
>> comment in the code says it's the default keystone uses.
>>
>
> Zhenzan,
>
> I was going to point you here:
>
> https://bugs.launchpad.net/keystone/+bug/1400589
>
> But I see you already had commented in that bug.
>

If we're expecting OpenStack to generally do case-sensitive comparisons,
then we shouldn't be using the default MySQL collation for char columns[1].
Maybe the text columns should be BINARY rather than CHAR, or use a
different collation.

mysql> describe region;
+------------------+--------------+------+-----+---------+-------+
| Field            | Type         | Null | Key | Default | Extra |
+------------------+--------------+------+-----+---------+-------+
| id               | varchar(255) | NO   | PRI | NULL    |       |
| description      | varchar(255) | NO   |     | NULL    |       |
| parent_region_id | varchar(255) | YES  |     | NULL    |       |
| extra            | text         | YES  |     | NULL    |       |
| url              | varchar(255) | YES  |     | NULL    |       |
+------------------+--------------+------+-----+---------+-------+
5 rows in set (0.00 sec)

mysql> select collation(id) from region;
+-----------------+
| collation(id)   |
+-----------------+
| utf8_general_ci |
+-----------------+
1 row in set (0.00 sec)

It's not easy to alter the collation when it's a foreign key.

mysql> alter table region convert to character set utf8 collate utf8_bin;
ERROR 1025 (HY000): Error on rename of './keystone/#sql-3ffc_32' to
'./keystone/region' (errno: 150)

[1] http://dev.mysql.com/doc/refman/5.7/en/case-sensitivity.html

- Brant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150108/6cf1bb22/attachment.html>


More information about the OpenStack-dev mailing list