diff options
author | Anoop C S <anoopcs@redhat.com> | 2015-08-15 10:38:00 +0530 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2015-09-03 08:18:33 -0700 |
commit | b5fff7326e9203c650eb5d395bc5a338075821f1 (patch) | |
tree | 2c281e71323b594a86ea665a1bcd4b13bf56a6b9 /xlators/protocol/server/src/server.h | |
parent | fe7b37960bbef791d9bed79760b61b1d40ca81cd (diff) |
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@redhat.com>
Reviewed-on: http://review.gluster.org/11930
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server.h')
-rw-r--r-- | xlators/protocol/server/src/server.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h index 1055b72dad5..dd80ab75f60 100644 --- a/xlators/protocol/server/src/server.h +++ b/xlators/protocol/server/src/server.h @@ -54,7 +54,7 @@ struct server_conf { heal is on else off. */ char *conf_dir; struct _volfile_ctx *volfile; - struct timespec grace_ts; + uint32_t grace_timeout; dict_t *auth_modules; pthread_mutex_t mutex; struct list_head xprt_list; |