From cf18e865d14adc319b6c2dfafd650f32dad4d853 Mon Sep 17 00:00:00 2001 From: Martin André Date: Wed, 21 Jun 2017 16:02:55 +0200 Subject: Copy only generated puppet files into the container This solves a problem with bind-mounts when the containers are holding files descriptors open. At the same time this makes the template more robust to puppet changes since new config files will be available in the containers without needing to update the templates. Partial-Bug: #1698323 Change-Id: Ia4ad6d77387e3dc354cd131c2f9756939fb8f736 --- docker/services/congress.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'docker/services/congress.yaml') diff --git a/docker/services/congress.yaml b/docker/services/congress.yaml index 5b5a2190..1d3ea0d8 100644 --- a/docker/services/congress.yaml +++ b/docker/services/congress.yaml @@ -76,6 +76,11 @@ outputs: kolla_config: /var/lib/kolla/config_files/congress_api.json: command: /usr/bin/congress-server --config-file=/etc/congress/congress.conf --log-file=/var/log/congress/api.log + config_files: + - source: "/var/lib/kolla/config_files/src/*" + dest: "/" + merge: true + preserve_properties: true permissions: - path: /var/log/congress owner: congress:congress @@ -104,7 +109,10 @@ outputs: list_concat: - {get_attr: [ContainersCommon, volumes]} - - - /var/lib/config-data/congress/etc/:/etc/:ro + # FIXME(mandre) mounting /etc rw to workaround LP1696283 + # This should go away anyway and mount the exact files it + # needs or use kolla set_configs.py + - /var/lib/config-data/congress/etc/:/etc/ - /var/log/containers/congress:/var/log/congress command: "/usr/bin/bootstrap_host_exec congress su congress -s /bin/bash -c 'congress-db-manage --config-file /etc/congress/congress.conf upgrade head'" step_4: @@ -119,7 +127,7 @@ outputs: - {get_attr: [ContainersCommon, volumes]} - - /var/lib/kolla/config_files/congress_api.json:/var/lib/kolla/config_files/config.json:ro - - /var/lib/config-data/congress/etc/congress/:/etc/congress/:ro + - /var/lib/config-data/puppet-generated/congress/:/var/lib/kolla/config_files/src:ro - /var/log/containers/congress:/var/log/congress environment: - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS -- cgit 1.2.3-korg