db_sync fails if hostname has underscore

Bug #1291059 reported by Adam Young
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Expired
Undecided
Unassigned

Bug Description

Origianlly filed in Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1069607

Description of problem:
  When hostname has "_" character like "rhos4_cnt.example.com", keystone.pp has failed with following error:

Notice: /Stage[main]/Keystone/Exec[keystone-manage db_sync]/returns: 2014-02-25 20:14:37.597 5207 CRITICAL keystone [-] (OperationalError) (1045, "Access denied for user 'keystone_admin'@'rhos4_cnt.example.com' (using password: YES)") None None

  In this case, I can see hostname has escaped by "\" as follows in mysql db.

# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 153
Server version: 5.1.71 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select host, user from mysql.user;
+------------------------+----------------+
| host | user |
+------------------------+----------------+
| % | cinder |
| % | glance |
| % | heat |
| % | keystone_admin |
| % | neutron |
| % | nova |
| 127.0.0.1 | cinder |
| 127.0.0.1 | glance |
| 127.0.0.1 | keystone_admin |
| 127.0.0.1 | neutron |
| 127.0.0.1 | nova |
| localhost | heat |
| localhost | root |
| rhos4\_cnt.example.com | |
| rhos4\_cnt.example.com | root |
+------------------------+----------------+
15 rows in set (0.00 sec)

Version-Release number of selected component (if applicable):

How reproducible:
  Always

Steps to Reproduce:
1. set FQDN with "_" character and run packstack.
2.
3.

Actual results:
  In the keystone.pp, keystone-manage db_sync failed and got python backtrace.

Expected results:
  Install should finish normally.

Additional info:
  Attaching packstack log and sosreport.

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

FWIW - I remember running into this problem in a previous life - From: http://pic.dhe.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Frins_hostname.html - Avoid using the underscore (_) character in machine names. Internet standards dictate that domain names conform to the host name requirements described in Internet Official Protocol Standards RFC 952 and RFC 1123. Domain names must contain only letters (upper or lower case) and digits. Domain names can also contain dash characters ( - ) as long as the dashes are not on the ends of the name. Underscore characters ( _ ) are not supported in the host name. If you have installed WebSphere Application Server on a machine with an underscore character in the machine name, access the machine with its IP address until you rename the machine.

Dolph Mathews (dolph)
Changed in keystone:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Keystone because there has been no activity for 60 days.]

Changed in keystone:
status: Incomplete → Expired
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.