[Murano] error in murano-dashboard when clicking on add component in environment
Bujack, Stefan
stefan.bujack at desy.de
Mon Feb 22 08:42:30 UTC 2021
Hello,
thanks, you are right I changed the value in line 129 of
/usr/lib/python3/dist-packages/muranodashboard/catalog/views.py
from
if not http_utils.is_safe_url(url=redirect_to, host=request.get_host()):
to
if not http_utils.is_safe_url(url=redirect_to, allowed_hosts=request.get_host()):
and now it works.
Greets
Stefan Bujack
----- Original Message -----
From: "Akihiro Motoki" <amotoki at gmail.com>
To: "Stefan Bujack" <stefan.bujack at desy.de>
Cc: "openstack-discuss" <openstack-discuss at lists.openstack.org>
Sent: Saturday, 20 February, 2021 10:56:25
Subject: Re: [Murano] error in murano-dashboard when clicking on add component in environment
Hi,
Looking at the error, murano-dashboard does not work with Django 2.2
which is the horizon victoria dependencies.
"host" argument of is_safe_url() was deprecated in Django 1.11 and
dropped in Django 2.1.
Horizon switches to use Django 2.2 in Ussuri release, so perhaps
murano-dashboard (at least the feature mentioned) does not work since
Ussuri release.
The fix would be to replace host=xxxx with allows_hosts=[xxxx].
Thanks,
Akihiro Motoki (irc: amotoki)
On Fri, Feb 19, 2021 at 5:18 AM Bujack, Stefan <stefan.bujack at desy.de> wrote:
>
> Hello,
>
> we have an openstack victoria deployment on ubuntu 20.04.
>
> We use the murano-dashboard in horizon.
>
> When clicking on add component in APP Catalog --> Applications --> Environments
>
> we get an error page and apache2 has an error:
>
> ==> /var/log/apache2/error.log <==
> [Thu Feb 18 14:17:51.223960 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] /usr/lib/python3/dist-packages/django/contrib/staticfiles/templatetags/staticfiles.py:24: RemovedInDjango30Warning: {% load staticfiles %} is deprecated in favor of {% load static %}.
> [Thu Feb 18 14:17:51.224014 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] warnings.warn(
> [Thu Feb 18 14:17:51.226557 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] ERROR django.request Internal Server Error: /app-catalog/catalog/switch_environment/281f558410fb40bf8f5e090f04d90248
> [Thu Feb 18 14:17:51.226584 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] Traceback (most recent call last):
> [Thu Feb 18 14:17:51.226590 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 34, in inner
> [Thu Feb 18 14:17:51.226594 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] response = get_response(request)
> [Thu Feb 18 14:17:51.226598 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 115, in _get_response
> [Thu Feb 18 14:17:51.226602 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] response = self.process_exception_by_middleware(e, request)
> [Thu Feb 18 14:17:51.226606 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 113, in _get_response
> [Thu Feb 18 14:17:51.226610 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] response = wrapped_callback(request, *callback_args, **callback_kwargs)
> [Thu Feb 18 14:17:51.226615 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] File "/usr/lib/python3/dist-packages/horizon/decorators.py", line 52, in dec
> [Thu Feb 18 14:17:51.226619 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] return view_func(request, *args, **kwargs)
> [Thu Feb 18 14:17:51.226622 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] File "/usr/lib/python3/dist-packages/horizon/decorators.py", line 36, in dec
> [Thu Feb 18 14:17:51.226626 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] return view_func(request, *args, **kwargs)
> [Thu Feb 18 14:17:51.226630 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] File "/usr/lib/python3/dist-packages/horizon/decorators.py", line 36, in dec
> [Thu Feb 18 14:17:51.226634 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] return view_func(request, *args, **kwargs)
> [Thu Feb 18 14:17:51.226637 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] File "/usr/lib/python3/dist-packages/horizon/decorators.py", line 113, in dec
> [Thu Feb 18 14:17:51.226641 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] return view_func(request, *args, **kwargs)
> [Thu Feb 18 14:17:51.226656 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] File "/usr/lib/python3/dist-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
> [Thu Feb 18 14:17:51.226660 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] return view_func(request, *args, **kwargs)
> [Thu Feb 18 14:17:51.226665 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] File "/usr/lib/python3/dist-packages/muranodashboard/catalog/views.py", line 129, in switch
> [Thu Feb 18 14:17:51.226671 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] if not http_utils.is_safe_url(url=redirect_to, host=request.get_host()):
> [Thu Feb 18 14:17:51.226674 2021] [wsgi:error] [pid 3970511:tid 139721480873728] [remote 131.169.5.116:43998] TypeError: is_safe_url() got an unexpected keyword argument 'host'
>
>
> Any help is appreciated
>
> Thanks in advance
>
> Greets Stefan Bujack
>
More information about the openstack-discuss
mailing list