From 9e87ff60885709a3cdef903d10f9798b001926e2 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Thu, 3 Apr 2025 14:51:04 +0100 Subject: [PATCH 1/2] [2024.1 only] Extend base_tag check to cover more ubuntu base image tags https://hub.docker.com provides base Ubuntu images with two type of namings. For example for Ubuntu Noble, there are ``24.04``, ``noble`` and ``noble-20250127``. Currently whenever Kolla checks base tag to determine which Ubuntu release is being used, it only expects tag of version number. So if users use base tag with release codename, they will not get correct python version or other dependencies. Fixing this by extending all base_tag checks to include case for release codenames. Change-Id: Iab02de97cdde79db540c7336512d7014f9b71753 --- docker/base/Dockerfile.j2 | 8 ++++---- docker/bifrost/bifrost-base/Dockerfile.j2 | 2 +- docker/cinder/cinder-base/Dockerfile.j2 | 2 +- kolla/image/kolla_worker.py | 2 +- kolla/template/methods.py | 9 ++++++++- 5 files changed, 15 insertions(+), 8 deletions(-) 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: From 8b12d0e28da69541feb75e3c77bd17ab97da1154 Mon Sep 17 00:00:00 2001 From: Jack Hodgkiss Date: Tue, 15 Apr 2025 13:17:49 +0100 Subject: [PATCH 2/2] Update prometheus alertmanager to newest available version * prometheus-alertmanager: 0.28.0 -> 0.28.1 Change-Id: Iec5b936ae77f2d8298803fbfe50f55b2ed69f4b3 --- kolla/common/sources.py | 6 +++--- .../notes/update-alertmanager-a7291d4d43423657.yaml | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/update-alertmanager-a7291d4d43423657.yaml diff --git a/kolla/common/sources.py b/kolla/common/sources.py index 63dbd74256..b20cd9722c 100644 --- a/kolla/common/sources.py +++ b/kolla/common/sources.py @@ -278,11 +278,11 @@ 'location': ('$tarballs_base/openstack/placement/' 'placement-${openstack_branch}.tar.gz')}, 'prometheus-alertmanager': { - 'version': '0.28.0', + 'version': '0.28.1', 'type': 'url', 'sha256': { - 'amd64': '6b5a38d32cddef23aad4435a58c1ea39dc0a07b4b155029c601d200720da9ca4', # noqa: E501 - 'arm64': '70d7c85a364d5d5d20e36dfff6886fbc5e105822642d5603cc2f38340dd2f7ee'}, # noqa: E501 + 'amd64': '5ac7ab5e4b8ee5ce4d8fb0988f9cb275efcc3f181b4b408179fafee121693311', # noqa: E501 + 'arm64': 'd8832540e5b9f613d2fd759e31d603173b9c61cc7bb5e3bc7ae2f12038b1ce4f'}, # noqa: E501 'location': ('https://github.com/' 'prometheus/alertmanager/' 'releases/download/v${version}/' diff --git a/releasenotes/notes/update-alertmanager-a7291d4d43423657.yaml b/releasenotes/notes/update-alertmanager-a7291d4d43423657.yaml new file mode 100644 index 0000000000..3272c02674 --- /dev/null +++ b/releasenotes/notes/update-alertmanager-a7291d4d43423657.yaml @@ -0,0 +1,13 @@ +--- +upgrade: + - | + Upgrade prometheus alertmanager to newest available version + + * prometheus-alertmanager: 0.28.0 -> 0.28.1 +fixes: + - | + Resolves an issue with long text being truncated when using + Microsoft Teams as an alert destination. See `issue 4222 + `__ + for details. +