default region name is inconsistent with the hint message

Bug #1400589 reported by Dave Chen
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Low
Unassigned

Bug Description

It seems the name of the default region is RegionOne with the initial character "R" in upper case.

MariaDB [keystone]> select * from region;
+-----------+-------------+------------------+-------+------+
| id | description | parent_region_id | extra | url |
+-----------+-------------+------------------+-------+------+
| RegionOne | | NULL | {} | NULL |
| test | | NULL | {} | NULL |
+-----------+-------------+------------------+-------+------+

While I am try to create one new endpoint with a new region which I hope would be "regionOne", the command can be executed successfully,
$ keystone endpoint-create --region regionOne --service a1663c0dbba64425b5767688ac86fa10 --publicurl http://10.*.*.*:5010/v2.0 --adminurl http://10.*.*.*:5010/v2.0 --internalurl http://10.*.*.*:5010/v2.0
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| adminurl | http://10.*.*.*:5010/v2.0 |
| id | 8ffb333e32a54355bc924e7602362675 |
| internalurl | http://10.*.*.*:5010/v2.0 |
| publicurl | http://10.*.*.*:5010/v2.0 |
| region | regionOne |
| service_id | a1663c0dbba64425b5767688ac86fa10 |
+-------------+----------------------------------+

But there is no new region named "regionOne" created in the database other that the default one "RegionOne", so I guess it treats both of them the same.

But if I create the endpoint with "RegionOne", the command can also success but the output message like this,
$ keystone endpoint-create --region RegionOne --service a1663c0dbba64425b5767688ac86fa10 --publicurl http://10.*.*.*:5010/v2.0 --adminurl http://10.*.*.*:5010/v2.0 --internalurl http://10.*.*.*:5010/v2.0
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| adminurl | http://10.*.*.*:5010/v2.0 |
| id | 075b237859c149128c3bbf8c3556922d |
| internalurl | http://10.*.*.*:5010/v2.0 |
| publicurl | http://10.*.*.*:5010/v2.0 |
| region | RegionOne |
| service_id | a1663c0dbba64425b5767688ac86fa10 |
+-------------+----------------------------------+

It make me confusion about what's behind about the region, so file this bug to track this.

Dave Chen (wei-d-chen)
Changed in keystone:
assignee: nobody → Dave Chen (wei-d-chen)
description: updated
Revision history for this message
Dave Chen (wei-d-chen) wrote :

New endpoint is created indeed, refer to this command,
$ keystone endpoint-list
...

| d9b80a9db51f460690925fb1a71df3f3 | regionOne | http://10.239.37.139:5010/v2.0 | http://10.239.37.139:5010/v2.0 | http://10.239.37.139:5010/v2.0 | a1663c0dbba64425b5767688ac86fa10 |
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+----------------------------------+

The name of associated region is "regionOne" while there is no regionOne created in the region table,
MariaDB [keystone]> select * from region;
+-----------+-------------+------------------+-------+------+
| id | description | parent_region_id | extra | url |
+-----------+-------------+------------------+-------+------+
| RegionOne | | NULL | {} | NULL |
| test | | NULL | {} | NULL |
+-----------+-------------+------------------+-------+------+
2 rows in set (0.00 sec)

Dolph Mathews (dolph)
tags: added: user-experience
Changed in keystone:
importance: Undecided → Low
Dave Chen (wei-d-chen)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/142411

Changed in keystone:
status: New → In Progress
Revision history for this message
Zhenzan Zhou (zhenzan-zhou) wrote :

Also met this issue when creating an overcloud with Heat + ironic from a devstack cloud. Devstack uses 'RegionOne' but the overcloud is using 'regionOne'. And keystoneclient/service_catalog.py:get_endpoints() will raise exception EndPointsNotFound because it does case sensitive compare.

Revision history for this message
Brant Knudson (blk-u) wrote :

When Keystone creates the tables, the default collation is utf8_general_ci which is case-insensitive.

The Tables are created using mysql-specific keyword arguments mysql_engine='InnoDB', mysql_charset='utf8'.

To use case-sensitive comparison, we need yet another MySQL workaround: create the tables with a utf8_bin collation using mysql_collate='utf8_bin'.

If we want to do case-insensitive collation on all the strings in Keystone using mysql, we'll need to set mysql_collate='utf8_bin' on all the existing tables. This is going to require a complicated migration.

Also, this isn't specific to Keystone... I'm pretty sure all the services need to do this to do case-sensitive comparison.

Revision history for this message
Dolph Mathews (dolph) wrote :

I've abandoned the referenced changed due to inactivity and failing tests. If this is still an issue, please reset the status.

Changed in keystone:
status: In Progress → Incomplete
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Dolph Mathews (<email address hidden>) on branch: master
Review: https://review.openstack.org/142411
Reason: Abandoning due to inactivity and failing tests.

Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

Marking as invalid since this should have expired as incomplete long ago.

Changed in keystone:
assignee: Dave Chen (wei-d-chen) → nobody
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.