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
This commit is contained in:
Jose Luis Franco Arza 2019-02-01 15:58:45 +01:00
parent fce7eeca78
commit 2587f4e961

@ -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