Skip to content

Commit 540ec94

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Add openEuler 22.03 LTS support"
2 parents 9a1be77 + 6440c6d commit 540ec94

10 files changed

Lines changed: 109 additions & 9 deletions

File tree

‎.zuul.yaml‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@
108108
nodes:
109109
- controller
110110

111+
- nodeset:
112+
name: devstack-single-node-openeuler-22.03
113+
nodes:
114+
- name: controller
115+
label: openEuler-22-03-LTS
116+
groups:
117+
- name: tempest
118+
nodes:
119+
- controller
120+
111121
- nodeset:
112122
name: openstack-two-node
113123
nodes:
@@ -777,6 +787,62 @@
777787
# Enable Neutron ML2/OVS services
778788
q-agt: true
779789

790+
- job:
791+
name: devstack-platform-openEuler-22.03-ovn-source
792+
parent: tempest-full-py3
793+
description: openEuler 22.03 LTS platform test (OVN)
794+
nodeset: devstack-single-node-openeuler-22.03
795+
voting: false
796+
timeout: 9000
797+
vars:
798+
configure_swap_size: 4096
799+
devstack_localrc:
800+
# NOTE(wxy): OVN package is not supported by openEuler yet. Build it
801+
# from source instead.
802+
OVN_BUILD_FROM_SOURCE: True
803+
OVN_BRANCH: "v21.06.0"
804+
OVS_BRANCH: "a4b04276ab5934d087669ff2d191a23931335c87"
805+
OVS_SYSCONFDIR: "/usr/local/etc/openvswitch"
806+
807+
- job:
808+
name: devstack-platform-openEuler-22.03-ovs
809+
parent: tempest-full-py3
810+
description: openEuler 22.03 LTS platform test (OVS)
811+
nodeset: devstack-single-node-openeuler-22.03
812+
voting: false
813+
timeout: 9000
814+
vars:
815+
configure_swap_size: 8192
816+
devstack_localrc:
817+
Q_AGENT: openvswitch
818+
Q_ML2_PLUGIN_MECHANISM_DRIVERS: openvswitch
819+
Q_ML2_TENANT_NETWORK_TYPE: vxlan
820+
devstack_services:
821+
# Disable OVN services
822+
ovn-northd: false
823+
ovn-controller: false
824+
ovs-vswitchd: false
825+
ovsdb-server: false
826+
# Disable Neutron ML2/OVN services
827+
q-ovn-metadata-agent: false
828+
# Enable Neutron ML2/OVS services
829+
q-agt: true
830+
q-dhcp: true
831+
q-l3: true
832+
q-meta: true
833+
q-metering: true
834+
group-vars:
835+
subnode:
836+
devstack_services:
837+
# Disable OVN services
838+
ovn-controller: false
839+
ovs-vswitchd: false
840+
ovsdb-server: false
841+
# Disable Neutron ML2/OVN services
842+
q-ovn-metadata-agent: false
843+
# Enable Neutron ML2/OVS services
844+
q-agt: true
845+
780846
- job:
781847
name: devstack-no-tls-proxy
782848
parent: tempest-full-py3
@@ -885,6 +951,8 @@
885951
- devstack-platform-ubuntu-focal
886952
- devstack-platform-ubuntu-jammy-ovn-source
887953
- devstack-platform-ubuntu-jammy-ovs
954+
- devstack-platform-openEuler-22.03-ovn-source
955+
- devstack-platform-openEuler-22.03-ovs
888956
- devstack-multinode
889957
- devstack-unit-tests
890958
- openstack-tox-bashate
@@ -1017,3 +1085,7 @@
10171085
periodic:
10181086
jobs:
10191087
- devstack-no-tls-proxy
1088+
periodic-weekly:
1089+
jobs:
1090+
- devstack-platform-openEuler-22.03-ovn-source
1091+
- devstack-platform-openEuler-22.03-ovs

‎doc/source/index.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ Install Linux
3838

3939
Start with a clean and minimal install of a Linux system. DevStack
4040
attempts to support the two latest LTS releases of Ubuntu, the
41-
latest/current Fedora version, CentOS/RHEL/Rocky Linux 9 and OpenSUSE.
41+
latest/current Fedora version, CentOS/RHEL/Rocky Linux 9, OpenSUSE and
42+
openEuler.
4243

4344
If you do not have a preference, Ubuntu 22.04 (Jammy) is the
4445
most tested, and will probably go the smoothest.

‎files/rpms/ceph‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ceph # NOPRIME
2-
redhat-lsb-core # not:rhel9
2+
redhat-lsb-core # not:rhel9,openEuler-22.03
33
xfsprogs

‎files/rpms/general‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ pkgconfig
2626
postgresql-devel # psycopg2
2727
psmisc
2828
python3-devel
29-
python3-pip
29+
python3-pip # not:openEuler-22.03
3030
python3-systemd
31-
redhat-rpm-config # missing dep for gcc hardening flags, see rhbz#1217376
31+
redhat-rpm-config # not:openEuler-22.03 missing dep for gcc hardening flags, see rhbz#1217376
3232
tar
3333
tcpdump
3434
unzip

‎files/rpms/nova‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ebtables
44
genisoimage # not:rhel9 required for config_drive
55
iptables
66
iputils
7-
kernel-modules
7+
kernel-modules # not:openEuler-22.03
88
kpartx
99
parted
1010
polkit

‎functions-common‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ function _ensure_lsb_release {
399399
elif [[ -x $(command -v zypper 2>/dev/null) ]]; then
400400
sudo zypper -n install lsb-release
401401
elif [[ -x $(command -v dnf 2>/dev/null) ]]; then
402-
sudo dnf install -y redhat-lsb-core
402+
sudo dnf install -y redhat-lsb-core || sudo dnf install -y openeuler-lsb
403403
else
404404
die $LINENO "Unable to find or auto-install lsb_release"
405405
fi
@@ -474,6 +474,8 @@ function GetDistro {
474474
# Drop the . release as we assume it's compatible
475475
# XXX re-evaluate when we get RHEL10
476476
DISTRO="rhel${os_RELEASE::1}"
477+
elif [[ "$os_VENDOR" =~ (openEuler) ]]; then
478+
DISTRO="openEuler-$os_RELEASE"
477479
else
478480
# We can't make a good choice here. Setting a sensible DISTRO
479481
# is part of the problem, but not the major issue -- we really
@@ -525,6 +527,7 @@ function is_fedora {
525527
fi
526528

527529
[ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || \
530+
[ "$os_VENDOR" = "openEuler" ] || \
528531
[ "$os_VENDOR" = "RedHatEnterpriseServer" ] || \
529532
[ "$os_VENDOR" = "RedHatEnterprise" ] || \
530533
[ "$os_VENDOR" = "Rocky" ] || \
@@ -575,6 +578,14 @@ function is_ubuntu {
575578
[ "$os_PACKAGE" = "deb" ]
576579
}
577580

581+
# Determine if current distribution is an openEuler distribution
582+
# is_openeuler
583+
function is_openeuler {
584+
if [[ -z "$os_PACKAGE" ]]; then
585+
GetOSVersion
586+
fi
587+
[ "$os_VENDOR" = "openEuler" ]
588+
}
578589
# Git Functions
579590
# =============
580591

‎lib/apache‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function install_apache_uwsgi {
9595
# didn't fix Python 3.10 compatibility before release. Should be
9696
# fixed in uwsgi 4.9.0; can remove this when packages available
9797
# or we drop this release
98-
elif is_fedora && ! [[ $DISTRO =~ f36 ]]; then
98+
elif is_fedora && ! is_openeuler && ! [[ $DISTRO =~ f36 ]]; then
9999
# Note httpd comes with mod_proxy_uwsgi and it is loaded by
100100
# default; the mod_proxy_uwsgi package actually conflicts now.
101101
# See:

‎lib/nova_plugins/functions-libvirt‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,17 @@ function install_libvirt {
8282
sudo dnf copr enable -y @virtmaint-sig/virt-preview
8383
fi
8484

85+
if is_openeuler; then
86+
qemu_package=qemu
87+
else
88+
qemu_package=qemu-kvm
89+
fi
90+
8591
# Note that in CentOS/RHEL this needs to come from the RDO
8692
# repositories (qemu-kvm-ev ... which provides this package)
8793
# as the base system version is too old. We should have
8894
# pre-installed these
89-
install_package qemu-kvm
95+
install_package $qemu_package
9096
install_package libvirt libvirt-devel python3-libvirt
9197

9298
if is_arch "aarch64"; then

‎roles/apache-logs-conf/tasks/main.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
'Debian': '/etc/apache2/sites-enabled/'
6565
'Suse': '/etc/apache2/conf.d/'
6666
'RedHat': '/etc/httpd/conf.d/'
67+
'openEuler': '/etc/httpd/conf.d/'
6768

6869
- name: Discover configurations
6970
find:

‎stack.sh‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ write_devstack_version
229229

230230
# Warn users who aren't on an explicitly supported distro, but allow them to
231231
# override check and attempt installation with ``FORCE=yes ./stack``
232-
SUPPORTED_DISTROS="bullseye|focal|jammy|f36|opensuse-15.2|opensuse-tumbleweed|rhel8|rhel9"
232+
SUPPORTED_DISTROS="bullseye|focal|jammy|f36|opensuse-15.2|opensuse-tumbleweed|rhel8|rhel9|openEuler-22.03"
233233

234234
if [[ ! ${DISTRO} =~ $SUPPORTED_DISTROS ]]; then
235235
echo "WARNING: this script has not been tested on $DISTRO"
@@ -394,6 +394,15 @@ elif [[ $DISTRO == "rhel9" ]]; then
394394
sudo dnf config-manager --set-enabled crb
395395
# rabbitmq and other packages are provided by RDO repositories.
396396
_install_rdo
397+
elif [[ $DISTRO == "openEuler-22.03" ]]; then
398+
# There are some problem in openEuler. We should fix it first. Some required
399+
# package/action runs before fixup script. So we can't fix there.
400+
#
401+
# 1. the hostname package is not installed by default
402+
# 2. Some necessary packages are in openstack repo, for example liberasurecode-devel
403+
# 3. python3-pip can be uninstalled by `get_pip.py` automaticly.
404+
install_package hostname openstack-release-wallaby
405+
uninstall_package python3-pip
397406
fi
398407

399408
# Ensure python is installed

0 commit comments

Comments
 (0)