diff options
| author | Michal Nasiadka <mnasiadka@gmail.com> | 2026-11-15 19:05:38 -0600 |
|---|---|---|
| committer | Michal Nasiadka <mnasiadka@gmail.com> | 2026-11-22 08:43:12 +0000 |
| commit | 542febbb12c619ee25cbb94b31fff6f916bcff33 (patch) | |
| tree | 4fccd98b7117803db5a6078e25f5b3cc27826760 /kolla/docker/base/Dockerfile.j2 | |
| parent | e0bca6ad209b206ed0626574d102e8ab25a54cd9 (diff) | |
| download | kolla-542febbb12c619ee25cbb94b31fff6f916bcff33.tar.gz kolla-542febbb12c619ee25cbb94b31fff6f916bcff33.zip | |
base: Install full systemd on Debian and Ubuntu
Rocky images already ship full systemd, as lvm2 and
iscsi-initiator-utils in base hard-require it.
Debian and Ubuntu base install systemd-standalone-sysusers instead,
to keep systemd out because the OpenSearch packages call systemctl
in their postinst without checking whether systemd is running.
grafana, nova-compute and nova-libvirt pull in full systemd as a hard
dependency anyway, replacing systemd-standalone-sysusers in those images.
Install full systemd in base on Debian and Ubuntu, so that all
distributions behave the same, and while installing OpenSearch and
OpenSearch Dashboards replace systemctl and systemd-tmpfiles with
/bin/true using new disable_systemd_commands and
restore_systemd_commands macros.
Remove /etc/machine-id in base, as installing systemd creates it and
it would otherwise be shared by all containers.
Disable the Bifrost OCI artifact registry in bifrost-base, as
kolla-ansible already does. It runs podman as a systemd service,
which doesn't work inside a container, and installing it pulled
podman, buildah and systemd into the image.
Related-Bug: #2138705
Change-Id: I2e362eb89501c1dfc1daa42f764ef2b21046749c
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Diffstat (limited to 'kolla/docker/base/Dockerfile.j2')
| -rw-r--r-- | kolla/docker/base/Dockerfile.j2 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kolla/docker/base/Dockerfile.j2 b/kolla/docker/base/Dockerfile.j2 index c0f52b230..731aaaf60 100644 --- a/kolla/docker/base/Dockerfile.j2 +++ b/kolla/docker/base/Dockerfile.j2 @@ -150,7 +150,10 @@ RUN {{ macros.install_packages(base_rocky_yum_repo_packages | customizable("rock # Install base packages {{ macros.enable_extra_repos(['epel']) }} -{{ macros.install_packages(base_rocky_packages | customizable("rocky_packages")) }} +{# NOTE(mnasiadka): systemd (pulled in by lvm2 and iscsi-initiator-utils) creates + /etc/machine-id, which must not be shared by all containers. #} +{{ macros.install_packages(base_rocky_packages | customizable("rocky_packages")) }} \ + && rm -f /etc/machine-id {# endif for base_package_type rpm #} {% elif base_package_type == 'deb' %} @@ -228,7 +231,6 @@ COPY apt_preferences /etc/apt/preferences.d/kolla-custom {% set base_apt_packages = [ 'apt-utils', 'dumb-init', - 'systemd-standalone-sysusers', 'gawk', 'iproute2', 'kmod', @@ -248,6 +250,7 @@ COPY apt_preferences /etc/apt/preferences.d/kolla-custom 'python3-yaml', 'socat', 'sudo', + 'systemd', 'tgt', 'uuid-runtime', 'patch' @@ -294,6 +297,9 @@ RUN apt-get --error-on=any update \ && apt-get -y upgrade \ && 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 \ # NOTE: python3-pip installs dependent tzdata package and blocks mount in docker - 2091161 && unlink /etc/localtime |
