Fix mysql-server ignoring root_user_use_databag attribute.

Addresses: bug #1273353

The mysql-server recipe was not checking the
default['openstack']['db']['root_user_use_databag'] attribute to see if
it should use the node['mysql']['server_root_password'] attribute or
check a databag for the mysql root password.

Change-Id: I589f7e43fc1f15c072d3e50dab6cef25f367075b
This commit is contained in:
Scott Lampert 2014-03-12 16:20:49 -06:00
parent 14333ce0b3
commit 8b3c4a7b3b
1 changed files with 7 additions and 1 deletions

View File

@ -50,10 +50,16 @@ end
r = resources("template[#{mycnf_template}]")
r.notifies_immediately(:restart, 'service[mysql]')
if node['openstack']['db']['root_user_use_databag']
super_password = get_password 'user', node['openstack']['db']['root_user_key']
else
super_password = node['mysql']['server_root_password']
end
mysql_connection_info = {
host: 'localhost',
username: 'root',
password: node['mysql']['server_root_password']
password: super_password
}
mysql_database 'FLUSH PRIVILEGES' do