Bug 1378384

Summary: log level set in glfs_set_logging() does not work
Product: [Community] GlusterFS Reporter: Prasanna Kumar Kalever <prasanna.kalever>
Component: libgfapiAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Sudhir D <sdharane>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.8CC: bugs, ndevos, sdharane, vbellur
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8.8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1368882 Environment:
Last Closed: 2017-01-16 12:26:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1368882    
Bug Blocks:    

Description Prasanna Kumar Kalever 2016-09-22 10:18:30 UTC
+++ This bug was initially created as a clone of Bug #1368882 +++

Description of problem:

When a consumer of libgfapi users glfs_set_logging() to set a log level value, the expectation is that log level for gluster would be set to that value. However the logs from gluster behave as if they are set to the default loglevel i.e. GF_LOG_INFO despite the api returning SUCCESS.


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


How reproducible: always


Steps to Reproduce:
1.Alter the gluster log level of a gfapi consumer using glfs_set_logging() to a value other than GF_LOG_INFO.

2. Observe the logs from gluster

Actual results:

All logs upto level GF_LOG_INFO are seen


Expected results:

Only logs pertaining to the appropriate level should be seen from gluster


COMMIT: http://review.gluster.org/15112 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 5ce748ca45c6f2f867819400f50c9cdc12604226
Author: Vijay Bellur <vbellur>
Date:   Mon Aug 8 13:11:29 2016 -0400

    logging: Avoid re-initing log level in io-stats
    
    If log level is already set via api or command line, initialization of
    io-stats xlator overwrites the log level to GF_LOG_INFO. This patch
    prevents re-initialization of log level if already set.
    
    Change-Id: I1f74d94ef8068b95ec696638c0a8b17d8d71aabe
    BUG: 1368882
    Signed-off-by: Vijay Bellur <vbellur>
    Reported-by: Colin Lord <clord>
    Reviewed-on: http://review.gluster.org/15112
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Niels de Vos <ndevos>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 1 Worker Ant 2016-09-22 10:21:18 UTC
REVIEW: http://review.gluster.org/15544 (logging: Avoid re-initing log level in io-stats) posted (#1) for review on release-3.8 by Prasanna Kumar Kalever (pkalever)

Comment 2 ankit 2016-10-14 08:17:25 UTC
*** Bug 1378383 has been marked as a duplicate of this bug. ***

Comment 3 Worker Ant 2017-01-02 19:51:06 UTC
COMMIT: http://review.gluster.org/15544 committed in release-3.8 by Niels de Vos (ndevos) 
------
commit 1e421a5bbf075994882a1fefe1099bf6622d90f6
Author: Vijay Bellur <vbellur>
Date:   Mon Aug 8 13:11:29 2016 -0400

    logging: Avoid re-initing log level in io-stats
    
    If log level is already set via api or command line, initialization of
    io-stats xlator overwrites the log level to GF_LOG_INFO. This patch
    prevents re-initialization of log level if already set.
    
    Backport of:
    > Change-Id: I1f74d94ef8068b95ec696638c0a8b17d8d71aabe
    > BUG: 1368882
    > Signed-off-by: Vijay Bellur <vbellur>
    > Reported-by: Colin Lord <clord>
    > Reviewed-on: http://review.gluster.org/15112
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > Smoke: Gluster Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.org>
    > Reviewed-by: Niels de Vos <ndevos>
    > Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    
    Change-Id: I1f74d94ef8068b95ec696638c0a8b17d8d71aabe
    BUG: 1378384
    Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever>
    Reviewed-on: http://review.gluster.org/15544
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Vijay Bellur <vbellur>
    Reviewed-by: Niels de Vos <ndevos>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 4 Niels de Vos 2017-01-16 12:26:06 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.8, please open a new bug report.

glusterfs-3.8.8 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2017-January/000064.html
[2] https://www.gluster.org/pipermail/gluster-users/