Bug 1421556 - Setting log level as shown in README.logging fails.
Summary: Setting log level as shown in README.logging fails.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 4.1.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ovirt-4.1.2
: ---
Assignee: Irit Goihman
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-13 05:13 UTC by Germano Veit Michel
Modified: 2019-04-28 14:00 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-24 11:24:48 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1281 0 normal SHIPPED_LIVE VDSM bug fix and enhancement update 4.1.2 2017-05-24 15:18:53 UTC
oVirt gerrit 75361 0 ovirt-4.1 MERGED documentation: fix setLogLevel call 2020-11-12 21:57:26 UTC

Description Germano Veit Michel 2017-02-13 05:13:30 UTC
Description of problem:

This patch here is merged in 4.1:

logging: Improve log level alignment
https://gerrit.ovirt.org/#/c/64217/

It also shortened the log levels to be used with vdsm-client:
https://gerrit.ovirt.org/#/c/64217/4/README.logging

However, vdsm-client rejects the shortened log levels but still accepts the previous ones. 

See the problem when trying to set log levels accoring to README.logger

# vdsm-client Host setLogLevel level=WARN name=storage
vdsm-client: Command Host.setLogLevel with args {'name': 'storage', 'level': 'WARN'} failed:
(code=-32603, message=unknown log level: u'WARN')

# vdsm-client Host setLogLevel level=WARNING name=storage
true

# vdsm-client Host setLogLevel level=CRIT name=virt
vdsm-client: Command Host.setLogLevel with args {'name': 'virt', 'level': 'CRIT'} failed:
(code=-32603, message=unknown log level: u'CRIT')

# vdsm-client Host setLogLevel level=CRITICAL name=virt
true

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

How reproducible:
100%

Comment 1 Germano Veit Michel 2017-02-13 05:16:43 UTC
Hmm.. looks like this was already fixed on master but not backported to 4.1

https://gerrit.ovirt.org/71071

Comment 3 Lukas Svaty 2017-04-04 14:43:14 UTC
[root@localhost ~]# grep setLogLevel /usr/share/doc/vdsm-4.19.10.1/README.logging
# vdsClient [-s] SERVER setLogLevel LEVEL [LOGGER]
vdsClient -s 0 setLogLevel DEBUG
vdsClient -s 0 setLogLevel WARN virt
vdsClient -s 0 setLogLevel WARN storage
vdsClient -s 0 setLogLevel WARN jsonrpc
vdsClient -s 0 setLogLevel devel WARN


[root@localhost ~]# vdsClient -s 0 setLogLevel devel WARN
Unexpected exception

should be:
[root@localhost ~]# vdsClient -s 0 setLogLevel WARN devel


success \o/
do believe this should not happen -> Failed QA

Comment 4 Irit Goihman 2017-04-09 10:10:25 UTC
It looks like an error in logging documentation.
vdsClient expects arguments in a specific order: log level, log name.

Also, an 'unexpected exception' shouldn't be raised but a proper error message.

Comment 5 Irit Goihman 2017-04-09 10:46:07 UTC
The 'unexpected exception' error message is implemented in XMLRPC protocol, which is deprecated and replaced by JSONRPC - so it won't be fixed.

Comment 8 Lukas Svaty 2017-05-09 13:27:00 UTC
verified in vdsm-4.19.11-1.el7ev.x86_64

Comment 10 errata-xmlrpc 2017-05-24 11:24:48 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, 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/RHEA-2017:1281


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