Bug 1402279 - Improve daemon logging
Summary: Improve daemon logging
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-imageio
Classification: oVirt
Component: Daemon
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.1.0-beta
: ---
Assignee: Daniel Erez
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-07 07:37 UTC by Ondra Machacek
Modified: 2017-01-02 10:17 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-02 10:02:29 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 69142 0 master MERGED common: log errors higher than 400 as exceptions 2016-12-26 14:11:58 UTC

Description Ondra Machacek 2016-12-07 07:37:40 UTC
It's very hard to debug problems with daemon.

For example when exception here[1] occurs, you should print traceback, so we know what's the problem.

I believe it can be improved on more places.

[1] https://github.com/oVirt/ovirt-imageio/blob/master/daemon/ovirt_imageio_daemon/server.py#L160

Comment 1 Allon Mureinik 2016-12-07 09:47:00 UTC
Tentatively suggesting for 4.1.
If we see this is non-intrusive enough, we ca definitely backport to 4.0.z too.

Comment 2 Ondra Machacek 2016-12-07 09:48:28 UTC
Please at least log the tracebacks of exceptions in 4.0.z.
It's impossible to debug anything, because exceptions are swalloed.

Comment 3 Amit Aviram 2016-12-14 14:36:56 UTC
Ondra, what are the versions of ovirt-imageio-daemon, ovirt-imageio-common in your host?

Comment 4 Ondra Machacek 2016-12-14 14:39:31 UTC
It's following:

[vagrant@host1 ~]$ rpm -qa | grep imageio
ovirt-imageio-daemon-0.5.0-0.201611201242.gitb02532b.el7.centos.noarch
ovirt-imageio-common-0.5.0-0.201611201242.gitb02532b.el7.centos.noarch

Comment 5 Daniel Erez 2016-12-27 16:25:04 UTC
Hi Ondra,

We don't log traceback for 4xx status since it's originated from a user error (i.e. bad parameters), so a full traceback won't help. For 5xx statuses, the traceback should be logged. Did you encounter any other scenario that should have the traceback logged?

Comment 6 Ondra Machacek 2017-01-02 09:03:56 UTC
Hi Daniel,

This one is most important I think, I didn't encounter any other.

Comment 7 Daniel Erez 2017-01-02 09:13:14 UTC
@Nir - (In reply to Ondra Machacek from comment #6)
> Hi Daniel,
> 
> This one is most important I think, I didn't encounter any other.

@Nir - do we have anything else to do in this case besides logging a warning?

Comment 8 Nir Soffer 2017-01-02 09:57:26 UTC
(In reply to Daniel Erez from comment #7)
> @Nir - (In reply to Ondra Machacek from comment #6)
> > Hi Daniel,
> > 
> > This one is most important I think, I didn't encounter any other.
> 
> @Nir - do we have anything else to do in this case besides logging a warning?

I still do not understand this bug. We don't have any details about the error that
is not easy enough to debug without a traceback.

If we don't get more data we should close this bug. The attached patch should be
reverted.

Comment 9 Daniel Erez 2017-01-02 10:02:29 UTC
(In reply to Nir Soffer from comment #8)
> (In reply to Daniel Erez from comment #7)
> > @Nir - (In reply to Ondra Machacek from comment #6)
> > > Hi Daniel,
> > > 
> > > This one is most important I think, I didn't encounter any other.
> > 
> > @Nir - do we have anything else to do in this case besides logging a warning?
> 
> I still do not understand this bug. We don't have any details about the
> error that
> is not easy enough to debug without a traceback.
> 
> If we don't get more data we should close this bug. The attached patch
> should be
> reverted.

Closing. Please re-open if a traceback is mandatory for another error.

Comment 10 Ondra Machacek 2017-01-02 10:17:46 UTC
Feel free to keep it closed if you think the logging of the daemon is good, I've just opened this bug, because it was really hard to work with logs for me, but maybe it's just me, so it's OK if the bug is closed.


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