Skip to content

Ubuntu: add base repos to Kolla container image earlier #733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions etc/kayobe/kolla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,20 @@ base_centos_repo_overrides_post_yum_rocky_list: "{{ stackhpc_rocky_9_repos + sta
base_centos_repo_overrides_post_yum_list: "{{ base_centos_repo_overrides_post_yum_centos_list if kolla_base_distro == 'centos' else base_centos_repo_overrides_post_yum_rocky_list }}"
stackhpc_yum_repos: "{{ stackhpc_centos_stream_repos if kolla_base_distro == 'centos' else stackhpc_rocky_9_repos }}"

# List of repositories for Ubuntu focal.
stackhpc_ubuntu_focal_repos:
# List of base repositories for Ubuntu Focal.
stackhpc_ubuntu_focal_base_repos:
- "deb {{ stackhpc_repo_ubuntu_focal_url }} focal main universe"
- "deb {{ stackhpc_repo_ubuntu_focal_url }} focal-updates main universe"
- "deb {{ stackhpc_repo_ubuntu_focal_url }} focal-backports main universe"
- "deb {{ stackhpc_repo_ubuntu_focal_security_url }} focal-security main universe"

# List of UCA repositories for Ubuntu Focal.
stackhpc_ubuntu_focal_uca_repos:
- "deb {{ stackhpc_repo_ubuntu_cloud_archive_url }} focal-updates/{{ openstack_release }} main"

# List of repositories for Ubuntu Focal.
stackhpc_ubuntu_focal_repos: "{{ stackhpc_ubuntu_focal_base_repos + stackhpc_ubuntu_focal_uca_repos }}"

# Whether to revert to the upstream mirrors in built Kolla container images.
stackhpc_kolla_clean_up_repo_mirrors: true

Expand All @@ -304,6 +310,13 @@ kolla_build_blocks:
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} && \
{% endif %}
{% endfor %}
{% else %}
RUN \
rm /etc/apt/sources.list && \
{% for repo in stackhpc_ubuntu_focal_base_repos %}
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
{% endif %}
{% endfor %}
{% endif %}
base_centos_repo_overrides_post_yum: |
{# fixme #}
Expand All @@ -320,9 +333,13 @@ kolla_build_blocks:
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} &&{% endif %} \
{% endfor %}
{% endif %}
# With the UCA keyring installed we can now add all repos.
base_ubuntu_package_sources_list: |
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
COPY sources.list.ubuntu /etc/apt/sources.list.backup
{% endif %}
RUN \
mv /etc/apt/sources.list /etc/apt/sources.list.backup && \
rm /etc/apt/sources.list && \
{% for repo in stackhpc_ubuntu_focal_repos %}
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue with Kolla container image builds for Ubuntu where the
release train package repositories could be behind the container image,
leading to image build failures.