[Bugs] [Bug 1259167] New: GF_LOG_NONE logs always

bugzilla at redhat.com bugzilla at redhat.com
Wed Sep 2 06:37:43 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1259167

            Bug ID: 1259167
           Summary: GF_LOG_NONE logs always
           Product: GlusterFS
           Version: 3.7.3
         Component: logging
          Keywords: Triaged
          Assignee: bugs at gluster.org
          Reporter: mliyazud at redhat.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com,
                    joe at julianfamily.org, mliyazud at redhat.com,
                    rtalur at redhat.com
        Depends On: 1246794



+++ This bug was initially created as a clone of Bug #1246794 +++

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.

--- Additional comment from Anand Avati on 2015-07-29 14:20:19 EDT ---

REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always)
posted (#1) for review on master by Mohamed Ashiq Liyazudeen
(mliyazud at redhat.com)

--- Additional comment from Anand Avati on 2015-07-29 15:13:41 EDT ---

REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always)
posted (#2) for review on master by Mohamed Ashiq Liyazudeen
(mliyazud at redhat.com)

--- Additional comment from Anand Avati on 2015-07-30 06:32:31 EDT ---

REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always)
posted (#3) for review on master by Mohamed Ashiq Liyazudeen
(mliyazud at redhat.com)

--- Additional comment from Anand Avati on 2015-08-05 03:18:20 EDT ---

REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always)
posted (#4) for review on master by Mohamed Ashiq Liyazudeen
(mliyazud at redhat.com)

--- Additional comment from Raghavendra Talur on 2015-08-07 15:35:41 EDT ---

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.

--- Additional comment from Joe Julian on 2015-08-07 16:17:16 EDT ---

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)

--- Additional comment from Anand Avati on 2015-08-13 06:24:09 EDT ---

REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always)
posted (#5) for review on master by Mohamed Ashiq Liyazudeen
(mliyazud at redhat.com)

--- Additional comment from Anand Avati on 2015-09-01 07:37:33 EDT ---

REVIEW: http://review.gluster.org/11797 (logging : GF_LOG_NONE logs always)
posted (#6) for review on master by Raghavendra Talur (rtalur at redhat.com)

--- Additional comment from Anand Avati on 2015-09-01 08:58:43 EDT ---

COMMIT: http://review.gluster.org/11797 committed in master by Jeff Darcy
(jdarcy at redhat.com) 
------
commit 7b390983768e833a8df15b994038155c53d71bdd
Author: Mohamed Ashiq <mliyazud at redhat.com>
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 at redhat.com>
    Reviewed-on: http://review.gluster.org/11797
    Reviewed-by: Raghavendra Talur <rtalur at redhat.com>
    Tested-by: NetBSD Build System <jenkins at build.gluster.org>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1246794
[Bug 1246794] GF_LOG_NONE logs always
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list