Make sure /var/lib/mysql rights are setup correctly.

If you do an upgrade on then bootstrap[1] is not run, so you have to
make sure the permission are setup right every time.

This is duplicating what is happening in the pacemaker mysql template[2]

Partial-Bug: #1724636

[1] https://github.com/openstack/tripleo-heat-templates/blob/master/docker/services/database/mysql.yaml#L128
[2] https://github.com/openstack/tripleo-heat-templates/blob/master/docker/services/pacemaker/database/mysql.yaml#L162

Change-Id: Ib224dd10361171dfd579867be35a2c67a71fd9d5
(cherry picked from commit f48e11ee27)
This commit is contained in:
Sofer Athlan-Guyot 2017-11-08 17:46:35 +01:00 committed by Emilien Macchi
parent 994922a8ba
commit 9ca5d97476
1 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,8 @@ outputs:
user: root
volumes:
- /var/log/containers/mysql:/var/log/mariadb
command: ['/bin/bash', '-c', 'chown -R mysql:mysql /var/log/mariadb']
- /var/lib/mysql:/var/lib/mysql
command: ['/bin/bash', '-c', 'chown -R mysql:mysql /var/log/mariadb /var/lib/mysql']
step_2:
mysql_bootstrap:
start_order: 1