Bug 1908979 - HorizonDebug does not enable debug log in horizon containers
Summary: HorizonDebug does not enable debug log in horizon containers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Tatiana Ovchinnikova
QA Contact: ikanias
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-18 05:19 UTC by Michele Valsecchi
Modified: 2024-10-01 17:13 UTC (History)
9 users (show)

Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20210319163528.29a02c1.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-26 13:50:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1908362 0 None None None 2020-12-18 05:21:02 UTC
OpenStack gerrit 743441 0 None MERGED Set 'DEBUG' to horizon::log_level if HorizonDebug or Debug is true 2021-02-15 05:54:59 UTC
OpenStack gerrit 767281 0 None MERGED Fix logic to honor HorizonDebug 2021-02-15 05:54:59 UTC
OpenStack gerrit 776170 0 None MERGED Set 'DEBUG' to horizon::log_level if HorizonDebug or Debug is true 2021-03-17 19:21:28 UTC
OpenStack gerrit 776171 0 None MERGED Fix logic to honor HorizonDebug 2021-03-17 19:21:28 UTC
Red Hat Issue Tracker DFGUI-1681 0 None None None 2022-08-30 12:05:38 UTC
Red Hat Issue Tracker OSP-1876 0 None None None 2022-08-30 11:53:38 UTC
Red Hat Product Errata RHBA-2021:2097 0 None None None 2021-05-26 13:51:21 UTC

Description Michele Valsecchi 2020-12-18 05:19:27 UTC
Description of problem:
HorizonDebug is not enabling debug log in horizon containers.

Version-Release number of selected component (if applicable):
16.1

How reproducible:
100%


Steps to Reproduce:
1. Deploy with the following envirnoment

~~~
parameter_defaults:
  HorizonDebug: True
~~~

2. Verify no debug log are emitted from horizon containers

Actual results:

~~~
$ vim var/lib/config-data/puppet-generated/horizon/etc/openstack-dashboard/local_settings

DEBUG = False
TEMPLATE_DEBUG = DEBUG

LOGGING = {
...
    'handlers': {
        'null': {
            'level': 'DEBUG',
            'class': 'logging.NullHandler',
        },
        'console': {
            # Set the level to "DEBUG" for verbose output logging.
            'level': 'INFO',
            'class': 'logging.StreamHandler',
        },
        'file': {
            'level': 'INFO', <===
            'class': 'logging.FileHandler',
            'filename': '/var/log/horizon/horizon.log',
            'formatter': 'verbose',
        },
    },
~~~

Expected results:

~~~
$ vim var/lib/config-data/puppet-generated/horizon/etc/openstack-dashboard/local_settings

DEBUG = False
TEMPLATE_DEBUG = DEBUG

LOGGING = {
...
    'handlers': {
        'null': {
            'level': 'DEBUG',
            'class': 'logging.NullHandler',
        },
        'console': {
            # Set the level to "DEBUG" for verbose output logging.
            'level': 'INFO',
            'class': 'logging.StreamHandler',
        },
        'file': {
            'level': 'DEBUG', <===
            'class': 'logging.FileHandler',
            'filename': '/var/log/horizon/horizon.log',
            'formatter': 'verbose',
        },
    },
~~~

Additional info:

This issue is being tracked upstream at [1].

This issue seems to be caused by two different issues:

- Heat template logic has a flaw, being addressed by [2] 
- horizon::log_level is not correctly set to "DEBUG", addressed by [3]


[1] https://bugs.launchpad.net/tripleo/+bug/1908362
[2] https://review.opendev.org/c/openstack/tripleo-heat-templates/+/767281
[3] https://review.opendev.org/c/openstack/tripleo-heat-templates/+/743441

Comment 13 errata-xmlrpc 2021-05-26 13:50:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1.6 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2097


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