From 16ba2ee4c8655f38de2723138720d9bff606022d Mon Sep 17 00:00:00 2001 From: Martin André Date: Wed, 5 Apr 2017 08:43:25 +0200 Subject: Use kolla api to set ownership Kolla provides a way to set ownership of files and directory inside the containers. Use it instead of running an additional container to do the job. Change-Id: I554faf7c797f3997dd3ca854da032437acecf490 --- docker/services/database/mysql.yaml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'docker/services/database/mysql.yaml') diff --git a/docker/services/database/mysql.yaml b/docker/services/database/mysql.yaml index 372f059c..cba2070d 100644 --- a/docker/services/database/mysql.yaml +++ b/docker/services/database/mysql.yaml @@ -71,20 +71,14 @@ outputs: kolla_config: /var/lib/kolla/config_files/mysql.json: command: /usr/bin/mysqld_safe + permissions: + - path: /var/lib/mysql + owner: mysql:mysql + recurse: true docker_config: step_2: - mysql_data_ownership: - start_order: 0 - detach: false - image: *mysql_image - net: host - user: root - # Kolla does only non-recursive chown - command: ['chown', '-R', 'mysql:', '/var/lib/mysql'] - volumes: - - /var/lib/mysql:/var/lib/mysql mysql_bootstrap: - start_order: 1 + start_order: 0 detach: false image: *mysql_image net: host @@ -113,7 +107,7 @@ outputs: - {get_param: MysqlRootPassword} - {get_param: [DefaultPasswords, mysql_root_password]} mysql: - start_order: 2 + start_order: 1 image: *mysql_image restart: always net: host -- cgit 1.2.3-korg