From 2587f4e961053a6fcca2502d49bc9df0b1f35a97 Mon Sep 17 00:00:00 2001 From: Jose Luis Franco Arza Date: Fri, 1 Feb 2019 15:58:45 +0100 Subject: [PATCH] Copy undercloud.conf file during mistral-executor start up. As we are changing the ownership of the whole /var/lib/mistral directory in a recursive way, we can't be mapping /var/lib/mistral/undercloud.conf as read-only, otherwise we will get a OSError: [Errno 30] Read-only file system: '/var/lib/mistral/undercloud.conf'. Instead, we will be mapping the undercloud.conf file into /var/lib/ directory inside the container and then copy it from /var/lib into /var/lib/mistral directory on start up, this way we will get rid of ownership permission issues. Change-Id: Icbdaaf628d996bac89a770426db97d556df4003a Closes-Bug: #1814275 --- .../mistral/mistral-executor-container-puppet.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deployment/mistral/mistral-executor-container-puppet.yaml b/deployment/mistral/mistral-executor-container-puppet.yaml index fc6d1c450e..9c6c1c2f2b 100644 --- a/deployment/mistral/mistral-executor-container-puppet.yaml +++ b/deployment/mistral/mistral-executor-container-puppet.yaml @@ -134,6 +134,13 @@ outputs: dest: "/" merge: true preserve_properties: true + - if: + - undercloud_config_file_path_unset + - '' + - source: '/var/lib/undercloud.conf' + dest: '/var/lib/mistral/undercloud.conf' + merge: true + preserve_properties: true permissions: - path: /var/log/mistral owner: mistral:mistral @@ -179,7 +186,7 @@ outputs: - - list_join: - ':' - - {get_param: UndercloudConfigFilePath} - - '/var/lib/mistral/undercloud.conf' + - '/var/lib/undercloud.conf' - 'ro' - if: - docker_enabled