Fix MYSQLD_STARTUP_TIMEOUT for systemd

The /etc/default/mysql file needs to be sourced for systemd to start
mysql with the appropriate MYSQLD_STARTUP_TIMEOUT value.

We are already adding the line to source the /etc/default/mysql file in
the init.d/mysql script, but we were skipping dropping the defaults file
when using "systemd".

Additionally, this groups the init file change and the default file
templating to be sequential.

Change-Id: If5dc328e67bde9d84f40c2b192c217e82e1987eb
Closes-Bug: #1634562
(cherry picked from commit 9a8fced0f2)
This commit is contained in:
Andy McCrae 2016-10-20 09:40:41 +01:00 committed by Jesse Pretorius (odyssey4me)
parent 26c405b370
commit ca396469cc
1 changed files with 11 additions and 13 deletions

View File

@ -68,19 +68,8 @@
tags:
- galera-config
- name: Drop limits config (upstart)
template:
src: "upstart.limits.conf.j2"
dest: "/etc/security/limits.conf"
when:
- pid1_name != "systemd"
notify:
- Restart mysql
tags:
- galera-config
# NOTE: (mancdaz) REMOVE "/etc/default/mysql" when running MariaDB 10.1
- name: Apply resource limits (upstart)
- name: Apply service defaults
template:
src: "mysql_defaults.j2"
dest: "{{ item }}"
@ -88,8 +77,17 @@
with_items:
- /etc/default/mysql
- /etc/default/mariadb
notify:
- Restart mysql
- Reload the systemd daemon
tags:
- galera-config
- name: Drop limits config (upstart)
template:
src: "upstart.limits.conf.j2"
dest: "/etc/security/limits.conf"
when:
- ansible_pkg_mgr == 'apt'
- pid1_name != "systemd"
notify:
- Restart mysql