diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index ea33be3000..57ee7be1d6 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -241,15 +241,15 @@ RUN cat /tmp/kolla_bashrc >> /etc/bash.bashrc \ RUN rm -f /etc/apt/sources.list.d/debian.sources COPY sources.list.{{ base_distro }} /etc/apt/sources.list {% elif ( base_distro == 'ubuntu' and base_arch == 'x86_64' ) %} -{% if base_distro_tag.startswith('22.04') %} +{% if base_distro_tag.startswith('22.04') or base_distro_tag.startswith('jammy') %} COPY sources.list.{{ base_distro }}.jammy /etc/apt/sources.list -{% elif base_distro_tag.startswith('24.04') %} +{% elif base_distro_tag.startswith('24.04') or base_distro_tag.startswith('noble') %} COPY sources.list.{{ base_distro }}.noble /etc/apt/sources.list {% endif %} {% else %} -{% if base_distro_tag.startswith('22.04') %} +{% if base_distro_tag.startswith('22.04') or base_distro_tag.startswith('jammy')%} COPY sources.list.{{ base_distro }}.jammy.{{ base_arch }} /etc/apt/sources.list -{% elif base_distro_tag.startswith('24.04') %} +{% elif base_distro_tag.startswith('24.04') or base_distro_tag.startswith('noble')%} COPY sources.list.{{ base_distro }}.noble.{{ base_arch }} /etc/apt/sources.list {% endif %} {% endif %} diff --git a/docker/bifrost/bifrost-base/Dockerfile.j2 b/docker/bifrost/bifrost-base/Dockerfile.j2 index b6267b670d..3eb21d04f2 100644 --- a/docker/bifrost/bifrost-base/Dockerfile.j2 +++ b/docker/bifrost/bifrost-base/Dockerfile.j2 @@ -37,7 +37,7 @@ ENV ANSIBLE_GATHER_TIMEOUT=30 {% block bifrost_ansible_install %} {%- if base_package_type == 'deb' %} RUN apt-get --error-on=any update && \ - {%- if base_distro_tag.startswith('24.04') %} + {%- if base_distro_tag.startswith('24.04') or base_distro_tag.startswith('noble') %} bash -c 'export VENV=/var/lib/kolla/venv && \ {# NOTE(darmach): Bumped to ansible-core 2.16 to match Python 3.12 #} $VENV/bin/pip install "ansible>=9,<10" && \ diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2 index 5b73abfb10..ae8597a187 100644 --- a/docker/cinder/cinder-base/Dockerfile.j2 +++ b/docker/cinder/cinder-base/Dockerfile.j2 @@ -32,7 +32,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% endif %} -{% if base_distro_tag.startswith('24.04') %} +{% if base_distro_tag.startswith('24.04') or base_distro_tag.startswith('noble') %} RUN {{ macros.upper_constraints_version_change("taskflow", "5.6.0", "5.8.0") }} {% endif %} diff --git a/kolla/image/kolla_worker.py b/kolla/image/kolla_worker.py index fe245fd090..7097899b78 100644 --- a/kolla/image/kolla_worker.py +++ b/kolla/image/kolla_worker.py @@ -122,7 +122,7 @@ def __init__(self, conf): self.distro_package_manager = 'apt' self.base_package_type = 'deb' elif self.base in ['ubuntu']: - if self.base_tag.startswith('24.04'): + if self.base_tag.startswith(('24.04', 'noble')): self.conf.distro_python_version = "3.12" else: self.conf.distro_python_version = "3.10" diff --git a/kolla/template/methods.py b/kolla/template/methods.py index f190845b68..4ab876f03c 100644 --- a/kolla/template/methods.py +++ b/kolla/template/methods.py @@ -96,7 +96,14 @@ def handle_repos(context, reponames, mode): repofile = context.get('repos_yaml') or ( os.path.dirname(os.path.realpath(__file__)) + - ('/repos-noble.yaml' if base_distro_tag == '24.04' else '/repos.yaml') + ( + '/repos-noble.yaml' + if ( + base_distro_tag and + base_distro_tag.startswith(('24.04', 'noble')) + ) + else '/repos.yaml' + ) ) with open(repofile, 'r') as repos_file: