[Bugs] [Bug 1227667] Minor improvements and code cleanup for protocol server/client

bugzilla at redhat.com bugzilla at redhat.com
Thu Sep 3 15:18:36 UTC 2015


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



--- Comment #15 from Vijay Bellur <vbellur at redhat.com> ---
COMMIT: http://review.gluster.org/11930 committed in master by Jeff Darcy
(jdarcy at redhat.com) 
------
commit b5fff7326e9203c650eb5d395bc5a338075821f1
Author: Anoop C S <anoopcs at redhat.com>
Date:   Sat Aug 15 10:38:00 2015 +0530

    protocol-client/server: Fix incorrect grace-timeout value in logs

    When grace-timer is initialized via server/client init,
    the default or reconfigured value for grace-timeout is
    displayed incorrectly in both server and client logs.
    This is because we use gf_time_fmt() to format this
    grace-timeout value with gf_timefmt_s as the time format
    as shown below:

    gf_time_fmt (timestr, sizeof timestr, conf->grace_ts.tv_sec,
                         gf_timefmt_s);

    gf_timefmt_s format is a wrapper for %s format specification
    used in strftime library call which populates the number
    of seconds since the Epoch [1970-01-01 00:00:00 +0000 (UTC)].
    But this particular format is dependent on timezone
    [1970-01-01 05:30:00 +0530 (IST)]and thus displayed incorrectly
    in logs.

    Example:
    For IST with default grace-timeout value 10, it is displayed
    as -19790 which is calculated as follows,
    1970-01-01 00:00:10 - 1970-01-01 05:30:00 = -19790 seconds.

    Change-Id: I1bdf5d12b2167323f86f0ca52a37ffb316b3f0a2
    BUG: 1227667
    Signed-off-by: Anoop C S <anoopcs at redhat.com>
    Reviewed-on: http://review.gluster.org/11930
    Tested-by: NetBSD Build System <jenkins at build.gluster.org>
    Reviewed-by: Raghavendra Talur <rtalur at redhat.com>
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Jeff Darcy <jdarcy at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=IJibH5vRaY&a=cc_unsubscribe


More information about the Bugs mailing list