Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 891700

Summary: MySQL authentication failing during install
Product: Red Hat OpenStack Reporter: Dan Radez <dradez>
Component: openstack-packstackAssignee: Dan Radez <dradez>
Status: CLOSED ERRATA QA Contact: Nir Magnezi <nmagnezi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: aortega, derekh, jhenner, ykaul
Target Milestone: snapshot1   
Target Release: 2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-packstack-2012.2.2-0.5.dev318.el6ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-30 20:16:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Radez 2013-01-03 18:06:45 UTC
Description of problem:
keystone user is created but we cannot login as the user until the anonymous user is cleaned out of the mysql user db.


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

How reproducible:
everytime mysql is installed fresh

Steps to Reproduce:
1. On RHEL 6.3 clone packstack
2. run installer
3.
  
Actual results:
err: /Stage[main]/Nova::Keystone::Auth/Keystone_service[nova]: Could not evaluate: Execution of '/usr/bin/keystone --token 9c1102ba30f04b938c5e0104ad2b56b8 --endpoint http://127.0.0.1:35357/v2.0/ service-list' returned 1: An unexpected error prevented the server from fulfilling your request. (OperationalError) (1045, "Access denied for user 'keystone_admin'@'radez.example.com' (using password: YES)") None None (HTTP 500)

Expected results:
packstack installs openstack properly

Additional info:
manual fix is to run mysql_secure_installation and make sure it removes the anon user and reloads the priv tables. the sql: DELETE FROM mysql.user WHERE User=''; will also remove the user that's causing this.

Comment 2 Dan Radez 2013-01-09 16:17:41 UTC
submitted https://github.com/fedora-openstack/packstack/pull/45 to address this issue

Comment 3 Dan Radez 2013-01-09 17:32:08 UTC
fixed in dd278b1829d20749a644a33a28558e9962964318
merged in 4e23454bd9fa4b380391df98b422350ab42dc77f

Comment 5 Nir Magnezi 2013-01-16 13:55:02 UTC
how should I test this fix?

Comment 7 Derek Higgins 2013-01-28 10:43:07 UTC
If you run this command on a host with the problem, you will see some users with no name (anonymous users)

# echo "select User,Host from user where user = '' ;" | mysql mysql
User    Host
        devpackstack
        localhost
# 

if the bug is fixed nothing will be output and packstack will successfully install

Comment 8 Nir Magnezi 2013-01-28 11:01:16 UTC
Verified With: openstack-packstack-2012.2.2-0.5.dev318.el6ost.noarch

$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1102
Server version: 5.1.66 Source distribution

Copyright (c) 2000, 2012, 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> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select User,Host from user where user = '' ;
Empty set (0.00 sec)