Skip to content

Commit

Permalink
Add CentOS Stream 9 / Rocky Linux 9 host support
Browse files Browse the repository at this point in the history
This is a backport from Zed.

cephadm bits to use package from distro backported from
I30f071865b9b0751f1336414a0ae82571a332530

Added c9s jobs are non voting, as agreed on PTG to focus on Rocky Linux 9.
Since both CS9 and RL9 have higher default fd limit (1073741816 vs
1048576 in CS8) - lowering that for:
* RMQ - because Erlang allocates memory based on this (see [1], [2], [3]).
* MariaDB - because Galera cluster bootstrap failed

Changed openvswitch_db healthcheck, because for unknown reason
the usual check (using lsof on /run/openvswitch/db.sock) is hanging
on "Bad file descriptor" (even with privileged: true).

Added kolla_base_distro_version helper var.

[1]: docker-library/rabbitmq#545
[2]: rabbitmq/cluster-operator#959 (comment)
[3]: systemd/systemd@a8b627a

Depends-On: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/864993
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/864971
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/864973
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/870499

Co-Authored-By: Michał Nasiadka <[email protected]>
Change-Id: I3f7b480519aea38c3927bee7fb2c23eea178554d
  • Loading branch information
Marcin Juszkiewicz and mnasiadka committed Feb 16, 2023
1 parent 3d40852 commit 5388aac
Show file tree
Hide file tree
Showing 13 changed files with 273 additions and 21 deletions.
10 changes: 9 additions & 1 deletion ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,14 @@ docker_common_options:
# Dimensions options
####################
# Dimension options for Docker Containers
default_container_dimensions: {}
# NOTE(mnasiadka): Lower 1073741816 nofile limit on EL9 (RHEL9/CentOS Stream 9/Rocky Linux 9)
# fixes at least rabbitmq and mariadb
default_container_dimensions: "{{ default_container_dimensions_el9 if (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '9') else '{}' }}"
default_container_dimensions_el9:
ulimits:
nofile:
soft: 1048576
hard: 1048576

#####################
# Healthcheck options
Expand Down Expand Up @@ -1175,6 +1182,7 @@ distro_python_version_map: {
}

distro_python_version: "{{ distro_python_version_map[kolla_base_distro] }}"
kolla_base_distro_version: "{{ ansible_facts.distribution_major_version }}"

##########
# Telegraf
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/openvswitch/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ openvswitch_db_enable_healthchecks: "{{ enable_container_healthchecks }}"
openvswitch_db_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
openvswitch_db_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
openvswitch_db_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
openvswitch_db_healthcheck_test: ["CMD-SHELL", "healthcheck_socket ovsdb-server /run/openvswitch/db.sock"]
openvswitch_db_healthcheck_test: ["CMD-SHELL", "ovsdb-client list-dbs"]
openvswitch_db_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
openvswitch_db_healthcheck:
interval: "{{ openvswitch_db_healthcheck_interval }}"
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/prechecks/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ ansible_version_max: '2.12'
host_os_distributions:
CentOS:
- "8"
- "9"
Debian:
- "bullseye"
openEuler:
- "20.03"
RHEL:
- "8"
- "9"
Rocky:
- "8"
- "9"
Ubuntu:
- "focal"
- "jammy"
1 change: 1 addition & 0 deletions roles/cephadm/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
cephadm_ceph_release: "pacific"
cephadm_ceph_apt_repo: "deb http://download.ceph.com/debian-{{ cephadm_ceph_release }}/ {{ ansible_distribution_release }} main"
cephadm_use_package_from_distribution: false

cephadm_ceph_rpm_repos:
- shortname: "ceph"
Expand Down
1 change: 1 addition & 0 deletions roles/cephadm/tasks/pkg_debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
repo: "{{ cephadm_ceph_apt_repo }}"
filename: ceph
become: True
when: not cephadm_use_package_from_distribution | bool
7 changes: 7 additions & 0 deletions roles/cephadm/tasks/pkg_redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
recurse: yes
become: True

- name: Install centos-release-ceph
dnf:
name: "centos-release-ceph-{{ cephadm_ceph_release }}"
become: True
when: cephadm_use_package_from_distribution | bool

- name: Enable Ceph base yum repository
yum_repository:
name: "{{ item.shortname }}"
Expand All @@ -14,3 +20,4 @@
gpgkey: "{{ cephadm_ceph_rpm_gpg_key }}"
loop: "{{ cephadm_ceph_rpm_repos }}"
become: True
when: not cephadm_use_package_from_distribution | bool
17 changes: 15 additions & 2 deletions tests/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,27 @@
tasks:
# NOTE(yoctozepto): we use gawk to add time to each logged line
# outside of Ansible (e.g. for init-runonce)
- name: Install gawk and Python modules
package:
- name: Install gawk and Python modules (Debian/Ubuntu)
apt:
name:
- gawk
- python3-pip
- python3-setuptools
- python3-wheel
become: true
when: ansible_facts.os_family == 'Debian'

# NOTE(mnasiadka): python3-wheel is in crb repo for EL9
- name: Install gawk and Python modules (RedHat)
dnf:
enablerepo: "crb"
name:
- gawk
- python3-pip
- python3-setuptools
- python3-wheel
become: true
when: ansible_facts.os_family == 'RedHat'

- name: Install lvm on storage scenarios
become: true
Expand Down
5 changes: 5 additions & 0 deletions tests/run-hashi-vault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
mode: 0777
become: true

- name: ensure python3-pip exists
package:
name: python3-pip
become: true

# NOTE(mgoddard): We need a recent pip to install the latest cryptography
# library. See https://github.com/pyca/cryptography/issues/5753
- name: install pip 19.1.1+
Expand Down
1 change: 1 addition & 0 deletions tests/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@
chdir: "{{ kolla_ansible_src_dir }}"
environment:
BASE_DISTRO: "{{ base_distro }}"
BASE_DISTRO_MAJOR_VERSION: "{{ ansible_distribution_major_version }}"
BUILD_IMAGE: "{{ need_build_image }}"
KOLLA_SRC_DIR: "{{ ansible_env.HOME }}/src/opendev.org/openstack/kolla"
SCENARIO: "{{ scenario }}"
Expand Down
9 changes: 9 additions & 0 deletions tests/setup_gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ function prepare_images {
return
fi

if [[ $BASE_DISTRO == "centos" ]] && [[ $BASE_DISTRO_MAJOR_VERSION -eq 9 ]]; then
sudo tee -a /etc/kolla/kolla-build.conf <<EOF
[DEFAULT]
base_tag = stream9
EOF

fi

if [[ $SCENARIO != "bifrost" ]]; then
GATE_IMAGES="^cron,^fluentd,^glance,^haproxy,^keepalived,^keystone,^kolla-toolbox,^mariadb,^memcached,^neutron,^nova-,^openvswitch,^rabbitmq,^horizon,^heat,^placement"
else
Expand Down
Loading

0 comments on commit 5388aac

Please sign in to comment.