Description of problem: ======================= packstack should ask the user whether if he would like to install mysql or not. At the moment, There is no option for a user to install openstack using packstack with a given remote DB IP address, And prevent from packstack to install mysql. This creates an issue when a user already have an installed DB, specifically a cluster of mysql DBs. using packstack in such scenario will break the cluster (consulted with derekh about this one). To conclude this: On one hand, packstack is capable of installing a single mysql db node, which is ok for some cases. On the other hand, packstack doesn't handle mysql cluster installation (and it shouldn't), but it should allow users to set up mysql cluster by their own and work with it. The mysql install yes/no option should be added to the answers file as well. In case the user choose 'no', packstack should ask the user for credentials and use CONFIG_MYSQL_HOST as a given remote DB. Version-Release number of selected component (if applicable): ============================================================= openstack-packstack-2012.2.2-0.1.dev262.el6.noarch Steps to Reproduce: =================== 1. 2. 3. Actual results: =============== Expected results: =================
Current solution set's nova and keystone config on host where packstack is running. Can be changed only if bug #956596 and bug #956597 will be implemented. Code for it is already implemented, but commented for now.
(In reply to comment #4) > Current solution set's nova and keystone config on host where packstack is > running. Can be changed only if bug #956596 and bug #956597 will be > implemented. Code for it is already implemented, but commented for now. Can this not be done without the --sql_connection options by making sure the sql config is written to the *conf file before running db_sync ?
Yes this is exactly how it is now implemented. I just stated that we won't have to use config files as soon as those RFEs will be implemented. Solution is implemented in Packstack for that and the only thing needed is just uncomment it when RFEs are also implemented.
ok, thanks, i misread comment 4.
Had to change also Cinder and Glance to use sql_connection from config files, since it seems CLI parameters are ignored even though cinder-manage and glance-manage accept it (I've reported this issue in bug #958782 and bug #958725).
Martin, I tried to verify this fix as follows: 1. Used packstack only to install mysql server (see attached answer file 1.txt) 2. Used packstack to install all other openstack services WITHOUT mysql server (see attached answer file 2.txt) This resulted an error: ERROR : Error appeared during Puppet run: <IP_ADDRESS>_mysql.pp Error: Execution of '/usr/bin/mysql --host=<IP_ADDRESS> --user=root --password=123456 -NBe create database `cinder` character set latin1' returned 1: ERROR 1045 (28000): Access denied for user 'root'@'cougar11.scl.lab.tlv.redhat.com' (using password: YES) You will find full trace in log /var/tmp/packstack/20131114-184326-Du2ViM/manifests/<IP_ADDRESS>_mysql.pp.log I will attached both answer files and packstack log in the following comments. Please let me know if there is anything I did wrong, you I should just re-open the bug.
Created attachment 824077 [details] packstack answer file --> mysql only
Created attachment 824079 [details] packstack answer file --> all openstack services without mysql
Created attachment 824080 [details] packstack logs (DEBUG) --> resulted from 2.txt
Below error is telling you that you weren't able to connect to DB running on <IP_ADDRESS> from machine where you were running packstack: Error: Execution of '/usr/bin/mysql --host=<IP_ADDRESS> --user=root --password=123456 -NBe create database `cinder` character set latin1' returned 1: ERROR 1045 (28000): Access denied for user 'root'@'cougar11.scl.lab.tlv.redhat.com' (using password: YES) Thinking about this. When you first installed only MySQL the installation used user root using local connection. Local root without password is by default created in MySQL. So what I would do is following: sudo mysql select user, host, password from mysql.user; >> here check how many root users you have here, ideally there would be one with '%' as host and some hash as password, if not continue << delete from mysql.user where user='root' and host in ('localhost', 'whatever else which is not %'); set password for 'root'@'%' = PASSWORD('some password'); flush privileges; Now you have DB set to so that root user can connect from whatever machine and now repeat your step 2.
Verified NVR: openstack-packstack-2013.2.1-0.11.dev847.el6ost.noarch Followed your instructions (Comment #14): =========================== 1.ran packstack with an answer file, installed mysql ONLY. CONFIG_MYSQL_PW=123456 2. Modified mysql users table: mysql> select user, host, password from mysql.user; +----------------+-----------+-------------------------------------------+ | user | host | password | +----------------+-----------+-------------------------------------------+ | root | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | keystone_admin | 127.0.0.1 | *4185D59CCE34C21D1E125D64131D3FBD7712572F | | keystone_admin | % | *4185D59CCE34C21D1E125D64131D3FBD7712572F | +----------------+-----------+-------------------------------------------+ mysql> UPDATE mysql.user SET host='%' WHERE user='root'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select user, host, password from mysql.user; +----------------+-----------+-------------------------------------------+ | user | host | password | +----------------+-----------+-------------------------------------------+ | root | % | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | keystone_admin | 127.0.0.1 | *4185D59CCE34C21D1E125D64131D3FBD7712572F | | keystone_admin | % | *4185D59CCE34C21D1E125D64131D3FBD7712572F | +----------------+-----------+-------------------------------------------+ 3 rows in set (0.00 sec) mysql> UPDATE mysql.user SET Password = PASSWORD("123456") WHERE User="root"; Query OK, 0 rows affected (0.00 sec) > **The line you provided for changing the root password did not work here. mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye 3. Ran packstack to install all services without mysql. Result: ======= 1. Installation ended successfully. 2. services databases were created. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | cinder | | glance | | heat | | keystone | | mysql | | nova | | ovs_neutron | | test | +--------------------+ 9 rows in set (0.00 sec) Verified that all databases contains tables.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2013-1859.html