Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Fix bind mount volumes for novajoin containers
Browse files Browse the repository at this point in the history
/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 53900ae)
  • Loading branch information
EmilienM authored and xek committed Jul 13, 2020
1 parent 6cf0b38 commit 03ab2f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deployment/nova/novajoin-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 03ab2f2

Please sign in to comment.