Skip to content

Commit 4bcfa2b

Browse files
authored
Merge pull request #641 from stackhpc/xena-wallaby-merge
xena: wallaby merge
2 parents 1a6271b + d60b0b9 commit 4bcfa2b

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
@@ -222,7 +222,8 @@ jobs:
222222
container-sync.yml \
223223
--repo stackhpc/stackhpc-release-train \
224224
--ref main \
225-
-f filter="$filter"
225+
-f filter="$filter" \
226+
-f sync-new-images=false
226227
env:
227228
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}
228229

etc/kayobe/kolla.yml

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

204+
# Whether to revert to the upstream mirrors in built Kolla container images.
205+
stackhpc_kolla_clean_up_repo_mirrors: true
206+
204207
# Dict mapping Jinja2 block names in kolla's Docker images to their contents.
205208
kolla_build_blocks:
206209
base_header: |
207210
{% if kolla_base_distro == 'centos' %}
208211
RUN \
212+
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
213+
mkdir -p /etc/yum.repos.d.backup && \
214+
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
215+
{% endif %}
209216
{% for repo in stackhpc_centos_stream_repos %}
210217
sed -i -e 's/^\(mirrorlist *=.*\)/#\1/g' \
211218
-e 's/^[# ]*\(baseurl *=.*\)/#\1/g' \
@@ -216,11 +223,34 @@ kolla_build_blocks:
216223
base_centos_repo_overrides_post_yum: |
217224
{# fixme #}
218225
&& \
226+
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
227+
tar -xzf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d && \
228+
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
229+
{% endif %}
219230
{% for repo in stackhpc_centos_stream_repos + stackhpc_epel_repos + stackhpc_centos_additional_repos + stackhpc_third_party_repos %}
220231
sed -i -e 's/^\(mirrorlist *=.*\)/#\1/g' \
221232
-e 's/^[# ]*\(baseurl *=.*\)/#\1/g' \
222233
-e '/#baseurl.*/a baseurl={{ repo.url }}' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} &&{% endif %} \
223234
{% endfor %}
235+
footer: |
236+
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
237+
{% if kolla_base_distro == 'centos' %}
238+
RUN \
239+
tar -xzf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d && \
240+
if grep -r '{{ stackhpc_repo_mirror_url }}' /etc/yum.repos.d; then \
241+
echo "Found repository mirror in Yum repositories"; \
242+
exit 1; \
243+
fi && \
244+
rm -rf /etc/yum.repos.d.backup/
245+
{% else %}
246+
# RUN \
247+
# mv /etc/apt/sources.list.backup /etc/apt/sources.list && \
248+
# if grep -r '{{ stackhpc_repo_mirror_url }}' /etc/apt/sources.list; then \
249+
# echo "Found repository mirror in APT repositories"; \
250+
# exit 1; \
251+
# fi
252+
{% endif %}
253+
{% endif %}
224254
# NOTE: The Open vSwitch and OVN packages in Ubuntu Wallaby UCA repository
225255
# are quite old - 2.15 and 20.12 respectively. Pull in these packages from
226256
# the Yoga UCA, which are 2.17 and 22.03, to more closely match the CentOS
@@ -247,7 +277,7 @@ kolla_build_blocks:
247277
# sometimes).
248278
# base_ubuntu_package_sources_list: |
249279
# RUN \
250-
# rm -f /etc/apt/sources.list && \
280+
# mv /etc/apt/sources.list{,.backup} && \
251281
# {% for repo in stackhpc_ubuntu_focal_repos %}
252282
# echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
253283
# {% endif %}
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)