Bug 1169302

Summary: Unable to take Statedump for gfapi applications
Product: [Community] GlusterFS Reporter: Poornima G <pgurusid>
Component: libgfapiAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Sudhir D <sdharane>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, kkeithle, ndevos, vbellur
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.11.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1378085 1418981 1421137 (view as bug list) Environment:
Last Closed: 2017-05-30 18:32:08 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:
Bug Depends On:    
Bug Blocks: 1378085, 1418981, 1421137, 1436678    

Description Poornima G 2014-12-01 09:51:00 UTC
Description of problem:
Unable to take Statedump for gfapi applications

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2014-12-02 06:54:47 UTC
REVIEW: http://review.gluster.org/9228 (libgfapi: statedump support) posted (#1) for review on master by Poornima G (pgurusid)

Comment 2 Anand Avati 2014-12-03 07:11:58 UTC
REVIEW: http://review.gluster.org/9228 (libgfapi: statedump support) posted (#2) for review on master by Poornima G (pgurusid)

Comment 3 Anand Avati 2015-01-05 10:54:21 UTC
REVIEW: http://review.gluster.org/9228 (libgfapi: statedump support) posted (#3) for review on master by Poornima G (pgurusid)

Comment 4 Kaleb KEITHLEY 2015-10-22 15:40:20 UTC
pre-release version is ambiguous and about to be removed as a choice.

If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.

Comment 5 Vijay Bellur 2016-01-28 06:46:57 UTC
REVIEW: http://review.gluster.org/9228 (libgfapi: Implement statedump) posted (#4) for review on master by Poornima G (pgurusid)

Comment 6 Vijay Bellur 2016-03-16 09:37:53 UTC
REVIEW: http://review.gluster.org/9228 (libgfapi: Implement statedump) posted (#5) for review on master by Poornima G (pgurusid)

Comment 7 Vijay Bellur 2016-07-20 05:44:13 UTC
REVIEW: http://review.gluster.org/9228 (libgfapi: Implement statedump) posted (#6) for review on master by Poornima G (pgurusid)

Comment 8 Worker Ant 2017-01-06 06:05:36 UTC
REVIEW: http://review.gluster.org/9228 (libgfapi: Implement statedump) posted (#7) for review on master by Poornima G (pgurusid)

Comment 9 Worker Ant 2017-01-09 05:48:55 UTC
REVIEW: http://review.gluster.org/9228 (libgfapi: Implement statedump) posted (#8) for review on master by Poornima G (pgurusid)

Comment 10 Worker Ant 2017-01-15 19:30:52 UTC
REVIEW: http://review.gluster.org/9228 (glusterd: add a cli command to trigger a statedump on a client) posted (#9) for review on master by Niels de Vos (ndevos)

Comment 11 Worker Ant 2017-01-15 19:30:56 UTC
REVIEW: http://review.gluster.org/16414 (gfapi: add API to trigger events for debugging and troubleshooting) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 12 Worker Ant 2017-01-15 19:30:59 UTC
REVIEW: http://review.gluster.org/16415 (gfapi: create statedump when glusterd requests it) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 13 Worker Ant 2017-01-17 13:33:12 UTC
REVIEW: http://review.gluster.org/9228 (glusterd: add a cli command to trigger a statedump on a client) posted (#10) for review on master by Niels de Vos (ndevos)

Comment 14 Worker Ant 2017-01-17 13:33:16 UTC
REVIEW: http://review.gluster.org/16415 (gfapi: create statedump when glusterd requests it) posted (#2) for review on master by Niels de Vos (ndevos)

Comment 15 Worker Ant 2017-01-17 13:33:19 UTC
REVIEW: http://review.gluster.org/16414 (gfapi: add API to trigger events for debugging and troubleshooting) posted (#2) for review on master by Niels de Vos (ndevos)

Comment 16 Worker Ant 2017-01-17 15:20:56 UTC
REVIEW: http://review.gluster.org/16415 (gfapi: create statedump when glusterd requests it) posted (#3) for review on master by Niels de Vos (ndevos)

Comment 17 Worker Ant 2017-01-19 18:10:40 UTC
REVIEW: http://review.gluster.org/9228 (glusterd: add a cli command to trigger a statedump on a client) posted (#11) for review on master by Niels de Vos (ndevos)

Comment 18 Worker Ant 2017-01-19 18:10:43 UTC
REVIEW: http://review.gluster.org/16415 (gfapi: create statedump when glusterd requests it) posted (#4) for review on master by Niels de Vos (ndevos)

Comment 19 Worker Ant 2017-01-19 18:44:27 UTC
COMMIT: http://review.gluster.org/16414 committed in master by Shyamsundar Ranganathan (srangana) 
------
commit d93a6691538270aefe7703e8f8d7c822f53528e5
Author: Niels de Vos <ndevos>
Date:   Fri Jan 6 12:49:32 2017 +0100

    gfapi: add API to trigger events for debugging and troubleshooting
    
    Introduce glfs_sysrq() as a generic API for triggering debug and
    troubleshoot events. This interface will be used by the feature to get
    statedumps for applications using libgfapi.
    
    The current events that can be requested through this API are:
     - 'h'elp: log a mesage with all supported events
     - 's'tatedump: trigger a statedump for the passed glfs_t
    
    In future, this API can be used by a CLI to trigger statedumps from
    storage servers. At the moment it is limited to take statedumps, but it
    is extensible to set the log-level, clear caches, force reconnects and
    much more.
    
    BUG: 1169302
    Change-Id: I18858359a3957870cea5139c79efe1365a15a992
    Original-author: Poornima G <pgurusid>
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/16414
    Reviewed-by: Prashanth Pai <ppai>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 20 Worker Ant 2017-01-19 21:33:22 UTC
REVIEW: http://review.gluster.org/16415 (gfapi: create statedump when glusterd requests it) posted (#5) for review on master by Niels de Vos (ndevos)

Comment 21 Worker Ant 2017-01-20 11:05:46 UTC
REVIEW: http://review.gluster.org/9228 (glusterd: add a cli command to trigger a statedump on a client) posted (#12) for review on master by Niels de Vos (ndevos)

Comment 22 Worker Ant 2017-01-20 11:05:50 UTC
REVIEW: http://review.gluster.org/16415 (gfapi: create statedump when glusterd requests it) posted (#6) for review on master by Niels de Vos (ndevos)

Comment 23 Worker Ant 2017-01-20 11:27:19 UTC
REVIEW: http://review.gluster.org/16415 (gfapi: create statedump when glusterd requests it) posted (#7) for review on master by Niels de Vos (ndevos)

Comment 24 Worker Ant 2017-01-20 11:41:48 UTC
REVIEW: http://review.gluster.org/16415 (gfapi: create statedump when glusterd requests it) posted (#8) for review on master by Niels de Vos (ndevos)

Comment 25 Kaleb KEITHLEY 2017-02-22 18:38:38 UTC
this change breaks the build of 3.10.0 RC1 on SuSE

...
[  259s] ... running 01-check-debuginfo
[  259s] ... testing for empty debuginfo packages
[  259s] ... running 02-check-gcc-output
[  259s] ... testing for serious compiler warnings
[  259s]     (using /usr/lib/build/checks-data/check_gcc_output)
[  259s]     (using //.build.log)
[  260s] 
[  260s] I: Statement might be overflowing a buffer in strncat. Common mistake:
[  260s]    BAD: strncat(buffer,charptr,sizeof(buffer)) is wrong, it takes the left over size as 3rd argument
[  260s]    GOOD: strncat(buffer,charptr,sizeof(buffer)-strlen(buffer)-1)
[  260s] E: glusterfs bufferoverflowstrncat glfs.c:1491:33
[  260s] 
[  260s] lamb07 failed "build glusterfs.spec" at Wed Feb 22 18:34:37 UTC 2017.

Comment 26 Worker Ant 2017-02-22 19:00:49 UTC
REVIEW: https://review.gluster.org/16722 (gfapi: OBS build fails in post build analysis) posted (#1) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 27 Worker Ant 2017-02-23 19:14:02 UTC
COMMIT: https://review.gluster.org/16722 committed in master by Shyamsundar Ranganathan (srangana) 
------
commit 47da9260c51d5a7b066fa9f982f3bd6aef9c64f3
Author: Kaleb S. KEITHLEY <kkeithle>
Date:   Wed Feb 22 13:55:00 2017 -0500

    gfapi: OBS build fails in post build analysis
    
    Originally gfapi: create statedump when glusterd requests it
    
    When GlusterD sends the STATEDUMP procedure to the libgfapi client, the
    client checks if it matches the PID that should take the statedump. If
    so, it will do a statedump for the glfs_t that is connected to this mgmt
    connection.
    
    See https://bugzilla.redhat.com/show_bug.cgi?id=1169302#c25 for the
    OpenSuSE Build System post build analysis error.
    
    See Change-Id: I70d6a1f4f19d525377aebc8fa57f51e513b92d84
        https://review.gluster.org/#/c/16415/
    
    Change-Id: I7775f44ce13e20c831e8f1015816a28471d35bb4
    BUG: 1169302
    Signed-off-by: Kaleb S. KEITHLEY <kkeithle>
    Reviewed-on: https://review.gluster.org/16722
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Niels de Vos <ndevos>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 28 Shyamsundar 2017-05-30 18:32:08 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.11.0, please open a new bug report.

glusterfs-3.11.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://lists.gluster.org/pipermail/announce/2017-May/000073.html
[2] https://www.gluster.org/pipermail/gluster-users/