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:
**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.
But in the log above, python3.6 modules are called.
**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/ kolla/monasca/ monasca- api-error. log api/monasca_ api/api/ wsgi.py' cannot be loaded as Python module. api/monasca_ api/api/ wsgi.py' . api/monasca_ api/api/ wsgi.py" , line 18, in <module> kolla/venv/ lib/python3. 6/site- packages/ monasca_ api/api/ server. py", line 21, in <module> kolla/venv/ lib/python3. 6/site- packages/ oslo_config/ cfg.py" , line 39, in <module>
[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- source- *:train docker-images. It looks to me like Apache in the monasca_api container is using python2.7:
# docker exec -it monasca_api /bin/bash api)[root@ cXXXX /]# ll /usr/lib/ apache2/ modules/ mod_wsgi. so apache2/ modules/ mod_wsgi. so -> mod_wsgi.so-2.7 api)[root@ cXXXX /]#
(monasca-
lrwxrwxrwx 1 root root 15 Feb 14 11:08 /usr/lib/
(monasca-
**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.
But in the log above, python3.6 modules are called.
cheers,
Ole