From bfc9344ede52707dc4495aa85592ff6d35c68f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Suchomel?= Date: Thu, 21 Sep 2017 13:13:08 +0200 Subject: [PATCH] mysql: Do not start SSL connection when bootstrapping --- chef/cookbooks/mysql/recipes/ha_galera.rb | 1 + chef/cookbooks/mysql/recipes/server.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/chef/cookbooks/mysql/recipes/ha_galera.rb b/chef/cookbooks/mysql/recipes/ha_galera.rb index c7f03c8747..8ef2b30f0c 100644 --- a/chef/cookbooks/mysql/recipes/ha_galera.rb +++ b/chef/cookbooks/mysql/recipes/ha_galera.rb @@ -71,6 +71,7 @@ db_connection[:host] = "localhost" db_connection[:username] = "root" db_connection[:password] = "" + db_connection[:ssl] = {} service "mysql-temp start" do service_name mysql_service_name diff --git a/chef/cookbooks/mysql/recipes/server.rb b/chef/cookbooks/mysql/recipes/server.rb index 3dfcfa2217..1158e517a3 100644 --- a/chef/cookbooks/mysql/recipes/server.rb +++ b/chef/cookbooks/mysql/recipes/server.rb @@ -164,6 +164,7 @@ db_connection[:host] = "localhost" db_connection[:username] = "root" db_connection[:password] = node[:database][:mysql][:server_root_password] +db_connection[:ssl] = {} unless node[:database][:database_bootstrapped] database_user "create db_maker database user" do @@ -206,7 +207,7 @@ "TRIGGER" ] provider db_settings[:user_provider] - require_ssl db_connection[:ssl][:enabled] + require_ssl node[:mysql][:ssl][:enabled] action :grant only_if { !ha_enabled || CrowbarPacemakerHelper.is_cluster_founder?(node) } end