Restart mysql when package is installed

When running galera_server role with galera_upgrade=true
it uninstalls mariadb and installs again. In some distros, like CentOS,
mariadb don't start automatically after installation, so upgrade fails.

This patch adds handler on packsage installation, which will be
triggered when package state is changed.

Change-Id: I23811cfaf23007c5da1860e78397be380d67403b
Related-bug: 1628720
(cherry picked from commit efc965f00f)
This commit is contained in:
Dmitriy Rabotyagov 2019-11-05 18:31:53 +02:00 committed by Dmitriy Rabotyagov (noonedeadpunk)
parent 9d201e4dd3
commit fbc410f82d
4 changed files with 13 additions and 0 deletions

View File

@ -88,6 +88,10 @@
until: install_remote_apt_packages is success
retries: 5
delay: 2
notify:
- Manage LB
- Restart all mysql
- name: Remove policy-rc now that the package install is complete
file:

View File

@ -25,6 +25,9 @@
until: install_remote_packages is success
retries: 5
delay: 2
notify:
- Manage LB
- Restart all mysql
- name: Ensure mysql config directories exists
file:

View File

@ -136,3 +136,6 @@
until: install_remote_packages is success
retries: 5
delay: 2
notify:
- Manage LB
- Restart all mysql

View File

@ -92,3 +92,6 @@
until: install_remote_packages is success
retries: 5
delay: 2
notify:
- Manage LB
- Restart all mysql