mod_wsgi is configured with python2 on centOS when python3 is enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
devstack |
Won't Fix
|
Low
|
Unassigned |
Bug Description
I was configuring the stable/train horizon on CentOS using devstack and set USE_PYTHON3=True.
I got below error in /var/log/
2020-04-14 06:52:32.116948 mod_wsgi (pid=22756): Target WSGI script '/opt/stack/
2020-04-14 06:52:32.117028 mod_wsgi (pid=22756): Exception occurred processing WSGI script '/opt/stack/
2020-04-14 06:52:32.117059 Traceback (most recent call last):
2020-04-14 06:52:32.117097 File "/opt/stack/
2020-04-14 06:52:32.117188 from django.core.wsgi import get_wsgi_
2020-04-14 06:52:32.117216 ImportError: No module named django.core.wsgi
The django module is installed in python3 lib. But the mod_wsgi is configured with python2 based on the /var/log/
[Tue Apr 14 08:17:23.504300 2020] [mpm_worker:notice] [pid 7881:tid 140070784944256] AH00292: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations
[Tue Apr 14 08:17:23.504338 2020] [core:notice] [pid 7881:tid 140070784944256] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
I checked the devstack/lib/apache code, the mod_wsgi is installed for fedora without python3 considering. I think it should check python3 and install corresponding mod_wsgi for it on fedora devstack same as the work for ubuntu.
function install_apache_wsgi {
# Apache installation, because we mark it NOPRIME
if is_ubuntu; then
# Install apache2, which is NOPRIME'd
if python3_enabled; then
if is_package_
fi
else
fi
elif is_fedora; then
sudo rm -f /etc/httpd/
# For consistency with Ubuntu, switch to the worker mpm, as
# the default is event
sudo sed -i '/mod_mpm_
sudo sed -i '/mod_mpm_
sudo sed -i '/mod_mpm_
Centos 7 is no longer supported on master/ussuri. If you can provide a patch for the train stable branch that fixed this, we can review it, but otherwise this will likely stay unresolved.