Bug 1360301 - [RFE] allow qemu gfapi log redirection
Summary: [RFE] allow qemu gfapi log redirection
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: pre-dev-freeze
: 7.4
Assignee: Jeff Cody
QA Contact: Suqin Huang
URL:
Whiteboard:
Depends On:
Blocks: 1376009
TreeView+ depends on / blocked
 
Reported: 2016-07-26 12:15 UTC by Sahina Bose
Modified: 2017-08-02 03:27 UTC (History)
14 users (show)

Fixed In Version: QEMU 2.8.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 23:32:13 UTC


Attachments (Terms of Use)
file.debug=1 (5.26 KB, text/plain)
2017-03-03 09:19 UTC, Suqin Huang
no flags Details
file.debug=10 (20.42 KB, text/plain)
2017-03-03 09:20 UTC, Suqin Huang
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2392 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2017-08-01 20:04:36 UTC

Description Sahina Bose 2016-07-26 12:15:00 UTC
Description of problem:

When qemu images are accessed via gfapi, troubleshooting is an issue as there are no logs unlike with fuse access. We require logging to be implemented for this path.

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

How reproducible:
NA

Comment 1 rjoseph 2016-07-29 13:11:48 UTC
(In reply to Sahina Bose from comment #0)
> Description of problem:
> 
> When qemu images are accessed via gfapi, troubleshooting is an issue as
> there are no logs unlike with fuse access. We require logging to be
> implemented for this path.
> 

Are you saying that there are no logs at all or whatever the log is there it is not sufficient?

It would be good to have some more clarification on this bug.

Comment 2 Sahina Bose 2016-08-01 07:04:10 UTC
No log file while accessing qemu via gfapi currently

Prasanna, can you add more details to this bug?

Comment 3 Prasanna Kumar Kalever 2016-08-01 09:25:49 UTC
Sure sahina :)

I have put about improvement at least which I know and worked on and in qemu block layer, there were recent changes in Qemu that helps in choosing LOG LEVEL [1] and should land in RHEL-7.3.

But with current code, the qemu gfapi logs fall on stderr and there is no way to configure them for redirection (internally)

Patch [2] specifies an option for doing so, yet not part of qemu-2.7, since it was initiated at hard-freeze state, after a conversation maintainer confirms as it will not fall in bugs category couldn't make in 2.7, though it got a review.

I hope it should go in 2.8.

That's all for now.


[1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg364972.html
[2] https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg05439.html

Comment 4 Atin Mukherjee 2016-08-03 15:12:56 UTC
Hi Rajesh,

I have given a devel_ack on this, if you think this BZ needs to be moved out to a different component please do that and remove the ack and tracker.

Thanks,
Atin

Comment 5 Atin Mukherjee 2016-08-03 15:13:22 UTC
read component as product in comment 4

Comment 6 Ademar Reis 2016-08-04 18:09:18 UTC
For logging level, see Bug 1151859

Comment 7 Sahina Bose 2016-09-14 12:12:02 UTC
We need the ability to redirect the gfapi logs to a log file instead of stderr to ensure supportability. From RHV 4.1, images on gluster volumes will be accessed via gfapi instead of fuse using the gluster driver in qemu. This path has no logging unlike the fuse access and troubleshooting customer issues will be a major problem.

Comment 9 Jeff Cody 2016-12-21 18:57:21 UTC
Patch to support this is in QEMU 2.8.0:

commit e9db8ff38e539260a2cb5a7918d1155b7d92a264
Author: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Date:   Fri Jul 22 20:26:48 2016 +0530

    block/gluster: add support to choose libgfapi logfile
    
    currently all the libgfapi logs defaults to '/dev/stderr' as it was hardcoded
    in a call to glfs logging api. When the debug level is chosen to DEBUG/TRACE,
    gfapi logs will be huge and fill/overflow the console view.
    
    This patch provides a commandline option to mention log file path which helps
    in logging to the specified file and also help in persisting the gfapi logs.

Comment 14 Suqin Huang 2017-03-03 09:17:24 UTC
1. package version
qemu-kvm-rhev-2.8.0-5.el7.x86_64

2. boot guest with 
-drive id=drive_image2,if=none,cache=none,format=qcow2,file=gluster://bootp-73-130-253.rhts.eng.pek2.redhat.com/gv0/stg1.qcow2,file.debug=1,file.logfile=/var/qemu-gfapi.log \

3. get debug log from /var/qemu-gfapi.log

4. boot guest with 
file.debug=10,file.logfile=/var/qemu-gfapi.log \

I can get debug log as well, but the debug level should between 0~9

Comment 15 Suqin Huang 2017-03-03 09:19:45 UTC
Created attachment 1259434 [details]
file.debug=1

Comment 16 Suqin Huang 2017-03-03 09:20:14 UTC
Created attachment 1259435 [details]
file.debug=10

Comment 17 Suqin Huang 2017-03-03 09:22:09 UTC
Hi Jeff,

Could you check the test result, is it acceptable that debug log is generated when debug level is out of (0~9)

Thanks
Suqin

Comment 18 Jeff Cody 2017-03-15 14:12:36 UTC
(In reply to Suqin Huang from comment #17)
> Hi Jeff,
> 
> Could you check the test result, is it acceptable that debug log is
> generated when debug level is out of (0~9)
> 
> Thanks
> Suqin

Yes, that is acceptable.  Higher numbers are increasing verbosity; a level of 9 is the maximum level, so debug levels passed higher than 9 will be equivalent to 9.

Comment 19 Suqin Huang 2017-03-20 06:56:35 UTC
Update to verified according to comment14 and comment18

Comment 21 errata-xmlrpc 2017-08-01 23:32:13 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/RHSA-2017:2392

Comment 22 errata-xmlrpc 2017-08-02 01:09:52 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/RHSA-2017:2392

Comment 23 errata-xmlrpc 2017-08-02 02:01:51 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/RHSA-2017:2392

Comment 24 errata-xmlrpc 2017-08-02 02:42:37 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/RHSA-2017:2392

Comment 25 errata-xmlrpc 2017-08-02 03:07:20 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/RHSA-2017:2392

Comment 26 errata-xmlrpc 2017-08-02 03:27:29 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/RHSA-2017:2392


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