Skip to content

Commit 82ee1e6

Browse files
committed
Add support for CentOS Stream 9
This changeset adds support for CentOS Stream 9. Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/864920 Change-Id: I113b9984294cf8663d3fc0c8840320e1d40ea731 (cherry picked from commit 878b000)
1 parent 9050b67 commit 82ee1e6

File tree

31 files changed

+341
-52
lines changed

31 files changed

+341
-52
lines changed

.zuul.d/base.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
- name: primary
6161
label: centos-8-stream
6262

63+
- nodeset:
64+
name: kolla-centos-9-stream
65+
nodes:
66+
- name: primary
67+
label: centos-9-stream
68+
6369
- nodeset:
6470
name: kolla-ubuntu-focal
6571
nodes:
@@ -78,6 +84,12 @@
7884
- name: primary
7985
label: centos-8-stream-arm64
8086

87+
- nodeset:
88+
name: kolla-centos-9-stream-aarch64
89+
nodes:
90+
- name: primary
91+
label: centos-9-stream-arm64
92+
8193
- nodeset:
8294
name: kolla-debian-bullseye-aarch64
8395
nodes:

.zuul.d/centos.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,40 @@
44
jobs:
55
- kolla-build-centos8s-binary
66
- kolla-build-centos8s-source
7+
- kolla-build-centos9s-source
78
- kolla-ansible-centos8s-source
89
- kolla-ansible-centos8s-binary
10+
- kolla-ansible-centos9s-source:
11+
vars:
12+
kolla_python_version: "3.9"
913
- kolla-ansible-centos8s-source-upgrade
1014
check-arm64:
1115
jobs:
1216
- kolla-build-centos8s-source-aarch64
17+
- kolla-build-centos9s-source-aarch64
1318
gate:
1419
jobs:
1520
- kolla-build-centos8s-source
21+
- kolla-build-centos9s-source
1622
- kolla-ansible-centos8s-source
23+
- kolla-ansible-centos9s-source:
24+
vars:
25+
kolla_python_version: "3.9"
1726
- kolla-ansible-centos8s-source-upgrade
1827
periodic:
1928
jobs:
2029
- kolla-publish-centos8s-source-quay
2130
- kolla-publish-centos8s-binary-quay
31+
- kolla-publish-centos8s-source-quay
2232
periodic-weekly:
2333
jobs:
2434
- kolla-publish-centos8s-source-dockerhub
2535
- kolla-publish-centos8s-binary-dockerhub
36+
- kolla-publish-centos8s-source-quay
2637
experimental:
2738
jobs:
2839
- kolla-build-no-infra-wheels-centos8s-source
40+
- kolla-build-no-infra-wheels-centos9s-source
2941
- kolla-ansible-centos8s-source-bifrost:
3042
files: ^docker\/(base|bifrost|openstack-base)\/.*
3143
# Test rabbitmq & mariadb changes in multinode ceph jobs.
@@ -93,12 +105,25 @@
93105
base_distro: centos
94106
install_type: source
95107

108+
- job:
109+
name: kolla-build-centos9s-source
110+
parent: kolla-base
111+
nodeset: kolla-centos-9-stream
112+
vars:
113+
base_distro: centos
114+
install_type: source
115+
96116
- job:
97117
name: kolla-build-centos8s-source-aarch64
98118
parent: kolla-build-centos8s-source
99119
nodeset: kolla-centos8-stream-aarch64
100120
voting: false
101121

122+
- job:
123+
name: kolla-build-centos9s-source-aarch64
124+
parent: kolla-build-centos9s-source
125+
nodeset: kolla-centos-9-stream-aarch64
126+
102127
- job:
103128
name: kolla-publish-centos8s-source-dockerhub
104129
parent: kolla-build-centos8s-source
@@ -128,3 +153,11 @@
128153
vars:
129154
base_distro: centos
130155
install_type: source
156+
157+
- job:
158+
name: kolla-build-no-infra-wheels-centos9s-source
159+
parent: kolla-build-no-infra-wheels-base
160+
nodeset: kolla-centos-9-stream
161+
vars:
162+
base_distro: centos
163+
install_type: source

docker/base/Dockerfile.j2

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,32 @@ COPY dnf.conf /etc/dnf/dnf.conf
5656
{% endblock %}
5757

5858
#### BEGIN REPO ENABLEMENT
59+
{#
60+
Repo files not available for CentOS Stream 9:
61+
'elasticsearch.repo', # signed with SHA1 key https://github.com/elastic/elasticsearch/issues/85876
62+
#}
5963
{% set base_yum_repo_files = [
60-
'elasticsearch.repo',
6164
'grafana.repo',
65+
'mariadb.repo',
6266
'proxysql.repo',
6367
'rabbitmq_rabbitmq-server.repo',
6468
'td.repo',
6569
] %}
6670

71+
{% if base_distro == "centos" and base_distro_tag.startswith('stream8') %}
72+
{% set base_yum_repo_files = base_yum_repo_files + [
73+
'elasticsearch.repo',
74+
] %}
75+
{% endif %}
76+
6777
{% set base_yum_url_packages = [
6878
] %}
6979

70-
{% set base_yum_repo_keys = [
80+
{#
81+
SHA1 keys are not supported in RHEL9: https://github.com/rpm-software-management/rpm/issues/1977
7182
'https://artifacts.elastic.co/GPG-KEY-elasticsearch',
72-
'https://packages.grafana.com/gpg.key',
83+
#}
84+
{% set base_yum_repo_keys = [
7385
'https://downloads.mariadb.com/MariaDB/RPM-GPG-KEY-MariaDB',
7486
'https://repo.proxysql.com/ProxySQL/repo_pub_key',
7587
'https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc',
@@ -79,7 +91,6 @@ COPY dnf.conf /etc/dnf/dnf.conf
7991
{% if base_arch == 'x86_64' %}
8092
{% set base_yum_repo_files = base_yum_repo_files + [
8193
'influxdb.repo',
82-
'mariadb.repo',
8394
'rabbitmq_rabbitmq-erlang.repo',
8495
] %}
8596
# FIXME(mgoddard): Not available for CentOS 8 yet.
@@ -91,11 +102,10 @@ COPY dnf.conf /etc/dnf/dnf.conf
91102
{% elif base_arch == 'aarch64' %}
92103
{% set base_yum_repo_files = base_yum_repo_files + [
93104
'hrw-copr-erlang-for-rabbitmq.repo',
94-
'mariadb-aarch64.repo',
105+
'mariadb.repo',
95106
] %}
96107

97108
{% set base_yum_repo_keys = base_yum_repo_keys + [
98-
'https://packages.erlang-solutions.com/rpm/erlang_solutions.asc',
99109
] %}
100110
{% endif %}
101111

@@ -143,23 +153,53 @@ RUN rm -f /etc/rpm/macros.image-language-conf \
143153
{% set base_centos_yum_repo_keys = [
144154
] %}
145155

156+
{% if base_distro == 'centos' %}
157+
158+
{% if base_distro_tag.startswith('stream9') %}
159+
160+
{% set base_centos_yum_repo_packages = [
161+
'centos-release-openstack-yoga',
162+
'centos-release-opstools',
163+
'epel-release',
164+
] %}
165+
166+
{% else %}
167+
146168
{% set base_centos_yum_repo_packages = [
147169
'centos-release-nfv-extras',
148170
'centos-release-openstack-yoga',
171+
'centos-release-ceph-pacific',
172+
'centos-release-nfv-openvswitch',
149173
'centos-release-opstools',
150174
'epel-release',
151175
] %}
152176

177+
{% endif %}
178+
179+
{% endif %}
180+
153181
# We need 'dnf-plugins-core' for 'dnf config-manager'
154182
{% set base_centos_yum_repo_packages = base_centos_yum_repo_packages + [
155183
'dnf-plugins-core'
156184
] %}
157185
{% set base_centos_yum_repos_to_enable = [
158186
] %}
159187

160-
# FIXME(hrw): entries not starting with 'centos-' (and 'centos-nfv-ovs') are
161-
# from delorean or rdo-release-* package
162-
# https://review.rdoproject.org/r/c/rdo-infra/ansible-role-dlrn/+/33241
188+
{% if base_distro == 'centos' %}
189+
190+
{% if base_distro_tag.startswith('stream9') %}
191+
192+
{% set base_centos_yum_repos_to_disable = [
193+
'centos-ceph-pacific',
194+
'centos-nfv-openvswitch',
195+
'centos-opstools',
196+
'centos-rabbitmq-38',
197+
'epel',
198+
'influxdb',
199+
] %}
200+
201+
{% else %}
202+
163203
{% set base_centos_yum_repos_to_disable = [
164204
'centos-advanced-virtualization',
165205
'centos-ceph-pacific',
@@ -168,9 +208,12 @@ RUN rm -f /etc/rpm/macros.image-language-conf \
168208
'centos-opstools',
169209
'centos-rabbitmq-38',
170210
'epel',
171-
'epel-modular',
172211
] %}
173212

213+
{% endif %}
214+
215+
{% endif %}
216+
174217
{% if base_arch == 'x86_64' %}
175218
{% set base_centos_yum_repos_to_disable = base_centos_yum_repos_to_disable + [
176219
'influxdb',
@@ -197,9 +240,9 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen
197240

198241
{% block base_redhat_binary_versionlock %}{% endblock %}
199242

243+
{# NOTE(hrw): CentOS Stream 9 has curl-minimal, Rocky Linux 9 has curl so we do not install any #}
200244
{% set base_centos_packages = [
201245
'ca-certificates',
202-
'curl',
203246
'dumb-init',
204247
'findutils',
205248
'hostname',

docker/base/mariadb-aarch64.repo

Lines changed: 0 additions & 6 deletions
This file was deleted.

docker/base/mariadb.repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[mariadb]
22
name = MariaDB Server
3-
baseurl = https://dlm.mariadb.com/repo/mariadb-server/10.6/yum/rhel/8/x86_64
3+
baseurl = https://dlm.mariadb.com/repo/mariadb-server/10.6/yum/rhel/$releasever/$basearch
44
gpgcheck = 1
55
enabled = 0
66
module_hotfixes = 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[rabbitmq_rabbitmq-erlang]
22
name=rabbitmq_rabbitmq-erlang
3+
# https://www.rabbitmq.com/install-rpm.html lists "el/8" for CentOS Stream 9
34
baseurl=https://packagecloud.io/rabbitmq/erlang/el/8/$basearch
45
gpgcheck=1
56
enabled=0

docker/bifrost/bifrost-base/Dockerfile.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' && /bin/fa
1818

1919
{% elif install_type == 'source' %}
2020

21+
{% set bifrost_base_packages = [
22+
'cpio',
23+
] %}
24+
25+
{{ macros.install_packages(bifrost_base_packages | customizable("packages")) }}
26+
2127
ENV VENV /var/lib/kolla/venv
2228

2329
{% set bifrost_base_pip_packages = [

docker/collectd/Dockerfile.j2

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
3030
'collectd-dbi',
3131
'collectd-disk',
3232
'collectd-dns',
33-
'collectd-generic-jmx',
3433
'collectd-ipmi',
3534
'collectd-log_logstash',
3635
'collectd-logparser',
3736
'collectd-mcelog',
38-
'collectd-memcachec',
3937
'collectd-mysql',
4038
'collectd-netlink',
4139
'collectd-openldap',
@@ -56,15 +54,27 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
5654
'collectd-write_prometheus',
5755
] %}
5856

57+
{% if not base_distro_tag.startswith('stream9') %}
58+
{% set collectd_packages = collectd_packages + [
59+
'collectd-generic-jmx',
60+
'collectd-memcachec'
61+
] %}
62+
{% endif %}
63+
5964
{% if base_arch =='x86_64' %}
6065
{% set collectd_packages = collectd_packages + [
6166
'collectd-hugepages',
62-
'collectd-iptables',
6367
'collectd-pcie-errors',
6468
'collectd-pmu',
6569
'collectd-rdt',
6670
'collectd-turbostat'
6771
] %}
72+
73+
{% if not base_distro_tag.startswith('stream9') %}
74+
{% set collectd_packages = collectd_packages + [
75+
'collectd-iptables'
76+
] %}
77+
{% endif %}
6878
{% endif %}
6979

7080
{% endif %}

docker/cron/Dockerfile.j2

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1212
'cronie',
1313
'logrotate'
1414
] %}
15+
16+
{% if base_distro_tag.startswith('stream9') %}
17+
# NOTE(hrw): In RHEL 9 family it is done by systemd timer, we want cron to
18+
# handle it.
19+
COPY logrotate /etc/cron.daily/logrotate
20+
{% endif %}
21+
1522
{% elif base_package_type == 'deb' %}
1623
{% set cron_packages = [
1724
'cron',
@@ -21,7 +28,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
2128

2229
{{ macros.install_packages(cron_packages | customizable("packages")) }}
2330

31+
{% if base_distro_tag.startswith('stream9') %}
32+
COPY extend_start_el9.sh /usr/local/bin/kolla_extend_start
33+
{% else %}
2434
COPY extend_start.sh /usr/local/bin/kolla_extend_start
35+
{% endif %}
2536
RUN chmod 755 /usr/local/bin/kolla_extend_start
2637

2738
{% block cron_footer %}{% endblock %}

docker/cron/extend_start_el9.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
CRON_LOGROTATE_CURRENT_PATH="$(find /etc/cron* -name logrotate)"
4+
CRON_LOGROTATE_CURRENT_SCHEDULE=$(echo "${CRON_LOGROTATE_CURRENT_PATH}" | sed -r 's/(.*)(hourly|daily|weekly|monthly)(.*)/\2/g')
5+
6+
if [ -z $CRON_LOGROTATE_CURRENT_PATH ]; then
7+
echo "logrotate is not handled by cron"
8+
else
9+
# Pass only for hourly|daily|weekly|monthly
10+
if [[ "${KOLLA_LOGROTATE_SCHEDULE:-undefined}" =~ hourly|daily|weekly|monthly ]]; then
11+
12+
CRON_LOGROTATE_DESIRED_PATH="/etc/cron.${KOLLA_LOGROTATE_SCHEDULE}/logrotate"
13+
14+
if [[ "${CRON_LOGROTATE_CURRENT_PATH}" != "${CRON_LOGROTATE_DESIRED_PATH}" ]]; then
15+
mv ${CRON_LOGROTATE_CURRENT_PATH} ${CRON_LOGROTATE_DESIRED_PATH}
16+
CRON_LOGROTATE_CURRENT_SCHEDULE="${KOLLA_LOGROTATE_SCHEDULE}"
17+
fi
18+
fi
19+
20+
echo "[i] Cron schedule for logrotate is currently set to: ${CRON_LOGROTATE_CURRENT_SCHEDULE}."
21+
fi

0 commit comments

Comments
 (0)