monasca-api use wrong mod_wsgi Python version on Debian/Ubuntu source
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| kolla |
Medium
|
Unassigned | ||
| Train |
Medium
|
Radosław Piliszek | ||
| Ussuri |
Medium
|
Unassigned |
Bug Description
**Bug Report**
It seems there is a bug in the monasca-api config and/or the docker image. After we have enabled monasca in globals.yaml and the deployment has been completed successfully, the error log fills up with the following entries:
tail -f /var/log/
[Fri Apr 17 07:31:21.438942 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] mod_wsgi (pid=26): Target WSGI script '/monasca-
[Fri Apr 17 07:31:21.438996 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] mod_wsgi (pid=26): Exception occurred processing WSGI script '/monasca-
[Fri Apr 17 07:31:21.439017 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] Traceback (most recent call last):
[Fri Apr 17 07:31:21.439033 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] File "/monasca-
[Fri Apr 17 07:31:21.439084 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] from monasca_api.api import server
[Fri Apr 17 07:31:21.439095 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] File "/var/lib/
[Fri Apr 17 07:31:21.439144 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] from oslo_config import cfg
[Fri Apr 17 07:31:21.439153 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] File "/var/lib/
[Fri Apr 17 07:31:21.439575 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] import enum
[Fri Apr 17 07:31:21.439593 2020] [wsgi:error] [pid 26:tid 139675178346240] [remote 10.38.1.14:35394] ImportError: No module named enum
We use the kolla/ubuntu-
# docker exec -it monasca_api /bin/bash
(monasca-
lrwxrwxrwx 1 root root 15 Feb 14 11:08 /usr/lib/
(monasca-
But in the log above, python3.6 modules are called. Also the central-logging seems broken now:
# docker logs fluentd
2020-04-16 11:08:36 +0000 [warn]: parameter 'type' in <match syslog.local0.**>
@type copy
type copy
<store>
@type "file"
path "/var/log/
utc
append true
compress gzip
<format>
utc
localtime false
</format>
<inject>
localtime false
</inject>
<buffer time>
path "/var/log/
</buffer>
</store>
<store>
@type "monasca"
keystone_url "http://
monasca_log_api "http://
monasca_
username "monasca-agent"
password xxxxxx
domain_id "default"
project_name "monasca_
message_
<buffer>
flush_mode interval
retry_type exponential_backoff
</buffer>
</store>
</match> is not used.
2020-04-16 11:08:36 +0000 [warn]: parameter 'type' in <match syslog.local1.**>
@type copy
type copy
<store>
@type "file"
path "/var/log/
output_tag false
output_time false
utc
append true
compress gzip
<format>
output_time false
output_tag false
utc
localtime false
</format>
<inject>
localtime false
</inject>
<buffer time>
path "/var/log/
</buffer>
</store>
<store>
@type "monasca"
keystone_url "http://
monasca_log_api "http://
monasca_
username "monasca-agent"
password xxxxxx
domain_id "default"
project_name "monasca_
message_
<buffer>
flush_mode interval
retry_type exponential_backoff
</buffer>
</store>
</match> is not used.
2020-04-16 11:08:36 +0000 [info]: #0 starting fluentd worker pid=13280 ppid=6 worker=0
2020-04-16 11:08:36 +0000 [error]: #0 unexpected error error_class=
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /opt/td-
2020-04-16 11:08:36 +0000 [error]: #0 /usr/sbin/
2020-04-16 11:08:36 +0000 [error]: #0 /usr/sbin/
2020-04-16 11:08:36 +0000 [error]: #0 unexpected error error_class=
2020-04-16 11:08:36 +0000 [error]: #0 suppressed same stacktrace
**Environment**:
OS: Ubuntu 18.04
Kernel: 4.15.0-91-generic
Docker: 19.03.8
Type: source
Official images from Docker Hub, but retagged and pushed to our local nexus.
cheers,
Ole
description: | updated |
Mark Goddard (mgoddard) wrote : | #1 |
Mark Goddard (mgoddard) wrote : | #2 |
Fix proposed to kolla: https:/
no longer affects: | kolla-ansible |
no longer affects: | kolla-ansible/train |
no longer affects: | kolla-ansible/ussuri |
summary: |
- monasca-api seems broken + monasca-api use wrong mod_wsgi Python version on Debian/Ubuntu source |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit f5d31da12fa66ce
Author: Mark Goddard <email address hidden>
Date: Mon May 4 10:32:47 2020 +0100
Use Python 3 for mod_wsgi in cyborg and monasca on Debian/Ubuntu
In Train kolla switched to Python 3 in Debian and Ubuntu source images.
For services running under httpd with mod_wsgi, they should install
libapache2-
for most images, but cyborg and monasca were omitted. This change fixes
that.
Change-Id: I25cfa62dbf2049
Closes-Bug: #1873421
Changed in kolla: | |
status: | Triaged → Fix Released |
Fix proposed to branch: stable/train
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit f221b4f7ab7745e
Author: Mark Goddard <email address hidden>
Date: Mon May 4 10:32:47 2020 +0100
Use Python 3 for mod_wsgi in cyborg and monasca on Debian/Ubuntu
In Train kolla switched to Python 3 in Debian and Ubuntu source images.
For services running under httpd with mod_wsgi, they should install
libapache2-
for most images, but cyborg and monasca were omitted. This change fixes
that.
Change-Id: I25cfa62dbf2049
Closes-Bug: #1873421
(cherry picked from commit f5d31da12fa66ce
Thanks for raising this. It looks like we need to switch to the python 3 version of the mod_wsgi package on Debian/Ubuntu. I'll propose a fix.