Skip to content

Commit

Permalink
Remove support for opensuse
Browse files Browse the repository at this point in the history
We haven't been testing the distro for a while in CI, e.g. in
Tempest, the jobs on opensuse15 haven't been executed for a year
now.
Therefore the patch removes opensuse support from devstack.

Closes-Bug: #2002900
Change-Id: I0f5e4c644e2d14d1b8bb5bc0096d1469febe5fcc
  • Loading branch information
kopecmartin committed Feb 16, 2023
1 parent 864f4d1 commit ec07b34
Show file tree
Hide file tree
Showing 43 changed files with 25 additions and 335 deletions.
3 changes: 1 addition & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ Install Linux

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

If you do not have a preference, Ubuntu 22.04 (Jammy) is the
most tested, and will probably go the smoothest.
Expand Down
3 changes: 0 additions & 3 deletions doc/source/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,6 @@ locations in the top-level of the plugin repository:
- ``./devstack/files/rpms/$plugin_name`` - Packages to install when running
on Red Hat, Fedora, or CentOS.

- ``./devstack/files/rpms-suse/$plugin_name`` - Packages to install when
running on SUSE Linux or openSUSE.

Although there a no plans to remove this method of installing
packages, plugins should consider it deprecated for ``bindep`` support
described below.
Expand Down
1 change: 0 additions & 1 deletion files/rpms-suse/baremetal

This file was deleted.

3 changes: 0 additions & 3 deletions files/rpms-suse/ceph

This file was deleted.

3 changes: 0 additions & 3 deletions files/rpms-suse/cinder

This file was deleted.

1 change: 0 additions & 1 deletion files/rpms-suse/dstat

This file was deleted.

34 changes: 0 additions & 34 deletions files/rpms-suse/general

This file was deleted.

2 changes: 0 additions & 2 deletions files/rpms-suse/horizon

This file was deleted.

4 changes: 0 additions & 4 deletions files/rpms-suse/keystone

This file was deleted.

3 changes: 0 additions & 3 deletions files/rpms-suse/ldap

This file was deleted.

1 change: 0 additions & 1 deletion files/rpms-suse/n-api

This file was deleted.

10 changes: 0 additions & 10 deletions files/rpms-suse/n-cpu

This file was deleted.

1 change: 0 additions & 1 deletion files/rpms-suse/neutron-agent

This file was deleted.

12 changes: 0 additions & 12 deletions files/rpms-suse/neutron-common

This file was deleted.

2 changes: 0 additions & 2 deletions files/rpms-suse/neutron-l3

This file was deleted.

21 changes: 0 additions & 21 deletions files/rpms-suse/nova

This file was deleted.

3 changes: 0 additions & 3 deletions files/rpms-suse/openvswitch

This file was deleted.

2 changes: 0 additions & 2 deletions files/rpms-suse/os-brick

This file was deleted.

1 change: 0 additions & 1 deletion files/rpms-suse/q-agt

This file was deleted.

1 change: 0 additions & 1 deletion files/rpms-suse/q-l3

This file was deleted.

6 changes: 0 additions & 6 deletions files/rpms-suse/swift

This file was deleted.

47 changes: 0 additions & 47 deletions functions-common
Original file line number Diff line number Diff line change
Expand Up @@ -454,16 +454,6 @@ function GetDistro {
elif [[ "$os_VENDOR" =~ (Fedora) ]]; then
# For Fedora, just use 'f' and the release
DISTRO="f$os_RELEASE"
elif is_opensuse; then
DISTRO="opensuse-$os_RELEASE"
# Tumbleweed uses "n/a" as a codename, and the release is a datestring
# like 20180218, so not very useful. Leap however uses a release
# with a "dot", so for example 15.0
[ "$os_CODENAME" = "n/a" -a "$os_RELEASE" = "${os_RELEASE/\./}" ] && \
DISTRO="opensuse-tumbleweed"
elif is_suse_linux_enterprise; then
# just use major release
DISTRO="sle${os_RELEASE%.*}"
elif [[ "$os_VENDOR" =~ (Red.*Hat) || \
"$os_VENDOR" =~ (CentOS) || \
"$os_VENDOR" =~ (AlmaLinux) || \
Expand Down Expand Up @@ -537,37 +527,6 @@ function is_fedora {
}


# Determine if current distribution is a SUSE-based distribution
# (openSUSE, SLE).
# is_suse
function is_suse {
is_opensuse || is_suse_linux_enterprise
}


# Determine if current distribution is an openSUSE distribution
# is_opensuse
function is_opensuse {
if [[ -z "$os_VENDOR" ]]; then
GetOSVersion
fi

[[ "$os_VENDOR" =~ (openSUSE) ]]
}


# Determine if current distribution is a SUSE Linux Enterprise (SLE)
# distribution
# is_suse_linux_enterprise
function is_suse_linux_enterprise {
if [[ -z "$os_VENDOR" ]]; then
GetOSVersion
fi

[[ "$os_VENDOR" =~ (^SUSE) ]]
}


# Determine if current distribution is an Ubuntu-based distribution
# It will also detect non-Ubuntu but Debian-based distros
# is_ubuntu
Expand Down Expand Up @@ -1168,8 +1127,6 @@ function _get_package_dir {
pkg_dir=$base_dir/debs
elif is_fedora; then
pkg_dir=$base_dir/rpms
elif is_suse; then
pkg_dir=$base_dir/rpms-suse
else
exit_distro_not_supported "list of packages"
fi
Expand Down Expand Up @@ -1444,8 +1401,6 @@ function real_install_package {
apt_get install "$@"
elif is_fedora; then
yum_install "$@"
elif is_suse; then
zypper_install "$@"
else
exit_distro_not_supported "installing packages"
fi
Expand Down Expand Up @@ -1487,8 +1442,6 @@ function uninstall_package {
apt_get purge "$@"
elif is_fedora; then
sudo dnf remove -y "$@" ||:
elif is_suse; then
sudo zypper remove -y "$@" ||:
else
exit_distro_not_supported "uninstalling packages"
fi
Expand Down
4 changes: 0 additions & 4 deletions inc/python
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# External functions used:
# - GetOSVersion
# - is_fedora
# - is_suse
# - safe_chown

# Save trace setting
Expand Down Expand Up @@ -62,7 +61,6 @@ function get_python_exec_prefix {
$xtrace

local PYTHON_PATH=/usr/local/bin
is_suse && PYTHON_PATH=/usr/bin
echo $PYTHON_PATH
}

Expand Down Expand Up @@ -462,8 +460,6 @@ function install_python {
function install_python3 {
if is_ubuntu; then
apt_get install python${PYTHON3_VERSION} python${PYTHON3_VERSION}-dev
elif is_suse; then
install_package python3-devel python3-dbm
elif is_fedora; then
if [ "$os_VENDOR" = "Fedora" ]; then
install_package python${PYTHON3_VERSION//.}
Expand Down
25 changes: 5 additions & 20 deletions lib/apache
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ elif is_fedora; then
APACHE_NAME=httpd
APACHE_CONF_DIR=${APACHE_CONF_DIR:-/etc/$APACHE_NAME/conf.d}
APACHE_SETTINGS_DIR=${APACHE_SETTINGS_DIR:-/etc/$APACHE_NAME/conf.d}
elif is_suse; then
APACHE_NAME=apache2
APACHE_CONF_DIR=${APACHE_CONF_DIR:-/etc/$APACHE_NAME/vhosts.d}
APACHE_SETTINGS_DIR=${APACHE_SETTINGS_DIR:-/etc/$APACHE_NAME/conf.d}
fi
APACHE_LOG_DIR="/var/log/${APACHE_NAME}"

Expand All @@ -65,11 +61,6 @@ function enable_apache_mod {
sudo a2enmod $mod
restart_apache_server
fi
elif is_suse; then
if ! a2enmod -q $mod ; then
sudo a2enmod $mod
restart_apache_server
fi
elif is_fedora; then
# pass
true
Expand Down Expand Up @@ -104,10 +95,6 @@ function install_apache_uwsgi {
# Thus there is nothing else to do after this install
install_package uwsgi \
uwsgi-plugin-python3
elif [[ $os_VENDOR =~ openSUSE ]]; then
install_package uwsgi \
uwsgi-python3 \
apache2-mod_uwsgi
else
# Compile uwsgi from source.
local dir
Expand All @@ -125,7 +112,7 @@ function install_apache_uwsgi {
sudo rm -rf $dir
fi

if is_ubuntu || is_suse ; then
if is_ubuntu; then
# we've got to enable proxy and proxy_uwsgi for this to work
sudo a2enmod proxy
sudo a2enmod proxy_uwsgi
Expand Down Expand Up @@ -155,8 +142,6 @@ function install_apache_wsgi {
sudo sed -i '/mod_mpm_prefork.so/s/^/#/g' /etc/httpd/conf.modules.d/00-mpm.conf
sudo sed -i '/mod_mpm_event.so/s/^/#/g' /etc/httpd/conf.modules.d/00-mpm.conf
sudo sed -i '/mod_mpm_worker.so/s/^#//g' /etc/httpd/conf.modules.d/00-mpm.conf
elif is_suse; then
install_package apache2 apache2-mod_wsgi
else
exit_distro_not_supported "apache wsgi installation"
fi
Expand All @@ -171,7 +156,7 @@ function install_apache_wsgi {
# recognise it. a2ensite and a2dissite ignore the .conf suffix used as parameter. The default sites'
# files are 000-default.conf and default-ssl.conf.
#
# On Fedora and openSUSE, any file in /etc/httpd/conf.d/ whose name ends with .conf is enabled.
# On Fedora, any file in /etc/httpd/conf.d/ whose name ends with .conf is enabled.
#
# On RHEL and CentOS, things should hopefully work as in Fedora.
#
Expand All @@ -187,7 +172,7 @@ function apache_site_config_for {
if is_ubuntu; then
# Ubuntu 14.04 - Apache 2.4
echo $APACHE_CONF_DIR/${site}.conf
elif is_fedora || is_suse; then
elif is_fedora; then
# fedora conf.d is only imported if it ends with .conf so this is approx the same
local enabled_site_file="$APACHE_CONF_DIR/${site}.conf"
if [ -f $enabled_site_file ]; then
Expand All @@ -205,7 +190,7 @@ function enable_apache_site {
enable_apache_mod version
if is_ubuntu; then
sudo a2ensite ${site}
elif is_fedora || is_suse; then
elif is_fedora; then
local enabled_site_file="$APACHE_CONF_DIR/${site}.conf"
# Do nothing if site already enabled or no site config exists
if [[ -f ${enabled_site_file}.disabled ]] && [[ ! -f ${enabled_site_file} ]]; then
Expand All @@ -219,7 +204,7 @@ function disable_apache_site {
local site=$@
if is_ubuntu; then
sudo a2dissite ${site} || true
elif is_fedora || is_suse; then
elif is_fedora; then
local enabled_site_file="$APACHE_CONF_DIR/${site}.conf"
# Do nothing if no site config exists
if [[ -f ${enabled_site_file} ]]; then
Expand Down
9 changes: 2 additions & 7 deletions lib/cinder
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ else
fi


# EL and SUSE should only use lioadm
if is_fedora || is_suse; then
# EL should only use lioadm
if is_fedora; then
if [[ ${CINDER_TARGET_HELPER} != "lioadm" && ${CINDER_TARGET_HELPER} != 'nvmet' ]]; then
die "lioadm and nvmet are the only valid Cinder target_helper config on this platform"
fi
Expand Down Expand Up @@ -595,11 +595,6 @@ function start_cinder {
_configure_tgt_for_config_d
if is_ubuntu; then
sudo service tgt restart
elif is_suse; then
# NOTE(dmllr): workaround restart bug
# https://bugzilla.suse.com/show_bug.cgi?id=934642
stop_service tgtd
start_service tgtd
else
restart_service tgtd
fi
Expand Down
Loading

0 comments on commit ec07b34

Please sign in to comment.