Skip to content

Commit

Permalink
rabbitmq: update to RabbitMQ 3.9 on Erlang 25
Browse files Browse the repository at this point in the history
Xena provides RabbitMQ 3.8 series with Erlang 23. Both are not supported
anymore.

This patch brings RabbitMQ up to 3.9 series with Erlang 25.

RabbitMQ 3.9 and Erlang 25 are final update in stable/xena branch.

According to upstream [1] 3.8 -> 3.9 migration is fine while 3.8 -> 3.10
should be done through 3.9 so we can not move to 3.10 version here.

1. https://www.rabbitmq.com/upgrade.html#rabbitmq-version-upgradability

Due to fact that 3.8 does not support Erlang 25 we do all updates at
once. Therefore this commit is composed of 3 backports from stable/yoga
branch:

------------------------------------------------------------------------

rabbitmq: use Erlang from PPA on Debian/Ubuntu

PPA from Team RabbitMQ [1] provides newer Erlang for Debian/Ubuntu.

This way we have latest Erlang on both distributions and both
architectures.

1. https://launchpad.net/~rabbitmq/+archive/ubuntu/rabbitmq-erlang

(manual cherry-pick from master commit
b40506f)

Id: I6b1407cc94ffa1893dac204cf4836a7d0ae0d575

------------------------------------------------------------------------

rabbitmq: bump Erlang version to 25.x

We decided to ship one Erlang version for all distributions and
architectures.

RabbitMQ 3.9.22+ requires Erlang 24.2+ and 24.3.4.2+ is recommended due
to CVE-2022-37026.

Id: I1eb1e1bd2bf74dbef214d458cbde13aa8c2a286f

------------------------------------------------------------------------

rabbitmq/aarch64: use COPR for Erlang

RabbitMQ team maintains RPM package in Github repo [1]. Hrw then use it
to build package using COPR service [2].

This way we have latest Erlang on both distributions and both
architectures.

1. https://github.com/rabbitmq/erlang-rpm/
2. https://copr.fedorainfracloud.org/coprs/hrw/erlang-for-rabbitmq/

(manual cherry-pick from master commit
e104ef7)

Id: I6a6a9c3d5ffff884fc61baeafcc46ad82afc3db3

------------------------------------------------------------------------

Change-Id: I3e2b37f106ccc096a7aede7b07197219373610e9
  • Loading branch information
hrw authored and Marcin Juszkiewicz committed Oct 28, 2022
1 parent 75a21a4 commit f3edd4d
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 30 deletions.
8 changes: 4 additions & 4 deletions docker/base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ COPY dnf.conf /etc/dnf/dnf.conf
{% elif base_arch == 'aarch64' %}
{% set base_yum_repo_files = [
'elasticsearch.repo',
'erlang-solutions.repo',
'hrw-copr-erlang-for-rabbitmq.repo',
'grafana.repo',
'mariadb-aarch64.repo',
'proxysql.repo',
Expand Down Expand Up @@ -322,9 +322,9 @@ COPY apt_preferences /etc/apt/preferences.d/kolla-custom
] %}

{% set base_apt_keys = [
{'name': 'erlang', 'keyid': 'E495BB49CC4BBE5B'},
{'name': 'rabbitmq', 'keyid': '9F4587F226208342'},
{'name': 'haproxy', 'keyid': 'CFFB779AADC995E4F350A060505D97A41C61B9CD'},
{'name': 'erlang-ppa', 'keyid': 'F77F1EDA57EBB1CC'},
{'name': 'rabbitmq', 'keyid': '9F4587F226208342'},
{'name': 'haproxy', 'keyid': 'CFFB779AADC995E4F350A060505D97A41C61B9CD'},
] %}

{# NOTE(hrw): type field defaults to 'asc' which is used for single keys #}
Expand Down
5 changes: 2 additions & 3 deletions docker/base/apt_preferences.debian
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Package: rabbitmq-server
Pin: version 3.8.*
Pin: version 3.9.*
Pin-Priority: 1000

# RabbitMQ wants 23+ and we want to stay on 23 if possible
Package: erlang*
Pin: version 1:23.*
Pin: version 1:25.*
Pin-Priority: 1000

# NOTE(mgoddard): logstash 7.9.x is the last version that supports
Expand Down
4 changes: 2 additions & 2 deletions docker/base/apt_preferences.ubuntu
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Package: rabbitmq-server
Pin: version 3.8.*
Pin: version 3.9.*
Pin-Priority: 1000

Package: erlang*
Pin: version 1:23.*
Pin: version 1:25.*
Pin-Priority: 1000

# NOTE(mgoddard): logstash 7.9.x is the last version that supports
Expand Down
6 changes: 0 additions & 6 deletions docker/base/erlang-solutions.repo

This file was deleted.

11 changes: 11 additions & 0 deletions docker/base/hrw-copr-erlang-for-rabbitmq.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# NOTE(hrw): this repository contains rebuild of Erlang package from RabbitMQ team
# from https://github.com/rabbitmq/erlang-rpm/
# Thanks to COPR we have aarch64 packages for CentOS Stream 8/9

[copr-hrw-erlang-for-rabbitmq]
name=Hrw's COPR with Erlang build for RabbitMQ
baseurl=https://download.copr.fedorainfracloud.org/results/hrw/erlang-for-rabbitmq/centos-stream-$releasever-$basearch/
gpgcheck=1
enabled=0
gpgkey=https://download.copr.fedorainfracloud.org/results/hrw/erlang-for-rabbitmq/pubkey.gpg
repo_gpgcheck=0
4 changes: 2 additions & 2 deletions docker/kolla-toolbox/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{% set kolla_toolbox_packages = [
'crudini',
'erlang-23.*',
'erlang-25.*',
'gcc',
'gdisk',
'git',
Expand All @@ -39,7 +39,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'openssl-devel',
'openvswitch',
'python3-devel',
'rabbitmq-server-3.8.*'
'rabbitmq-server-3.9.*'
] %}

{% elif base_package_type == 'deb' %}
Expand Down
4 changes: 2 additions & 2 deletions docker/rabbitmq/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% if base_package_type == 'rpm' %}

{% set rabbitmq_packages = [
'erlang-23.*',
'erlang-25.*',
'hostname',
'rabbitmq-server-3.8.*'
'rabbitmq-server-3.9.*'
] %}

{% elif base_package_type == 'deb' %}
Expand Down
22 changes: 11 additions & 11 deletions kolla/template/repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ centos-aarch64:
elasticsearch: "elasticsearch-kibana-logstash-7.x"
epel: "epel"
epel-modular: "epel-modular"
erlang: "erlang-solutions"
erlang: "copr-hrw-erlang-for-rabbitmq"
extras: "extras"
grafana: "grafana"
hacluster: "ha"
Expand All @@ -49,10 +49,10 @@ debian:
component: "main"
gpg_key: "elasticsearch.asc"
erlang:
url: "https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/debian"
suite: "bullseye"
url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu"
suite: "focal"
component: "main"
gpg_key: "erlang.gpg"
gpg_key: "erlang-ppa.gpg"
grafana:
url: "https://packages.grafana.com/oss/deb"
suite: "stable"
Expand Down Expand Up @@ -101,10 +101,10 @@ debian-aarch64:
component: "main"
gpg_key: "elasticsearch.asc"
erlang:
url: "https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/debian"
suite: "bullseye"
url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu"
suite: "focal"
component: "main"
gpg_key: "erlang.gpg"
gpg_key: "erlang-ppa.gpg"
grafana:
url: "https://packages.grafana.com/oss/deb"
suite: "stable"
Expand Down Expand Up @@ -153,10 +153,10 @@ ubuntu:
component: "main"
gpg_key: "elasticsearch.asc"
erlang:
url: "https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/ubuntu"
url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu"
suite: "focal"
component: "main"
gpg_key: "erlang.gpg"
gpg_key: "erlang-ppa.gpg"
grafana:
url: "https://packages.grafana.com/oss/deb"
suite: "stable"
Expand Down Expand Up @@ -210,10 +210,10 @@ ubuntu-aarch64:
component: "main"
gpg_key: "elasticsearch.asc"
erlang:
url: "https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/ubuntu"
url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu"
suite: "focal"
component: "main"
gpg_key: "erlang.gpg"
gpg_key: "erlang-ppa.gpg"
grafana:
url: "https://packages.grafana.com/oss/deb"
suite: "stable"
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/rabbitmq-3.9-2b7dc15995b823cc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
RabbitMQ version has been updated to 3.9 and ERLang has been updated to 25.
Previously used versions (3.8 and 23) have been marked as end-of-life and
are not supported anymore as of August 2022.

0 comments on commit f3edd4d

Please sign in to comment.