From 5aabec47f057d9cb32aab520d666e51bd9ee37c6 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Wed, 17 Jun 2026 07:24:16 +0200 Subject: 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 --- kolla/docker/haproxy/haproxy-ssh/Dockerfile.j2 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kolla/docker/haproxy/haproxy-ssh') diff --git a/kolla/docker/haproxy/haproxy-ssh/Dockerfile.j2 b/kolla/docker/haproxy/haproxy-ssh/Dockerfile.j2 index a674cc75e..dda1c9d6f 100644 --- a/kolla/docker/haproxy/haproxy-ssh/Dockerfile.j2 +++ b/kolla/docker/haproxy/haproxy-ssh/Dockerfile.j2 @@ -7,6 +7,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='haproxy', shell='/bin/bash') }} {% if base_package_type == 'rpm' %} @@ -40,3 +42,4 @@ COPY update-loadbalancer-cert.sh /usr/bin/update-loadbalancer-cert {% block haproxy_ssh_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} -- cgit v1.2.3