Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1908979

Summary: HorizonDebug does not enable debug log in horizon containers
Product: Red Hat OpenStack Reporter: Michele Valsecchi <mvalsecc>
Component: openstack-tripleo-heat-templatesAssignee: Tatiana Ovchinnikova <tovchinn>
Status: CLOSED ERRATA QA Contact: ikanias
Severity: low Docs Contact:
Priority: low    
Version: 16.1 (Train)CC: aschultz, jjoyce, jschluet, mburns, mrunge, rdopiera, slinaber, tovchinn, tvignaud
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20210319163528.29a02c1.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-26 13:50:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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