Bug 1227667

Summary: Minor improvements and code cleanup for protocol server/client
Product: [Community] GlusterFS Reporter: Anoop C S <anoopcs>
Component: protocolAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: mainlineCC: bugs, ndevos
Target Milestone: ---Keywords: Tracking, Triaged
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-17 07:19:51 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:

Description Anoop C S 2015-06-03 09:19:27 UTC
Description of problem:

Use this bug to file changes that affect client and server protocol translators. Real bugs (problem reports, crashes) should have their own bugzilla entry for related patches.

Acceptable changes include:
    -Improve code readability
    -Remove dead code
    -Better error reporting
    - . . .

Comment 1 Anand Avati 2015-06-04 11:54:35 UTC
REVIEW: http://review.gluster.org/11088 (protocol/client: Properly handle return value in clnt_release_reopen_fd) posted (#1) for review on master by Anoop C S (achiraya)

Comment 2 Anand Avati 2015-06-08 05:20:15 UTC
REVIEW: http://review.gluster.org/11088 (protocol/client: Properly handle return value in clnt_release_reopen_fd) posted (#2) for review on master by Anoop C S (achiraya)

Comment 3 Anand Avati 2015-06-08 09:01:56 UTC
REVIEW: http://review.gluster.org/11088 (protocol/client: Properly handle return value in clnt_release_reopen_fd) posted (#3) for review on master by Anoop C S (achiraya)

Comment 4 Anand Avati 2015-06-08 12:55:12 UTC
REVIEW: http://review.gluster.org/11088 (protocol/client: Properly handle return value in clnt_release_reopen_fd) posted (#4) for review on master by Anoop C S (achiraya)

Comment 5 Anand Avati 2015-06-22 13:08:29 UTC
COMMIT: http://review.gluster.org/11063 committed in master by Vijay Bellur (vbellur) 
------
commit d65a334691fd339b770114a35edd4d14e9db2678
Author: Anoop C S <achiraya>
Date:   Wed Jun 3 11:38:13 2015 +0530

    protocol/client: Remove unused function clnt_mark_fd_bad()
    
    clnt_mark_fd_bad() is no longer used to mark the fd bad. Instead
    we make use of client_mark_fd_bad() to do the same.
    
    Change-Id: I09af892d8c0c5d1cf853ff020e8596c53d9539c0
    BUG: 1227667
    Signed-off-by: Anoop C S <achiraya>
    Reviewed-on: http://review.gluster.org/11063
    Tested-by: Gluster Build System <jenkins.com>
    Tested-by: NetBSD Build System <jenkins.org>
    Reviewed-by: Krishnan Parthasarathi <kparthas>

Comment 6 Anand Avati 2015-08-13 06:37:21 UTC
REVIEW: http://review.gluster.org/11903 (protocol-client/server: Minor logging improvements for better debugging) posted (#1) for review on master by Anoop C S (anoopcs)

Comment 7 Anand Avati 2015-08-13 09:48:09 UTC
REVIEW: http://review.gluster.org/11909 (protocol/client: Remove logically dead code) posted (#1) for review on master by Anoop C S (anoopcs)

Comment 8 Anand Avati 2015-08-15 06:40:50 UTC
REVIEW: http://review.gluster.org/11930 (protocol-client/server: Fix incorrect grace-timeout value in logs) posted (#1) for review on master by Anoop C S (anoopcs)

Comment 9 Anand Avati 2015-08-15 07:01:23 UTC
REVIEW: http://review.gluster.org/11930 (protocol-client/server: Fix incorrect grace-timeout value in logs) posted (#2) for review on master by Anoop C S (anoopcs)

Comment 10 Anand Avati 2015-08-19 04:59:50 UTC
REVIEW: http://review.gluster.org/11909 (protocol/client: Remove logically dead code) posted (#2) for review on master by Anoop C S (anoopcs)

Comment 11 Anand Avati 2015-08-19 05:07:06 UTC
REVIEW: http://review.gluster.org/11903 (protocol-client/server: Minor logging improvements for better debugging) posted (#2) for review on master by Anoop C S (anoopcs)

Comment 12 Anand Avati 2015-08-20 06:48:07 UTC
REVIEW: http://review.gluster.org/11909 (protocol/client: Remove logically dead code) posted (#3) for review on master by Anoop C S (anoopcs)

Comment 13 Anand Avati 2015-08-20 06:48:33 UTC
REVIEW: http://review.gluster.org/11930 (protocol-client/server: Fix incorrect grace-timeout value in logs) posted (#4) for review on master by Anoop C S (anoopcs)

Comment 14 Vijay Bellur 2015-09-03 08:46:20 UTC
REVIEW: http://review.gluster.org/11930 (protocol-client/server: Fix incorrect grace-timeout value in logs) posted (#5) for review on master by Anoop C S (anoopcs)

Comment 15 Vijay Bellur 2015-09-03 15:18:36 UTC
COMMIT: http://review.gluster.org/11930 committed in master by Jeff Darcy (jdarcy) 
------
commit b5fff7326e9203c650eb5d395bc5a338075821f1
Author: Anoop C S <anoopcs>
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>
    Reviewed-on: http://review.gluster.org/11930
    Tested-by: NetBSD Build System <jenkins.org>
    Reviewed-by: Raghavendra Talur <rtalur>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Jeff Darcy <jdarcy>

Comment 16 Vijay Bellur 2015-09-14 11:41:18 UTC
REVIEW: http://review.gluster.org/12170 (protocol/client: Remove dead code from client_rpc_notify) posted (#1) for review on master by Anoop C S (anoopcs)

Comment 17 Vijay Bellur 2015-09-14 18:07:28 UTC
REVIEW: http://review.gluster.org/12170 (protocol/client: Remove dead code from client_rpc_notify) posted (#2) for review on master by Anoop C S (anoopcs)

Comment 18 Mike McCune 2016-03-28 23:11:51 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 19 Vijay Bellur 2016-05-02 12:47:31 UTC
REVIEW: http://review.gluster.org/14150 (protocol/server: address double free's) posted (#2) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 20 Vijay Bellur 2016-05-02 18:27:51 UTC
COMMIT: http://review.gluster.org/14150 committed in master by Jeff Darcy (jdarcy) 
------
commit 7f92a3de16f9ac34a9c215a7bc067dc6d084af14
Author: Prasanna Kumar Kalever <prasanna.kalever>
Date:   Mon May 2 18:09:12 2016 +0530

    protocol/server: address double free's
    
    Change-Id: Ic8a8fe85cf91c5c7aa93dce872cedbc67464e4ea
    BUG: 1227667
    Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever>
    Reviewed-on: http://review.gluster.org/14150
    Reviewed-by: Jeff Darcy <jdarcy>
    Tested-by: Prasanna Kumar Kalever <pkalever>
    Smoke: Gluster Build System <jenkins.com>
    Reviewed-by: Niels de Vos <ndevos>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>

Comment 21 Anoop C S 2016-06-17 07:19: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