Skip to content

Commit 908d751

Browse files
committed
Merge stackhpc/xena into stackhpc/yoga
2 parents 18e4eb1 + d60b0b9 commit 908d751

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

.github/workflows/stackhpc-container-image-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ jobs:
231231
container-sync.yml \
232232
--repo stackhpc/stackhpc-release-train \
233233
--ref main \
234-
-f filter="$filter"
234+
-f filter="$filter" \
235+
-f sync-new-images=false
235236
env:
236237
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}
237238

etc/kayobe/kolla.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,18 @@ stackhpc_ubuntu_focal_repos:
285285
- "deb {{ stackhpc_repo_ubuntu_focal_security_url }} focal-security main universe"
286286
- "deb {{ stackhpc_repo_ubuntu_cloud_archive_url }} focal-updates/{{ openstack_release }} main"
287287

288+
# Whether to revert to the upstream mirrors in built Kolla container images.
289+
stackhpc_kolla_clean_up_repo_mirrors: true
290+
288291
# Dict mapping Jinja2 block names in kolla's Docker images to their contents.
289292
kolla_build_blocks:
290293
base_header: |
291294
{% if kolla_base_distro in ['centos', 'rocky'] %}
292295
RUN \
296+
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
297+
mkdir -p /etc/yum.repos.d.backup && \
298+
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
299+
{% endif %}
293300
{% for repo in stackhpc_yum_repos %}
294301
sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
295302
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
@@ -302,6 +309,10 @@ kolla_build_blocks:
302309
{# fixme #}
303310
{% if kolla_base_distro in ['centos', 'rocky'] %}
304311
&& \
312+
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
313+
tar -xzf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d && \
314+
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
315+
{% endif %}
305316
{% for repo in base_centos_repo_overrides_post_yum_list %}
306317
sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
307318
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
@@ -311,11 +322,30 @@ kolla_build_blocks:
311322
{% endif %}
312323
base_ubuntu_package_sources_list: |
313324
RUN \
314-
rm -f /etc/apt/sources.list && \
325+
mv /etc/apt/sources.list{,.backup} && \
315326
{% for repo in stackhpc_ubuntu_focal_repos %}
316327
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
317328
{% endif %}
318329
{% endfor %}
330+
footer: |
331+
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
332+
{% if kolla_base_distro == 'centos' %}
333+
RUN \
334+
tar -xzf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d && \
335+
if grep -r '{{ stackhpc_repo_mirror_url }}' /etc/yum.repos.d; then \
336+
echo "Found repository mirror in Yum repositories"; \
337+
exit 1; \
338+
fi && \
339+
rm -rf /etc/yum.repos.d.backup/
340+
{% else %}
341+
RUN \
342+
mv /etc/apt/sources.list.backup /etc/apt/sources.list && \
343+
if grep -r '{{ stackhpc_repo_mirror_url }}' /etc/apt/sources.list; then \
344+
echo "Found repository mirror in APT repositories"; \
345+
exit 1; \
346+
fi
347+
{% endif %}
348+
{% endif %}
319349
bifrost_base_header: |
320350
ADD additions-archive /
321351
grafana_plugins_install: |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Upstream package repository mirrors are now restored in Kolla container
5+
images. This makes it possible to install or update packages for debugging
6+
purposes.

0 commit comments

Comments
 (0)