From a743ea9689b7de12539d42eef63f90d4bfa5bc1c Mon Sep 17 00:00:00 2001 From: Darren Birkett Date: Fri, 15 Apr 2016 09:12:32 +0100 Subject: [PATCH] ensure mysql defaults file is sourced The mysql initscript that comes with mariadb-10.0 does not source the /etc/default/mysql file, meaning that the MYSQLD_STARTUP_TIMEOUT that we set in there is being ignored. This has the effect of causing some nodes to timeout their startup too early, interrupting the initial SST, and causing the cluster join to fail. This commit adds a line to the initscript to ensure that we are sourcing /etc/default/mysql correctly. Closes-Bug: #1569446 Co-Authored-By: Jimmy McCrory Change-Id: I6af1cc660c2bbc2a49707cfab995659dc0167f2f (cherry picked from commit b9a7361b28a7acb2dd05ef960cf474dc91486a6a) --- tasks/galera_post_install.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tasks/galera_post_install.yml b/tasks/galera_post_install.yml index b53d9433..30c21b64 100644 --- a/tasks/galera_post_install.yml +++ b/tasks/galera_post_install.yml @@ -55,6 +55,18 @@ tags: - galera-client-user-config +# NOTE: (mancdaz) this should not be needed with mariadb-10.1 since its +# initscript sources /etc/default/mariadb +- name: fix mysql startup timeout + lineinfile: + dest: /etc/init.d/mysql + state: present + insertafter: '^export HOME=/etc/mysql/' + line: '[ -r /etc/default/mysql ] && . /etc/default/mysql' + backup: yes + +# NOTE: (mancdaz) The target will need to change to /etc/default/mariadb +# for mariadb-10.1 - name: Drop mariadb config(s) template: src: "mysql_defaults.j2"