Browse Source

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 53900ae3a9)
changes/24/740624/1
Emilien Macchi 1 year ago
committed by Grzegorz Grasza
parent
commit
c276a7e307
  1. 4
      deployment/nova/novajoin-container-puppet.yaml

4
deployment/nova/novajoin-container-puppet.yaml

@ -190,7 +190,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
@ -208,7 +208,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

Loading…
Cancel
Save