Bug 890175
Summary: | Openstack Installer: using packstack, mysql installation should be optional. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Nir Magnezi <nmagnezi> | ||||||||
Component: | openstack-packstack | Assignee: | Martin Magr <mmagr> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Nir Magnezi <nmagnezi> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 2.0 (Folsom) | CC: | ajeain, aortega, derekh, ichavero, jkt, mlopes, mmagr | ||||||||
Target Milestone: | beta | Keywords: | Triaged | ||||||||
Target Release: | 4.0 | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | openstack-packstack-2013.2.1-0.5.dev740.el6ost | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | |||||||||||
: | 984878 (view as bug list) | Environment: | |||||||||
Last Closed: | 2013-12-19 23:54:02 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: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 890183, 984878 | ||||||||||
Attachments: |
|
Description
Nir Magnezi
2012-12-25 14:10:40 UTC
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. 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 |