From 4404f680f2447912dcdbcecde14339bc6d1f5175 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 2 Mar 2018 00:37:58 +0100 Subject: [PATCH] Add an openSUSE Tumbleweed devstack non-voting check job This adds the necessary fixes to pass a devstack run on openSUSE Tumbleweed. Also removes opensuse 42.2 as it is EOL for some time already and no longer actively tested in the OpenStack infra. Depends-On: I1b68c08c07cf6653ea58506f738cbe0054b38f3a Change-Id: I2894482deef063fd02b0818c695a2ddbf6767039 --- .zuul.yaml | 20 +++++++++++++++++++- functions-common | 3 +++ lib/rpc_backend | 15 ++++++++++++++- lib/swift | 6 +++++- stack.sh | 2 +- tools/install_pip.sh | 4 ++-- 6 files changed, 44 insertions(+), 6 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 25bd757ab3..ebe5a78ca5 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -28,6 +28,16 @@ nodes: - controller +- nodeset: + name: devstack-single-node-opensuse-tumbleweed + nodes: + - name: controller + label: opensuse-tumbleweed + groups: + - name: tempest + nodes: + - controller + - nodeset: name: devstack-single-node-fedora-27 nodes: @@ -238,10 +248,17 @@ - job: name: devstack-platform-opensuse-423 parent: tempest-full - description: OpenSuSE 43.2 platform test + description: openSUSE 43.2 platform test nodeset: devstack-single-node-opensuse-423 voting: false +- job: + name: devstack-platform-opensuse-tumbleweed + parent: tempest-full + description: openSUSE Tumbleweed platform test + nodeset: devstack-single-node-opensuse-tumbleweed + voting: false + - job: name: devstack-platform-fedora-27 parent: tempest-full @@ -318,6 +335,7 @@ - devstack - devstack-platform-centos-7 - devstack-platform-opensuse-423 + - devstack-platform-opensuse-tumbleweed - devstack-platform-fedora-27 - devstack-multinode - devstack-unit-tests diff --git a/functions-common b/functions-common index df295a3395..279cfcfdd8 100644 --- a/functions-common +++ b/functions-common @@ -373,6 +373,9 @@ function GetDistro { DISTRO="f$os_RELEASE" elif [[ "$os_VENDOR" =~ (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. + [ "$os_CODENAME" = "n/a" ] && DISTRO="opensuse-tumbleweed" elif [[ "$os_VENDOR" =~ (SUSE LINUX) ]]; then # just use major release DISTRO="sle${os_RELEASE%.*}" diff --git a/lib/rpc_backend b/lib/rpc_backend index 44d0717116..1c7c82fcd3 100644 --- a/lib/rpc_backend +++ b/lib/rpc_backend @@ -52,7 +52,20 @@ function install_rpc_backend { if is_service_enabled rabbit; then # Install rabbitmq-server install_package rabbitmq-server - if is_fedora; then + if is_suse; then + install_package rabbitmq-server-plugins + # the default systemd socket activation only listens on the loopback interface + # which causes rabbitmq to try to start its own epmd + sudo mkdir -p /etc/systemd/system/epmd.socket.d + cat </dev/null +[Socket] +ListenStream= +ListenStream=[::]:4369 +EOF + sudo systemctl daemon-reload + sudo systemctl restart epmd.socket epmd.service + fi + if is_fedora || is_suse; then sudo systemctl enable rabbitmq-server fi fi diff --git a/lib/swift b/lib/swift index 1187846dfc..6cda9c84b2 100644 --- a/lib/swift +++ b/lib/swift @@ -557,7 +557,11 @@ EOF local swift_log_dir=${SWIFT_DATA_DIR}/logs sudo rm -rf ${swift_log_dir} - sudo install -d -o ${STACK_USER} -g adm ${swift_log_dir}/hourly + local swift_log_group=adm + if is_suse; then + swift_log_group=root + fi + sudo install -d -o ${STACK_USER} -g ${swift_log_group} ${swift_log_dir}/hourly if [[ $SYSLOG != "False" ]]; then sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \ diff --git a/stack.sh b/stack.sh index ba546c0ab1..caef76e18a 100755 --- a/stack.sh +++ b/stack.sh @@ -221,7 +221,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`` -if [[ ! ${DISTRO} =~ (xenial|zesty|artful|stretch|jessie|f25|f26|f27|opensuse-42.2|opensuse-42.3|rhel7) ]]; then +if [[ ! ${DISTRO} =~ (xenial|zesty|artful|stretch|jessie|f25|f26|f27|opensuse-42.3|opensuse-tumbleweed|rhel7) ]]; then echo "WARNING: this script has not been tested on $DISTRO" if [[ "$FORCE" != "yes" ]]; then die $LINENO "If you wish to run this script anyway run with FORCE=yes" diff --git a/tools/install_pip.sh b/tools/install_pip.sh index dbe52782a4..1bd7392b9d 100755 --- a/tools/install_pip.sh +++ b/tools/install_pip.sh @@ -129,10 +129,10 @@ get_versions # Eradicate any and all system packages -# Python in fedora depends on the python-pip package so removing it +# 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 ; then +if ! is_fedora && ! is_suse; then uninstall_package python-pip uninstall_package python3-pip fi