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

Bug 1046327

Summary: heat-db-setup forcefully require a mysql root passwd
Product: Red Hat OpenStack Reporter: Fabio Massimo Di Nitto <fdinitto>
Component: openstack-heatAssignee: RHOS Maint <rhos-maint>
Status: CLOSED DUPLICATE QA Contact: Kevin Whitney <kwhitney>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.0CC: hateya, sbaker, sdake, shardy, srevivo, yeylon
Target Milestone: asyncKeywords: ZStream
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-06 19:41:05 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 Fabio Massimo Di Nitto 2013-12-24 15:09:51 UTC
Due to https://bugzilla.redhat.com/show_bug.cgi?id=1046326, I was forced to install openstack-heat-common on my mysql running machine.

This being a test setup I don't have a mysql root password set. The only I was able to tell heat-db-setup to move on was to "" the password.

[root@fab2 ~]# heat-db-setup rpm -y -r "" -p heattest
Installing on an RPM system.
mysql-server-5.1.71-1.el6.x86_64
Another MySQL daemon already running with the same unix socket.
Starting mysqld:                                           [FAILED]
Verified connectivity to MySQL.
Creating 'heat' database.
Updating 'heat' database password in /etc/heat/heat.conf
/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py:683: SADeprecationWarning: The 'listeners' argument to Pool (and create_engine()) is deprecated.  Use event.listen().
  Pool.__init__(self, creator, **kw)
/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py:159: SADeprecationWarning: Pool.add_listener is deprecated.  Use event.listen()
  self.add_listener(l)
ERROR: (OperationalError) (1045, "Access denied for user 'heat'@'localhost' (using password: YES)") None None
ERROR 1146 (42S02) at line 1: Table 'heat.migrate_version' doesn't exist
Final sanity check failed.

and testing with:

[root@fab2 ~]# heat-db-setup rpm -y -p heattest
Installing on an RPM system.
mysql-server-5.1.71-1.el6.x86_64
Another MySQL daemon already running with the same unix socket.
Starting mysqld:                                           [FAILED]
Please enter the password for the 'root' MySQL user: 
Verified connectivity to MySQL.
Creating 'heat' database.
Updating 'heat' database password in /etc/heat/heat.conf
/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py:683: SADeprecationWarning: The 'listeners' argument to Pool (and create_engine()) is deprecated.  Use event.listen().
  Pool.__init__(self, creator, **kw)
/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py:159: SADeprecationWarning: Pool.add_listener is deprecated.  Use event.listen()
  self.add_listener(l)
ERROR: (OperationalError) (1045, "Access denied for user 'heat'@'localhost' (using password: YES)") None None
ERROR 1146 (42S02) at line 1: Table 'heat.migrate_version' doesn't exist
Final sanity check failed.

without providing a root password.

Also, before trying to install or run mysql, heat-db-setup should:

1) check if mysql is already installed  -> skip yum invokation, I might not want an update of the db middle of deploying
2) check if it's running with a service mysql status before trying to start a service.

Comment 1 Fabio Massimo Di Nitto 2013-12-25 07:09:59 UTC
Steve mentioned on IRC not to use this tool, but this is what we are advertising to customers:

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/4/html/Installation_and_Configuration_Guide/sect-Configuring_the_Orchestration_Service.html

as official tool to fill the db.

Comment 2 Steven Dake 2014-01-06 19:41:05 UTC

*** This bug has been marked as a duplicate of bug 1046326 ***

Comment 3 Steven Dake 2014-01-06 19:41:39 UTC
heat-db-setup is a developer tool and is being removed from RHOS packaging.  See https://bugzilla.redhat.com/show_bug.cgi?id=1046326#c10 for rationale behind closing this as a dup.