diff options
Diffstat (limited to 'kolla')
| -rw-r--r-- | kolla/docker/base/Dockerfile.j2 | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/kolla/docker/base/Dockerfile.j2 b/kolla/docker/base/Dockerfile.j2 index 731aaaf60..660da3bdb 100644 --- a/kolla/docker/base/Dockerfile.j2 +++ b/kolla/docker/base/Dockerfile.j2 @@ -151,9 +151,12 @@ RUN {{ macros.install_packages(base_rocky_yum_repo_packages | customizable("rock # Install base packages {{ macros.enable_extra_repos(['epel']) }} {# NOTE(mnasiadka): systemd (pulled in by lvm2 and iscsi-initiator-utils) creates - /etc/machine-id, which must not be shared by all containers. #} + /etc/machine-id, which must not be shared by all containers. + NOTE(wszumski): Leave an empty file rather than removing it. systemd treats + a missing /etc/machine-id as first boot and enables all units according to + presets, e.g. firewalld in bifrost. An empty file gets a transient ID. #} {{ macros.install_packages(base_rocky_packages | customizable("rocky_packages")) }} \ - && rm -f /etc/machine-id + && truncate -s 0 /etc/machine-id {# endif for base_package_type rpm #} {% elif base_package_type == 'deb' %} @@ -298,8 +301,9 @@ RUN apt-get --error-on=any update \ && apt-get -y dist-upgrade \ && {{ macros.install_packages(base_apt_packages | customizable('apt_packages'), True) }} \ {#- NOTE(mnasiadka): systemd creates /etc/machine-id, which must not be - shared by all containers. #} - && rm -f /etc/machine-id \ + shared by all containers. Leave an empty file, as a missing one + triggers first boot presets. #} + && truncate -s 0 /etc/machine-id \ # NOTE: python3-pip installs dependent tzdata package and blocks mount in docker - 2091161 && unlink /etc/localtime |
