From 006ccee101b3944eeb22299226d45520850dba0e Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Mon, 20 May 2024 14:29:01 +0100 Subject: [PATCH] Pass rabbitmq apt preferences into kolla-toolbox If the latest and targeted rabbitmq-server dependencies mismatch, kolla-toolbox will fail to build. Closes-Bug: #2066171 Change-Id: I64e9442545d98364585e3c632ae9142cd6b4f9bf --- docker/kolla-toolbox/Dockerfile.j2 | 6 ++++++ docker/kolla-toolbox/apt_preferences_rabbitmq.debian | 1 + docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu | 1 + ...rmq-preferences-into-kolla-toolbox-32d7209c4cf1f3c9.yaml | 6 ++++++ 4 files changed, 14 insertions(+) create mode 120000 docker/kolla-toolbox/apt_preferences_rabbitmq.debian create mode 120000 docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu create mode 100644 releasenotes/notes/pass-rmq-preferences-into-kolla-toolbox-32d7209c4cf1f3c9.yaml diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index 413e57a415..fbca153e84 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -18,6 +18,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.enable_extra_repos(['crb', 'erlang', 'openvswitch', 'rabbitmq']) }} +{% block rabbitmq_apt_preferences %} +{% if base_package_type == 'deb' %} +COPY apt_preferences_rabbitmq.{{ base_distro }} /etc/apt/preferences.d/rabbitmq +{% endif %} +{% endblock %} + {% if base_package_type == 'rpm' %} {% set kolla_toolbox_packages = [ 'crudini', diff --git a/docker/kolla-toolbox/apt_preferences_rabbitmq.debian b/docker/kolla-toolbox/apt_preferences_rabbitmq.debian new file mode 120000 index 0000000000..f1cc84d9be --- /dev/null +++ b/docker/kolla-toolbox/apt_preferences_rabbitmq.debian @@ -0,0 +1 @@ +../rabbitmq/apt_preferences_rabbitmq.debian \ No newline at end of file diff --git a/docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu b/docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu new file mode 120000 index 0000000000..f1cc84d9be --- /dev/null +++ b/docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu @@ -0,0 +1 @@ +../rabbitmq/apt_preferences_rabbitmq.debian \ No newline at end of file diff --git a/releasenotes/notes/pass-rmq-preferences-into-kolla-toolbox-32d7209c4cf1f3c9.yaml b/releasenotes/notes/pass-rmq-preferences-into-kolla-toolbox-32d7209c4cf1f3c9.yaml new file mode 100644 index 0000000000..4b3a23e3b1 --- /dev/null +++ b/releasenotes/notes/pass-rmq-preferences-into-kolla-toolbox-32d7209c4cf1f3c9.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue where kolla-toolbox will fail to build due to mismatched + rabbitmq-server dependencies. + `LP#2066171 `__