monasca-api use wrong mod_wsgi Python version on Debian/Ubuntu source
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla |
Fix Released
|
Medium
|
Unassigned | ||
Train |
Fix Committed
|
Medium
|
Radosław Piliszek | ||
Ussuri |
Fix Released
|
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 |
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.