Bug 1327942 - Trace logging does not work for vdsm.
Summary: Trace logging does not work for vdsm.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.6.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.0.0-rc
: ---
Assignee: Yaniv Bronhaim
QA Contact: Aharon Canan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-18 05:24 UTC by Roman Hodain
Modified: 2019-10-10 11:55 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-01 14:04:59 UTC
oVirt Team: Infra
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2257011 0 None None None 2016-04-18 13:48:26 UTC

Description Roman Hodain 2016-04-18 05:24:25 UTC
Description of problem:
Vdsm defines its own Trace level logging. This level is defined to late and causes vdsm fail when TRACE level is configured in logger.conf

Version-Release number of selected component (if applicable):
     vdsm-4.17.23.2-1.el7ev.noarch

How reproducible:
     100%

Steps to Reproduce:
     1. Set Trace log level for one of the loggers in  /etc/vdsm/logger.conf
     2. Restart vdsmd

Actual results:
     Vdsm does not sstart

Expected results:
     Vdsm starts and logs in trace log level

Comment 2 Yaniv Lavi 2016-05-09 10:57:59 UTC
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.

Comment 5 Oved Ourfali 2016-05-25 14:25:27 UTC
Yaniv - can you take a look?

Comment 6 Yaniv Bronhaim 2016-05-29 14:38:08 UTC
there is not TRACE log level in logging module:

-sh-4.2$ ./vdsm
Traceback (most recent call last):
  File "./vdsm", line 261, in <module>
    main()
  File "./vdsm", line 256, in main
    run()
  File "./vdsm", line 125, in run
    lconfig.fileConfig(loggerConfFile, disable_existing_loggers=False)
  File "/usr/lib64/python2.7/logging/config.py", line 79, in fileConfig
    _install_loggers(cp, handlers, disable_existing_loggers)
  File "/usr/lib64/python2.7/logging/config.py", line 190, in _install_loggers
    log.setLevel(logging._levelNames[level])
KeyError: 'TRACE'

that's why it doesn't start for you - see https://docs.python.org/2/library/logging.html#logging-levels

I'm not so sure why we do
129     logging.addLevelName(5, 'TRACE')                                             
130     logging.TRACE = 5  # impolite but helpful

but its being used rarely in some places using logging.TRACE after we add it to logging. 
so you can't define log level TRACE using the conf file. and anyway, the value we give to it (5) is lower than DEBUG, it looks redundant code to me.

let me know if I miss something ..


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