From 74768221e52ff2c83b96aaef1e47b61a6230415e Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Tue, 28 Oct 2014 08:47:52 -0400 Subject: [PATCH] Fix to ensure MySQL command line works In the event that the os-config-refresh steps do not copy the MySQL CLI configuration back to ~/.my.cnf, the step added in this commit will take that action when necessary. Change-Id: I4395644c19125c9c96ed0326e10519fd0dd9b710 --- playbooks/mysql_access_fix.yml | 17 +++++++++++++++++ playbooks/update_cloud.yml | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 playbooks/mysql_access_fix.yml diff --git a/playbooks/mysql_access_fix.yml b/playbooks/mysql_access_fix.yml new file mode 100644 index 0000000..f7799df --- /dev/null +++ b/playbooks/mysql_access_fix.yml @@ -0,0 +1,17 @@ +# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. +- name: "Ensure /root/.my.cnf is present" + sudo: yes + command: cp -a /mnt/state/root/metadata.my.cnf /root/.my.cnf creates=/root/.my.cnf diff --git a/playbooks/update_cloud.yml b/playbooks/update_cloud.yml index 22f0231..1fcf5b5 100644 --- a/playbooks/update_cloud.yml +++ b/playbooks/update_cloud.yml @@ -274,6 +274,7 @@ wait_for: port=5672 state=started timeout=90 delay=10 - name: Restart os-collect-config service: name=os-collect-config state=started + - include: mysql_access_fix.yml - hosts: controller name: Rebuild and Refresh Controller gather_facts: no @@ -320,6 +321,7 @@ # os-collect-config has failed to reach that step. - include: step_os-apply-config.yml - include: start_mysql.yml + - include: mysql_access_fix.yml - hosts: controller name: Initiate Database Creation max_fail_percentage: 0