Bug 1246794 - GF_LOG_NONE logs always
Summary: GF_LOG_NONE logs always
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: logging
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mohamed Ashiq
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1259167
TreeView+ depends on / blocked
 
Reported: 2015-07-25 21:14 UTC by Joe Julian
Modified: 2016-06-16 13:26 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.8rc2
Clone Of:
: 1259167 (view as bug list)
Environment:
Last Closed: 2016-06-16 13:26:51 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Joe Julian 2015-07-25 21:14:02 UTC
GF_LOG_NONE (0) which was inadvertently used causing https://bugzilla.redhat.com/show_bug.cgi?id=1246728 

Shouldn't GF_LOG_NONE mean "Never log this"? If so, it's not being tested for and is, instead, treated as a higher priority than CRITICAL thus is always logged.

Comment 1 Anand Avati 2015-07-29 18:20:19 UTC
REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always) posted (#1) for review on master by Mohamed Ashiq Liyazudeen (mliyazud)

Comment 2 Anand Avati 2015-07-29 19:13:41 UTC
REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always) posted (#2) for review on master by Mohamed Ashiq Liyazudeen (mliyazud)

Comment 3 Anand Avati 2015-07-30 10:32:31 UTC
REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always) posted (#3) for review on master by Mohamed Ashiq Liyazudeen (mliyazud)

Comment 4 Anand Avati 2015-08-05 07:18:20 UTC
REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always) posted (#4) for review on master by Mohamed Ashiq Liyazudeen (mliyazud)

Comment 5 Raghavendra Talur 2015-08-07 19:35:41 UTC
The enum, gf_level_strings is used for two things

a. Admin perspective - Messages with what log level and above the admin is interested in. In this case GF_LOG_NONE means admin wants gluster to never log.

b. Developer perspective - At what level this particular message should be logged at. In this case, GF_LOG_NONE has *no* meaning. Why would a developer call gf_msg and say take this message but don't log it.


The original bug was because we did call gf_msg in one place with log_level of NONE and it was fixed with http://review.gluster.org/#/c/11760.

I would suggest that the only change we do is to only change logic in logging.c to do a special check for GF_LOG_NONE used by a developer for a message and skip that log message Or rather log at GF_LOG_DEBUG complaining that gf_msg is called with GF_LOG_NONE and should never be done.

Comment 6 Joe Julian 2015-08-07 20:17:16 UTC
I can see that. If that's what's done, there needs to be an integration test along with that which fails if the complaint that gf_msg is called with GF_LOG_NONE (or GF_LOG_ZERO or GF_LOG_UNDEF or whatever)

Comment 7 Anand Avati 2015-08-13 10:24:09 UTC
REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always) posted (#5) for review on master by Mohamed Ashiq Liyazudeen (mliyazud)

Comment 8 Anand Avati 2015-09-01 11:37:33 UTC
REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always) posted (#6) for review on master by Raghavendra Talur (rtalur)

Comment 9 Anand Avati 2015-09-01 12:58:43 UTC
COMMIT: http://review.gluster.org/11797 committed in master by Jeff Darcy (jdarcy) 
------
commit 7b390983768e833a8df15b994038155c53d71bdd
Author: Mohamed Ashiq <mliyazud>
Date:   Wed Jul 29 23:47:34 2015 +0530

    logging : GF_LOG_NONE logs always
    
    Shouldn't GF_LOG_NONE mean "Never log this"? If so, it's not being
    tested for and is, instead, treated as a higher priority than
    CRITICAL thus is always logged.
    
    Change-Id: Icad1e02a720a05ff21bd54ebf19c0032e6d5ce03
    BUG: 1246794
    Signed-off-by: Mohamed Ashiq <mliyazud>
    Reviewed-on: http://review.gluster.org/11797
    Reviewed-by: Raghavendra Talur <rtalur>
    Tested-by: NetBSD Build System <jenkins.org>

Comment 10 Niels de Vos 2016-06-16 13:26:51 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.0, please open a new bug report.

glusterfs-3.8.0 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] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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