Bug 2295414 - Horizon dashboard internal server error
Summary: Horizon dashboard internal server error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: documentation
Version: 17.1 (Wallaby)
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: async
: 17.1
Assignee: kgilliga
QA Contact: Ashish Gupta
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-07-03 13:15 UTC by Kenny Tordeurs
Modified: 2025-01-10 15:01 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
Cause: Static files compression doesn't run automatically after an upgrade. Consequence: Missing static files make Horizon fail. Workaround (if any): Run the compression manually inside the horizon container with `python3 manage.py compress` Result: All static files are available and Horizon runs correctly.
Clone Of:
Environment:
Last Closed: 2025-01-10 15:01:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-32445 0 None None None 2024-07-03 13:15:55 UTC

Description Kenny Tordeurs 2024-07-03 13:15:33 UTC
Description of problem:
After upgrade from 16.2 > 17.1 errors with the Horizon dashboard

Version-Release number of selected component (if applicable):
16.2 > 17.1

How reproducible:
100%

Steps to Reproduce:
1. After upgrade the Horizon dashboard has failures
2.
3.

Actual results:
2024-07-03 08:20:44,080 38 ERROR django.request Internal Server Error: /dashboard/auth/login/

Traceback (most recent call last):

  File "/usr/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner

    response = get_response(request)

  File "/usr/lib/python3.9/site-packages/django/core/handlers/base.py", line 145, in _get_response

    response = self.process_exception_by_middleware(e, request)

  File "/usr/lib/python3.9/site-packages/django/core/handlers/base.py", line 143, in _get_response

    response = response.render()

  File "/usr/lib/python3.9/site-packages/django/template/response.py", line 106, in render

    self.content = self.rendered_content

  File "/usr/lib/python3.9/site-packages/django/template/response.py", line 83, in rendered_content

    content = template.render(context, self._request)

  File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 61, in render

    return self.template.render(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 171, in render

    return self._render(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 163, in _render

    return self.nodelist.render(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 937, in render

    bit = node.render_annotated(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 904, in render_annotated

    return self.render(context)

  File "/usr/lib/python3.9/site-packages/django/template/loader_tags.py", line 53, in render

    result = self.nodelist.render(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 937, in render

    bit = node.render_annotated(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 904, in render_annotated

    return self.render(context)

  File "/usr/lib/python3.9/site-packages/django/template/loader_tags.py", line 188, in render

    return template.render(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 173, in render

    return self._render(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 163, in _render

    return self.nodelist.render(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 937, in render

    bit = node.render_annotated(context)

  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 904, in render_annotated

    return self.render(context)

  File "/usr/lib/python3.9/site-packages/compressor/templatetags/compress.py", line 143, in render

    return self.render_compressed(context, self.kind, self.mode, forced=forced)

  File "/usr/lib/python3.9/site-packages/compressor/templatetags/compress.py", line 97, in render_compressed

    return self.render_offline(context)

  File "/usr/lib/python3.9/site-packages/compressor/templatetags/compress.py", line 79, in render_offline

    raise OfflineGenerationError('You have offline compression '

compressor.exceptions.OfflineGenerationError: You have offline compression enabled but key "dbf52fe9eafa4b50d57c151a16962bcb02dfc37de3ae4fde450231af213e84a9" is missing from offline manifest. You may need to run "python manage.py compress". Here is the original content:

Expected results:
no errors

Additional info:
This was fixed by running the compression from inside a horizon container

# podman exec -it horizon /bin/bash
# cd /usr/bin/
# python3 manage.py compress
 

WARNING:root:"dashboards" and "default_dashboard" in (local_)settings is DEPRECATED now and may be unsupported in some future release. The preferred way to specify the order of dashboards and the default dashboard is the pluggable dashboard mechanism (in /usr/lib/python3.9/site-packages/openstack_dashboard/enabled, /usr/lib/python3.9/site-packages/openstack_dashboard/local/enabled).

/usr/lib64/python3.9/site-packages/scss/types.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working

  from collections import Iterable

/usr/lib64/python3.9/site-packages/scss/namespace.py:172: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()

  argspec = inspect.getargspec(function)

/usr/lib64/python3.9/site-packages/scss/selector.py:26: FutureWarning: Possible nested set at position 329

  SELECTOR_TOKENIZER = re.compile(r'''

/usr/lib64/python3.9/site-packages/scss/compiler.py:359: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats

  for c_lineno, c_property, c_codestr in locate_blocks(rule.unparsed_contents):

ERROR:scss.ast:Function not found: twbs-font-path:1

ERROR:scss.compiler:Mixin not found: dropdown-arrow:0 (themes/rcue/bootstrap/components/_dropdowns.scss:73 (themes/rcue/bootstrap/components/_dropdowns.scss:54))

ERROR:scss.compiler:Maximum number of supported selectors in Internet Explorer (4095) exceeded!

Compressing... done

Compressed 6 block(s) from 6 template(s) for 0 context(s).

Comment 1 Radomir Dopieralski 2024-07-25 14:59:34 UTC
I think the compress command doesn't run automatically because there was no change in the configuration files.
We should add to the upgrade instructions the explicit running of that command.

Comment 3 Jesse Pretorius 2024-09-18 12:58:00 UTC
(In reply to Radomir Dopieralski from comment #1)
> I think the compress command doesn't run automatically because there was no
> change in the configuration files.
> We should add to the upgrade instructions the explicit running of that
> command.

Please provide the instructions so that we can get this documented into a KCS or the upgrade docs.

Comment 4 Radomir Dopieralski 2024-11-22 14:38:45 UTC
The commands that the reporter ran are the correct solution to this problem.

Comment 13 Tatiana Ovchinnikova 2025-01-07 15:25:53 UTC
Looks good to me


Note You need to log in before you can comment on or make changes to this bug.