From 03ab2f26d9c3b4971cea3d9cf1cfb502f6c745e9 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 6 Jul 2020 11:55:24 -0400 Subject: [PATCH] Fix bind mount volumes for novajoin containers /var/lib/config-data/novajoin should not be bind mounted directly. The way it works, is that a step 1 we generate all the config files with Puppet and put the /etc/novajoin content into /var/lib/config-data/novajoin and then filter out that is actually needed by the containers into /var/lib/config-data/puppet-generated/novajoin. /var/lib/config-data/puppet-generated/novajoin will have /var/lib/config-data/puppet-generated/novajoin/etc/novajoin with the config files but it won't have the files excluded by container-puppet.sh (e.g. host files, some CA/PKI files, etc). In the container configs, we want to bind mount /var/lib/config-data/puppet-generated/novajoin into /var/lib/config-data/puppet-generated/novajoin:/var/lib/kolla/config_files/src and when the container will start, Kolla will automatically copy the content of /var/lib/config-data/puppet-generated/novajoin:/var/lib/kolla/config_files/src into / by deep merging; so /etc/novajoin will have the config files. Closes-Bug: #1886047 Resolves: rhbz#1853268 Change-Id: I9d28b5f7f40d43e017153cb274a3f419e23511c3 (cherry picked from commit 53900ae3a9c15cfd6fe283bcb5baba8c21f2f70b) --- deployment/nova/novajoin-container-puppet.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/nova/novajoin-container-puppet.yaml b/deployment/nova/novajoin-container-puppet.yaml index 16d12a305e..425b4bf23a 100644 --- a/deployment/nova/novajoin-container-puppet.yaml +++ b/deployment/nova/novajoin-container-puppet.yaml @@ -196,7 +196,7 @@ outputs: - {get_attr: [ContainersCommon, volumes]} - - /var/lib/kolla/config_files/novajoin_server.json:/var/lib/kolla/config_files/config.json:ro - - /var/lib/config-data/novajoin/etc/novajoin/join.conf:/etc/novajoin/join.conf:z + - /var/lib/config-data/puppet-generated/novajoin:/var/lib/kolla/config_files/src:ro - /etc/ipa/:/etc/ipa/:ro - /etc/novajoin/krb5.keytab:/etc/novajoin/krb5.keytab:ro - /var/log/containers/novajoin:/var/log/novajoin @@ -214,7 +214,7 @@ outputs: - {get_attr: [ContainersCommon, volumes]} - - /var/lib/kolla/config_files/novajoin_notifier.json:/var/lib/kolla/config_files/config.json:ro - - /var/lib/config-data/novajoin/etc/novajoin/join.conf:/etc/novajoin/join.conf:z + - /var/lib/config-data/puppet-generated/novajoin:/var/lib/kolla/config_files/src:ro - /etc/ipa/:/etc/ipa/:ro - /etc/novajoin/krb5.keytab:/etc/novajoin/krb5.keytab:ro - /var/log/containers/novajoin:/var/log/novajoin