Merge "openEuler 20.03 LTS SP2 support"

This commit is contained in:
Zuul 2021-12-30 12:04:44 +00:00 committed by Gerrit Code Review
commit 3155217fb6
12 changed files with 80 additions and 22 deletions

View File

@ -106,6 +106,16 @@
nodes: nodes:
- controller - controller
- nodeset:
name: devstack-single-node-openeuler-20.03-sp2
nodes:
- name: controller
label: openEuler-20-03-LTS-SP2
groups:
- name: tempest
nodes:
- controller
- nodeset: - nodeset:
name: openstack-two-node name: openstack-two-node
nodes: nodes:
@ -684,6 +694,20 @@
# Enable Neutron ML2/OVS services # Enable Neutron ML2/OVS services
q-agt: true q-agt: true
- job:
name: devstack-platform-openEuler-20.03-SP2
parent: tempest-full-py3
description: openEuler 20.03 SP2 platform test
nodeset: devstack-single-node-openeuler-20.03-sp2
voting: false
timeout: 9000
vars:
configure_swap_size: 4096
devstack_localrc:
# NOTE(wxy): OVN package is not supported by openEuler yet. Build it
# from source instead.
OVN_BUILD_FROM_SOURCE: True
- job: - job:
name: devstack-no-tls-proxy name: devstack-no-tls-proxy
parent: tempest-full-py3 parent: tempest-full-py3
@ -789,6 +813,7 @@
- devstack-platform-centos-8-stream - devstack-platform-centos-8-stream
- devstack-platform-centos-9-stream - devstack-platform-centos-9-stream
- devstack-platform-debian-bullseye - devstack-platform-debian-bullseye
- devstack-platform-openEuler-20.03-SP2
- devstack-multinode - devstack-multinode
- devstack-unit-tests - devstack-unit-tests
- openstack-tox-bashate - openstack-tox-bashate

View File

@ -38,7 +38,7 @@ Install Linux
Start with a clean and minimal install of a Linux system. DevStack Start with a clean and minimal install of a Linux system. DevStack
attempts to support the two latest LTS releases of Ubuntu, the attempts to support the two latest LTS releases of Ubuntu, the
latest/current Fedora version, CentOS/RHEL 8 and OpenSUSE. latest/current Fedora version, CentOS/RHEL 8, OpenSUSE and openEuler.
If you do not have a preference, Ubuntu 20.04 (Focal Fossa) is the If you do not have a preference, Ubuntu 20.04 (Focal Fossa) is the
most tested, and will probably go the smoothest. most tested, and will probably go the smoothest.

View File

@ -1,3 +1,3 @@
ceph # NOPRIME ceph # NOPRIME
redhat-lsb-core # not:rhel9 redhat-lsb-core # not:rhel9,openEuler-20.03
xfsprogs xfsprogs

View File

@ -16,6 +16,7 @@ libjpeg-turbo-devel # Pillow 3.0.0
libxml2-devel # lxml libxml2-devel # lxml
libxslt-devel # lxml libxslt-devel # lxml
libyaml-devel libyaml-devel
make # dist:openEuler-20.03
net-tools net-tools
openssh-server openssh-server
openssl openssl
@ -27,7 +28,8 @@ psmisc
python3-devel python3-devel
python3-pip python3-pip
python3-systemd python3-systemd
redhat-rpm-config # missing dep for gcc hardening flags, see rhbz#1217376 redhat-rpm-config # not:openEuler-20.03 missing dep for gcc hardening flags, see rhbz#1217376
systemd-devel # dist:openEuler-20.03
tar tar
tcpdump tcpdump
unzip unzip

View File

@ -6,7 +6,7 @@ ebtables
genisoimage # not:rhel9 required for config_drive genisoimage # not:rhel9 required for config_drive
iptables iptables
iputils iputils
kernel-modules kernel-modules # not:openEuler-20.03
kpartx kpartx
parted parted
polkit polkit

View File

@ -1,5 +1,5 @@
curl curl
liberasurecode-devel liberasurecode-devel # not:openEuler-20.03
memcached memcached
rsync-daemon rsync-daemon
sqlite sqlite

View File

@ -388,7 +388,7 @@ function _ensure_lsb_release {
elif [[ -x $(command -v zypper 2>/dev/null) ]]; then elif [[ -x $(command -v zypper 2>/dev/null) ]]; then
sudo zypper -n install lsb-release sudo zypper -n install lsb-release
elif [[ -x $(command -v dnf 2>/dev/null) ]]; then elif [[ -x $(command -v dnf 2>/dev/null) ]]; then
sudo dnf install -y redhat-lsb-core sudo dnf install -y redhat-lsb-core || sudo dnf install -y openeuler-lsb
else else
die $LINENO "Unable to find or auto-install lsb_release" die $LINENO "Unable to find or auto-install lsb_release"
fi fi
@ -459,6 +459,10 @@ function GetDistro {
# Drop the . release as we assume it's compatible # Drop the . release as we assume it's compatible
# XXX re-evaluate when we get RHEL10 # XXX re-evaluate when we get RHEL10
DISTRO="rhel${os_RELEASE::1}" DISTRO="rhel${os_RELEASE::1}"
elif [[ "$os_VENDOR" =~ (openEuler) ]]; then
# The DISTRO here is `openEuler-20.03`. While, actually only openEuler
# 20.03 LTS SP2 is fully tested. Other SP version maybe have bugs.
DISTRO="openEuler-$os_RELEASE"
else else
# We can't make a good choice here. Setting a sensible DISTRO # We can't make a good choice here. Setting a sensible DISTRO
# is part of the problem, but not the major issue -- we really # is part of the problem, but not the major issue -- we really
@ -510,6 +514,7 @@ function is_fedora {
fi fi
[ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || \ [ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || \
[ "$os_VENDOR" = "openEuler" ] || \
[ "$os_VENDOR" = "RedHatEnterpriseServer" ] || \ [ "$os_VENDOR" = "RedHatEnterpriseServer" ] || \
[ "$os_VENDOR" = "RedHatEnterprise" ] || \ [ "$os_VENDOR" = "RedHatEnterprise" ] || \
[ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "CentOSStream" ] || \ [ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "CentOSStream" ] || \
@ -558,7 +563,12 @@ function is_ubuntu {
[ "$os_PACKAGE" = "deb" ] [ "$os_PACKAGE" = "deb" ]
} }
function is_openeuler {
if [[ -z "$os_PACKAGE" ]]; then
GetOSVersion
fi
[ "$os_VENDOR" = "openEuler" ]
}
# Git Functions # Git Functions
# ============= # =============

View File

@ -82,19 +82,10 @@ function install_apache_uwsgi {
apxs="apxs" apxs="apxs"
fi fi
# This varies based on packaged/installed. If we've
# pip_installed, then the pip setup will only build a "python"
# module that will be either python2 or python3 depending on what
# it was built with.
#
# For package installs, the distro ships both plugins and you need
# to select the right one ... it will not be autodetected.
UWSGI_PYTHON_PLUGIN=python3
if is_ubuntu; then if is_ubuntu; then
local pkg_list="uwsgi uwsgi-plugin-python3 libapache2-mod-proxy-uwsgi" local pkg_list="uwsgi uwsgi-plugin-python3 libapache2-mod-proxy-uwsgi"
install_package ${pkg_list} install_package ${pkg_list}
elif is_fedora; then elif is_fedora && ! is_openeuler; then
# Note httpd comes with mod_proxy_uwsgi and it is loaded by # Note httpd comes with mod_proxy_uwsgi and it is loaded by
# default; the mod_proxy_uwsgi package actually conflicts now. # default; the mod_proxy_uwsgi package actually conflicts now.
# See: # See:
@ -122,7 +113,6 @@ function install_apache_uwsgi {
popd popd
# delete the temp directory # delete the temp directory
sudo rm -rf $dir sudo rm -rf $dir
UWSGI_PYTHON_PLUGIN=python
fi fi
if is_ubuntu || is_suse ; then if is_ubuntu || is_suse ; then
@ -283,7 +273,7 @@ function write_uwsgi_config {
# configured after graceful shutdown # configured after graceful shutdown
iniset "$file" uwsgi worker-reload-mercy $WORKER_TIMEOUT iniset "$file" uwsgi worker-reload-mercy $WORKER_TIMEOUT
iniset "$file" uwsgi enable-threads true iniset "$file" uwsgi enable-threads true
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN} iniset "$file" uwsgi plugins http,python3
# uwsgi recommends this to prevent thundering herd on accept. # uwsgi recommends this to prevent thundering herd on accept.
iniset "$file" uwsgi thunder-lock true iniset "$file" uwsgi thunder-lock true
# Set hook to trigger graceful shutdown on SIGTERM # Set hook to trigger graceful shutdown on SIGTERM
@ -336,7 +326,7 @@ function write_local_uwsgi_http_config {
iniset "$file" uwsgi die-on-term true iniset "$file" uwsgi die-on-term true
iniset "$file" uwsgi exit-on-reload false iniset "$file" uwsgi exit-on-reload false
iniset "$file" uwsgi enable-threads true iniset "$file" uwsgi enable-threads true
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN} iniset "$file" uwsgi plugins http,python3
# uwsgi recommends this to prevent thundering herd on accept. # uwsgi recommends this to prevent thundering herd on accept.
iniset "$file" uwsgi thunder-lock true iniset "$file" uwsgi thunder-lock true
# Set hook to trigger graceful shutdown on SIGTERM # Set hook to trigger graceful shutdown on SIGTERM

View File

@ -90,7 +90,7 @@ function install_libvirt {
install_package libvirt libvirt-devel python3-libvirt install_package libvirt libvirt-devel python3-libvirt
if is_arch "aarch64"; then if is_arch "aarch64"; then
install_package edk2.git-aarch64 install_package edk2-aarch64
fi fi
fi fi

View File

@ -64,6 +64,7 @@
'Debian': '/etc/apache2/sites-enabled/' 'Debian': '/etc/apache2/sites-enabled/'
'Suse': '/etc/apache2/conf.d/' 'Suse': '/etc/apache2/conf.d/'
'RedHat': '/etc/httpd/conf.d/' 'RedHat': '/etc/httpd/conf.d/'
'openEuler': '/etc/httpd/conf.d/'
- name: Discover configurations - name: Discover configurations
find: find:

View File

@ -227,7 +227,7 @@ write_devstack_version
# Warn users who aren't on an explicitly supported distro, but allow them to # Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``FORCE=yes ./stack`` # override check and attempt installation with ``FORCE=yes ./stack``
SUPPORTED_DISTROS="bullseye|focal|f34|opensuse-15.2|opensuse-tumbleweed|rhel8|rhel9" SUPPORTED_DISTROS="bullseye|focal|f34|opensuse-15.2|opensuse-tumbleweed|rhel8|rhel9|openEuler-20.03"
if [[ ! ${DISTRO} =~ $SUPPORTED_DISTROS ]]; then if [[ ! ${DISTRO} =~ $SUPPORTED_DISTROS ]]; then
echo "WARNING: this script has not been tested on $DISTRO" echo "WARNING: this script has not been tested on $DISTRO"
@ -278,6 +278,12 @@ chmod 0440 $TEMPFILE
sudo chown root:root $TEMPFILE sudo chown root:root $TEMPFILE
sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh
# TODO(wxy): Currently some base packages are not installed by default in
# openEuler. Remove the code below once the packaged are installed by default
# in the future.
if [[ $DISTRO == "openEuler-20.03" ]]; then
install_package hostname
fi
# Configure Distro Repositories # Configure Distro Repositories
# ----------------------------- # -----------------------------

View File

@ -148,8 +148,32 @@ function fixup_ubuntu {
sudo rm -rf /usr/lib/python3/dist-packages/simplejson-*.egg-info sudo rm -rf /usr/lib/python3/dist-packages/simplejson-*.egg-info
} }
function fixup_openeuler {
if ! is_openeuler; then
return
fi
if is_arch "x86_64"; then
arch="x86_64"
elif is_arch "aarch64"; then
arch="aarch64"
fi
# Some packages' version in openEuler are too old, use the newer ones we
# provide in oepkg. (oepkg is an openEuler third part yum repo which is
# endorsed by openEuler community)
(echo '[openstack-ci]'
echo 'name=openstack'
echo 'baseurl=https://repo.oepkgs.net/openEuler/rpm/openEuler-20.03-LTS-SP2/budding-openeuler/openstack-master-ci/'$arch'/'
echo 'enabled=1'
echo 'gpgcheck=0') | sudo tee -a /etc/yum.repos.d/openstack-master.repo > /dev/null
yum_install liberasurecode-devel
}
function fixup_all { function fixup_all {
fixup_ubuntu fixup_ubuntu
fixup_fedora fixup_fedora
fixup_suse fixup_suse
fixup_openeuler
} }