Skip to content

Commit 6faeac5

Browse files
committed
Check if repos backup exists in kolla footer
When a child service is build, such as neutron-infoblox-ipam-agent being a child of neutron-server, the fotoer is ran twice. This means it fails as the repo backup has already been moved.
1 parent 5c7e56b commit 6faeac5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

etc/kayobe/kolla.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,14 +351,17 @@ kolla_build_blocks:
351351
footer: |
352352
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
353353
{% if kolla_base_distro in ['centos', 'rocky'] %}
354+
{% if [ -f /etc/yum.repos.d.backup/repos.tar.gz ] %}
354355
RUN \
355356
tar -xzf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d && \
356357
if grep -r '{{ stackhpc_repo_mirror_url }}' /etc/yum.repos.d; then \
357358
echo "Found repository mirror in Yum repositories"; \
358359
exit 1; \
359360
fi && \
360361
rm -rf /etc/yum.repos.d.backup/
362+
{% endif %}
361363
{% else %}
364+
{% if [ -f /etc/apt/sources.list.backup ] %}
362365
RUN \
363366
mv /etc/apt/sources.list.backup /etc/apt/sources.list && \
364367
if grep -r '{{ stackhpc_repo_mirror_url }}' /etc/apt/sources.list; then \
@@ -367,6 +370,7 @@ kolla_build_blocks:
367370
fi
368371
{% endif %}
369372
{% endif %}
373+
{% endif %}
370374
bifrost_base_header: |
371375
ADD additions-archive /
372376
grafana_plugins_install: |

0 commit comments

Comments
 (0)