Bug 1149656 - [RFE] vdsm-tool: provide a way to enable/disable libvirt debug logs
Summary: [RFE] vdsm-tool: provide a way to enable/disable libvirt debug logs
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: 3.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.6.0
Assignee: Mooli Tayer
QA Contact: Gil Klein
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-06 11:58 UTC by Francesco Romani
Modified: 2016-02-10 19:33 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-01-05 09:51:21 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)

Description Francesco Romani 2014-10-06 11:58:17 UTC
Description of problem:
Very recently VDSM stopped to configure automatically libvirt logs to debug
(http://gerrit.ovirt.org/31135) for many good reasons, e.g. to avoid flood logs on node instances.

While the reasons for less verbose logs still stand strong, we need a way to easily restore libvirt debug logs, in order to make troubleshooting easy, or at least not harder than before.

Since vdsm-tool already manipulates libvirt config, I believe this is the right place to achieve that.

I propose new commandline like:
vdsm-tool configure --module libvirt --debug on|off

with "--debug on" vdsm-tool should enable libvirt debug logs, like it was before 31135. With "--debug off" should make it silent again.


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

How reproducible:
N/A

Steps to Reproduce:
1. N/A
2.
3.

Actual results:
There is no simple automated way to enable libvirt debug logs


Expected results:
vdsm-tool should provide such a way


Additional info:

Comment 1 Yaniv Bronhaim 2014-10-06 15:05:40 UTC
its quite complicated, as configure is generic verb and doesn't accept specific flags for specific configure.
but we can have separate verb to redirect libvirt log...

passing --module libvirt to configure call is quite misleading , as configure libvirt also touch qemu.conf and other related files. we aim to change the name to something more meaningful later on . 

anyhow, back to the core discussion, the admin only needs to add log_outputs field to /etc/libvirt/libvirtd.conf . do we really need vdsm-tool verb for that or is it reasonable to ask the administrator to do it manually ? ..

Comment 2 Francesco Romani 2014-10-06 15:10:02 UTC
(In reply to Yaniv Bronhaim from comment #1)
> its quite complicated, as configure is generic verb and doesn't accept
> specific flags for specific configure.
> but we can have separate verb to redirect libvirt log...

Good enough for me

> passing --module libvirt to configure call is quite misleading , as
> configure libvirt also touch qemu.conf and other related files. we aim to
> change the name to something more meaningful later on . 

Same. We just need an easy and safe way to get these debug logs back.

> anyhow, back to the core discussion, the admin only needs to add log_outputs
> field to /etc/libvirt/libvirtd.conf . do we really need vdsm-tool verb for
> that or is it reasonable to ask the administrator to do it manually ? ..

log_output _and_ log_filter, because we want the extra verbosiness back to help debug.

Actually, I *do* believe that is easy and practical enough to be done manually, but many people seem to disagree, so I think we should provide a super-easy way at least for the short term.

Comment 3 Mooli Tayer 2014-11-11 12:23:34 UTC
I like Francesco first idea, we need to pass (all) the parsed args to our different modules. If a module supports an additional parameter he will check for it e.g if args.debug

I would aim for both of these to work:

vdsm-tool configure --force --debug on|off
vdsm-tool configure --force --module libvirt --debug on|off

One question I do have is should maybe think about getting this functionality
from the new feature to edit vdsm configuration trough engine.
Not sure if it's related since i'm not sure what is the scope of that rfe.
Yaniv?

Comment 4 Yaniv Bronhaim 2014-11-11 13:13:40 UTC
Maybe better have those kind of configuration editable as RFE Bug 1115171 intend to do from the engine side. If admin will want to do it locally nothing prevents it. maybe enough to say that and avoid adding it to vdsm-tool. it won't hurt anyhow..

Comment 5 Yaniv Bronhaim 2015-01-05 09:51:21 UTC
Until we get such request from customers or someone in the field that really needs such option with good and convincing reason, I don't want vdsm to define how libvirt log works at all. 

libvirt has their defaults and conf file and vdsm shouldn't define that in any case.
If you still think differently or heard about actual usecase that requires that please reopen

Comment 6 Francesco Romani 2015-01-12 08:53:48 UTC
Well, I see your point.

As workaround, I'll put some documentation on the oVirt wiki about how to achieve the same result manually.

Comment 7 Michal Skrivanek 2015-06-29 11:57:36 UTC
(In reply to Yaniv Bronhaim from comment #5)
> Until we get such request from customers or someone in the field that really
> needs such option with good and convincing reason, I don't want vdsm to
> define how libvirt log works at all. 
> 
> libvirt has their defaults and conf file and vdsm shouldn't define that in
> any case.
> If you still think differently or heard about actual usecase that requires
> that please reopen

note it is a frequent complaint. Not sure, perhaps it should be more prominent on wiki or we indeed need the tool.

Comment 8 Sven Kieske 2015-07-01 08:42:30 UTC
Well, I think such an option would really be very helpful.

vdsm is already a wrapper for libvirt (at least from my user perspective)

so what's bothering you so hard that you do not want such an option?

I think the advantages are pretty obvious, do I really need to write them down?

I will if you really need it written down, but imho you should know the advantages
yourself (quickly enable debug log in case of worst-case scenarios etc.)

HTH

Sven

Comment 9 Francesco Romani 2015-07-01 08:47:29 UTC
(In reply to Francesco Romani from comment #6)
> Well, I see your point.
> 
> As workaround, I'll put some documentation on the oVirt wiki about how to
> achieve the same result manually.

For the record:
We settled for http://www.ovirt.org/index.php?title=Vdsm_Log_Files as reference page. Done in 
http://www.ovirt.org/index.php?title=Vdsm_Log_Files#Libvirt_debug_logs

Comment 10 Sven Kieske 2015-07-01 10:54:05 UTC
(In reply to Francesco Romani from comment #9)
> (In reply to Francesco Romani from comment #6)
> > Well, I see your point.
> > 
> > As workaround, I'll put some documentation on the oVirt wiki about how to
> > achieve the same result manually.
> 
> For the record:
> We settled for http://www.ovirt.org/index.php?title=Vdsm_Log_Files as
> reference page. Done in 
> http://www.ovirt.org/index.php?title=Vdsm_Log_Files#Libvirt_debug_logs

Thanks for the workaround, so it is at least documented somewhere :)


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