stack.sh fails on CentOS8 because mod_wsgi not found

Bug #1885645 reported by Hirotaka Wakabayashi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Hirotaka Wakabayashi

Bug Description

Hello devstack-team,

I get an error because the mod_wsgi package does not exist[2] when I run devstack on my CentOS 8[1]. I think we should use python3-mod_wsgi instead of mod_wsgi because the ChangeLog of python3-mod_wsgi-4.6.4-4 obsoletes mod_wsgi[3].

Thanks in advance,
Hirotaka Wakabayashi

[1] My CentOS8
```
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
```

[2] The error log
```
+ functions-common:sudo_with_proxies:2288 : sudo http_proxy= https_proxy= no_proxy= dnf install -y httpd mod_wsgi
Last metadata expiration check: 0:09:39 ago on Tue 30 Jun 2020 08:00:05 AM JST.
Package httpd-2.4.37-21.module_el8.2.0+382+15b0afa8.x86_64 is already installed.
No match for argument: mod_wsgi
Error: Unable to find a match: mod_wsgi
```

[3] python3-mod_wsgi-4.6.4-4 ChangeLog
```
2019-12-04 - Lubos Uhliarik <email address hidden> - 4.6.4-4
- Resolves: #1779705 - python3-mod_wsgi: Remove the Provides and Obsoletes for the name `mod_wsgi`
```
https://centos.pkgs.org/8/centos-appstream-x86_64/python3-mod_wsgi-4.6.4-4.el8.x86_64.rpm.html

Revision history for this message
Hirotaka Wakabayashi (hiwkby) wrote :

Hello again,

My solution is here. Please see the lines around "install_apache_wsgi". I can submit a patch if no problems.

```
$ git diff
diff --git a/lib/apache b/lib/apache
index 41c2e3d8..12dceb35 100644
--- a/lib/apache
+++ b/lib/apache
@@ -100,7 +100,7 @@ function install_apache_uwsgi {
                         uwsgi-plugin-python \
                         uwsgi-plugin-python3 \
                         libapache2-mod-proxy-uwsgi
- elif [[ $os_VENDOR == "Fedora" ]]; then
+ elif is_fedora; then
         # Note httpd comes with mod_proxy_uwsgi and it is loaded by
         # default; the mod_proxy_uwsgi package actually conflicts now.
         # See:
@@ -109,7 +109,7 @@ 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
+ elif is_suse; then
         install_package uwsgi \
                         uwsgi-python3 \
                         apache2-mod_uwsgi
@@ -123,8 +123,14 @@ function install_apache_uwsgi {
         pip_install uwsgi
         pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt
         local uwsgi
- uwsgi=$(ls uwsgi*)
- tar xvf $uwsgi
+ if [ -f uW*.tar.gz ] ; then
+ mkdir uwsgi-latest
+ uwsgi=$(ls uW*.tar.gz)
+ tar xvf $uwsgi -C uwsgi-latest
+ else
+ uwsgi=$(ls uwsgi*)
+ tar xvf $uwsgi
+ fi
         cd uwsgi*/apache2
         sudo $apxs -i -c mod_proxy_uwsgi.c
         popd
@@ -161,7 +167,7 @@ function install_apache_wsgi {
         fi
     elif is_fedora; then
         sudo rm -f /etc/httpd/conf.d/000-*
- install_package httpd mod_wsgi
+ install_package httpd python3-mod_wsgi
         # For consistency with Ubuntu, switch to the worker mpm, as
         # the default is event
         sudo sed -i '/mod_mpm_prefork.so/s/^/#/g' /etc/httpd/conf.modules.d/00-mpm.conf
```

Thanks in advance,
Hirotaka Wakabayashi

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.opendev.org/738965

Changed in devstack:
assignee: nobody → Hirotaka Wakabayashi (hiwkby)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.opendev.org/738965
Committed: https://git.openstack.org/cgit/openstack/devstack/commit/?id=1e26508983a1ebf2c23560395ffca8b1f6f79462
Submitter: Zuul
Branch: master

commit 1e26508983a1ebf2c23560395ffca8b1f6f79462
Author: Hirotaka Wakabayashi <email address hidden>
Date: Thu Jul 2 06:19:21 2020 +0000

    Use python3-mod-wsgi instead of mod_wsgi on CentOS8

    This fixes a stack.sh execution error on CentOS8. We should use
    python3-mod_wsgi instead of mod_wsgi since mod_wsgi is replaced by
    python3-mod_wsgi. The following change may affect this issue.
    https://git.centos.org/rpms/mod_wsgi/c/4a746b53e9e3fef74b227e016e785449160871b8?branch=c8s

    Change-Id: I5344ecf519e1a79091b6158c2d711d09b21fae0c
    Closes-Bug: #1885645

Changed in devstack:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/746590

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/ussuri)

Reviewed: https://review.opendev.org/746590
Committed: https://git.openstack.org/cgit/openstack/devstack/commit/?id=96c2aa13fe9345bef31ef053faae334e2663a509
Submitter: Zuul
Branch: stable/ussuri

commit 96c2aa13fe9345bef31ef053faae334e2663a509
Author: Hirotaka Wakabayashi <email address hidden>
Date: Thu Jul 2 06:19:21 2020 +0000

    Use python3-mod-wsgi instead of mod_wsgi on CentOS8

    This fixes a stack.sh execution error on CentOS8. We should use
    python3-mod_wsgi instead of mod_wsgi since mod_wsgi is replaced by
    python3-mod_wsgi. The following change may affect this issue.
    https://git.centos.org/rpms/mod_wsgi/c/4a746b53e9e3fef74b227e016e785449160871b8?branch=c8s

    Change-Id: I5344ecf519e1a79091b6158c2d711d09b21fae0c
    Closes-Bug: #1885645
    (cherry picked from commit 1e26508983a1ebf2c23560395ffca8b1f6f79462)

tags: added: in-stable-ussuri
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.