diff options
| author | Michal Nasiadka <mnasiadka@gmail.com> | 2026-06-17 07:24:16 +0200 |
|---|---|---|
| committer | Michal Nasiadka <mnasiadka@gmail.com> | 2026-08-05 10:13:09 +0200 |
| commit | 5aabec47f057d9cb32aab520d666e51bd9ee37c6 (patch) | |
| tree | 181eecd8804b7dd6b47ffa768ab94565f751728b /kolla/docker/bifrost | |
| parent | 8e912a9db7f013a1abfc1e70a829e435d50622db (diff) | |
| download | kolla-5aabec47f057d9cb32aab520d666e51bd9ee37c6.tar.gz kolla-5aabec47f057d9cb32aab520d666e51bd9ee37c6.zip | |
Add cleanup_repos to revert build_only overrides
Repos marked build_only: true are backed up before handle_repos()
overwrites them and restored at the end of each image build, so CI
mirror URLs are not baked into the final image.
The cleanup RUN was injected into every Dockerfile, not just images
that called handle_repos() for those repos. Child images with no
backup fell through to "rm -f", deleting the inherited repo file
(e.g. debian.sources in bifrost-base, breaking cpio install).
Fix by adding a {repo}.enabled sentinel that handle_repos creates
when it processes a build_only repo, making the cleanup conditional
on that sentinel.
Change-Id: Ie5b9970a4575b6258dc238059d3f33ddfe155789
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Diffstat (limited to 'kolla/docker/bifrost')
| -rw-r--r-- | kolla/docker/bifrost/bifrost-base/Dockerfile.j2 | 5 | ||||
| -rw-r--r-- | kolla/docker/bifrost/bifrost-deploy/Dockerfile.j2 | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/kolla/docker/bifrost/bifrost-base/Dockerfile.j2 b/kolla/docker/bifrost/bifrost-base/Dockerfile.j2 index 3e82a9fd3..75e2fe822 100644 --- a/kolla/docker/bifrost/bifrost-base/Dockerfile.j2 +++ b/kolla/docker/bifrost/bifrost-base/Dockerfile.j2 @@ -7,6 +7,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set venv_path='/var/lib/kolla/venv' %} {{ macros.configure_user(name='bifrost') }} @@ -18,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% if base_package_type == 'rpm' %} {# NOTE(mgoddard): EPEL required for nginx #} -{{ macros.enable_extra_repos(['epel']) }} +{{ macros.enable_extra_repos(['crb', 'epel']) }} {% endif %} {{ macros.install_packages(bifrost_base_packages | customizable("packages")) }} @@ -74,3 +76,4 @@ RUN chmod 750 /etc/sudoers.d \ {{ macros.kolla_patch_sources() }} {% block bifrost_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/kolla/docker/bifrost/bifrost-deploy/Dockerfile.j2 b/kolla/docker/bifrost/bifrost-deploy/Dockerfile.j2 index 04fc733fc..3cb3d82a8 100644 --- a/kolla/docker/bifrost/bifrost-deploy/Dockerfile.j2 +++ b/kolla/docker/bifrost/bifrost-deploy/Dockerfile.j2 @@ -9,6 +9,8 @@ ENV container docker {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + RUN rm -f $(find /lib/systemd/system/sysinit.target.wants/ ! -name systemd-tmpfiles-setup.service -type l); \ rm -f /lib/systemd/system/multi-user.target.wants/*; \ rm -f /etc/systemd/system/*.wants/*; \ @@ -33,3 +35,4 @@ CMD [ "/sbin/init" ] {% block bifrost_deploy_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} |
