diff --git a/.zuul.yaml b/.zuul.yaml index 7c01fe860a..28459d4667 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -58,6 +58,16 @@ nodes: - controller +- nodeset: + name: devstack-single-node-centos-9-stream + nodes: + - name: controller + label: centos-9-stream + groups: + - name: tempest + nodes: + - controller + - nodeset: name: devstack-single-node-opensuse-15 nodes: @@ -583,6 +593,16 @@ vars: configure_swap_size: 4096 +- job: + name: devstack-platform-centos-9-stream + parent: tempest-full-py3 + description: CentOS 9 Stream platform test + nodeset: devstack-single-node-centos-9-stream + voting: false + timeout: 9000 + vars: + configure_swap_size: 4096 + - job: name: devstack-async parent: tempest-full-py3 @@ -669,6 +689,7 @@ - devstack-platform-bionic - devstack-platform-centos-8-stream - devstack-async + - devstack-platform-centos-9-stream - devstack-multinode - devstack-unit-tests - openstack-tox-bashate diff --git a/files/rpms/ceph b/files/rpms/ceph index 64befc5f00..33a55f80ea 100644 --- a/files/rpms/ceph +++ b/files/rpms/ceph @@ -1,3 +1,3 @@ ceph # NOPRIME -redhat-lsb-core +redhat-lsb-core # not:rhel9 xfsprogs diff --git a/files/rpms/n-cpu b/files/rpms/n-cpu index 68e5472685..7ce5a72d6b 100644 --- a/files/rpms/n-cpu +++ b/files/rpms/n-cpu @@ -1,9 +1,10 @@ cryptsetup dosfstools -genisoimage +genisoimage # not:rhel9 iscsi-initiator-utils libosinfo lvm2 sg3_utils # Stuff for diablo volumes sysfsutils +xorriso # not:rhel8 diff --git a/files/rpms/nova b/files/rpms/nova index 2218330230..3113907b31 100644 --- a/files/rpms/nova +++ b/files/rpms/nova @@ -4,7 +4,7 @@ dnsmasq # for q-dhcp dnsmasq-utils # for dhcp_release ebtables gawk -genisoimage # required for config_drive +genisoimage # not:rhel9 required for config_drive iptables iputils kernel-modules @@ -14,3 +14,4 @@ polkit rabbitmq-server # NOPRIME sqlite sudo +xorriso # not:rhel8 diff --git a/files/rpms/swift b/files/rpms/swift index 376c6f3df7..b6009a321e 100644 --- a/files/rpms/swift +++ b/files/rpms/swift @@ -4,4 +4,4 @@ memcached rsync-daemon sqlite xfsprogs -xinetd +xinetd # not:f34,rhel9 diff --git a/functions-common b/functions-common index 491bfaed25..1d2d293aa4 100644 --- a/functions-common +++ b/functions-common @@ -346,12 +346,19 @@ function _ensure_lsb_release { # - os_VENDOR # - os_PACKAGE function GetOSVersion { - # We only support distros that provide a sane lsb_release - _ensure_lsb_release + # CentOS Stream 9 does not provide lsb_release + source /etc/os-release + if [[ "${ID}${VERSION}" == "centos9" ]]; then + os_RELEASE=${VERSION_ID} + os_CODENAME="n/a" + os_VENDOR=$(echo $NAME | tr -d '[:space:]') + else + _ensure_lsb_release - os_RELEASE=$(lsb_release -r -s) - os_CODENAME=$(lsb_release -c -s) - os_VENDOR=$(lsb_release -i -s) + os_RELEASE=$(lsb_release -r -s) + os_CODENAME=$(lsb_release -c -s) + os_VENDOR=$(lsb_release -i -s) + fi if [[ $os_VENDOR =~ (Debian|Ubuntu|LinuxMint) ]]; then os_PACKAGE="deb" diff --git a/lib/nova b/lib/nova index 9f51cbde31..6484726589 100644 --- a/lib/nova +++ b/lib/nova @@ -492,7 +492,8 @@ function create_nova_conf { fi # nova defaults to genisoimage but only mkisofs is available for 15.0+ - if is_suse; then + # rhel provides mkisofs symlink to genisoimage or xorriso appropiately + if is_suse || is_fedora; then iniset $NOVA_CONF DEFAULT mkisofs_cmd /usr/bin/mkisofs fi diff --git a/stack.sh b/stack.sh index e786379296..a0ac3a76a6 100755 --- a/stack.sh +++ b/stack.sh @@ -227,7 +227,7 @@ write_devstack_version # Warn users who aren't on an explicitly supported distro, but allow them to # override check and attempt installation with ``FORCE=yes ./stack`` -SUPPORTED_DISTROS="bionic|focal|f31|f32|opensuse-15.2|opensuse-tumbleweed|rhel8" +SUPPORTED_DISTROS="bionic|focal|f31|f32|opensuse-15.2|opensuse-tumbleweed|rhel8|rhel9" if [[ ! ${DISTRO} =~ $SUPPORTED_DISTROS ]]; then echo "WARNING: this script has not been tested on $DISTRO" @@ -300,13 +300,17 @@ function _install_epel { } function _install_rdo { - if [[ "$TARGET_BRANCH" == "master" ]]; then - # rdo-release.el8.rpm points to latest RDO release, use that for master - sudo dnf -y install https://rdoproject.org/repos/rdo-release.el8.rpm - else - # For stable branches use corresponding release rpm - rdo_release=$(echo $TARGET_BRANCH | sed "s|stable/||g") - sudo dnf -y install https://rdoproject.org/repos/openstack-${rdo_release}/rdo-release-${rdo_release}.el8.rpm + if [[ $DISTRO == "rhel8" ]]; then + if [[ "$TARGET_BRANCH" == "master" ]]; then + # rdo-release.el8.rpm points to latest RDO release, use that for master + sudo dnf -y install https://rdoproject.org/repos/rdo-release.el8.rpm + else + # For stable branches use corresponding release rpm + rdo_release=$(echo $TARGET_BRANCH | sed "s|stable/||g") + sudo dnf -y install https://rdoproject.org/repos/openstack-${rdo_release}/rdo-release-${rdo_release}.el8.rpm + fi + elif [[ $DISTRO == "rhel9" ]]; then + sudo curl -L -o /etc/yum.repos.d/delorean-deps.repo http://trunk.rdoproject.org/centos9-master/delorean-deps.repo fi sudo dnf -y update } @@ -385,6 +389,10 @@ if [[ $DISTRO == "rhel8" ]]; then # RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1154272 # Patch: https://github.com/rpm-software-management/dnf/pull/1448 echo "[]" | sudo tee /var/cache/dnf/expired_repos.json +elif [[ $DISTRO == "rhel9" ]]; then + sudo dnf config-manager --set-enabled crb + # rabbitmq and other packages are provided by RDO repositories. + _install_rdo fi # Ensure python is installed diff --git a/tools/install_pip.sh b/tools/install_pip.sh index 735de112f7..50c543ca00 100755 --- a/tools/install_pip.sh +++ b/tools/install_pip.sh @@ -137,23 +137,29 @@ if [[ -n $PYPI_ALTERNATIVE_URL ]]; then configure_pypi_alternative_url fi -# Eradicate any and all system packages - -# Python in fedora/suse depends on the python-pip package so removing it -# results in a nonfunctional system. pip on fedora installs to /usr so pip -# can safely override the system pip for all versions of fedora -if ! is_fedora && ! is_suse; then - if is_package_installed python3-pip ; then - uninstall_package python3-pip +if is_fedora && [[ ${DISTRO} == f* || ${DISTRO} == rhel9 ]]; then + # get-pip.py will not install over the python3-pip package in + # Fedora 34 any more. + # https://bugzilla.redhat.com/show_bug.cgi?id=1988935 + # https://github.com/pypa/pip/issues/9904 + # You can still install using get-pip.py if python3-pip is *not* + # installed; this *should* remain separate under /usr/local and not break + # if python3-pip is later installed. + # For general sanity, we just use the packaged pip. It should be + # recent enough anyway. This is included via rpms/general + : # Simply fall through +else + if ! is_fedora && ! is_suse; then + if is_package_installed python3-pip ; then + uninstall_package python3-pip + fi fi + install_get_pip + # Note setuptools is part of requirements.txt and we want to make sure + # we obey any versioning as described there. + pip_install_gr setuptools fi -install_get_pip - set -x -# Note setuptools is part of requirements.txt and we want to make sure -# we obey any versioning as described there. -pip_install_gr setuptools - get_versions