Description of problem: There is no existing CLI that can be used to get the current local state representation of the cluster as maintained in glusterd in a readable as well as parseable format. The existing "statedump" infrastructure dumps stats related to memory allocation for a daemon by passing SIGUSR1 to it. This while useful for debugging purposes, does not reflect the local state representation of the cluster. Expected results: # gluster get-state [DAEMON] odir <path/to/output/dir> This would dump data points that reflect the local state representation of the cluster as maintained in glusterd (by default if no daemon name is specified) to a file (say glusterd-state) inside the specified output directory. The option for specifying the daemon name would leave room to add support for other daemons as well. This data if required can then be parsed by external applications to represent the cluster state as obtained from glusterd in any other model.
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#1) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#2) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#3) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#4) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#5) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#6) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#7) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#8) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#9) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#10) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#11) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#12) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#13) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#14) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#15) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#16) for review on master by Samikshan Bairagya (samikshan)
REVIEW: http://review.gluster.org/14873 (glusterd/cli: cli to get local state representation from glusterd) posted (#17) for review on master by Samikshan Bairagya (samikshan)
COMMIT: http://review.gluster.org/14873 committed in master by Atin Mukherjee (amukherj) ------ commit 4a3454753f6e4ddc309c8d1cb11a6e4e432c1da6 Author: Samikshan Bairagya <samikshan> Date: Thu Jul 7 20:33:02 2016 +0530 glusterd/cli: cli to get local state representation from glusterd Currently there is no existing CLI that can be used to get the local state representation of the cluster as maintained in glusterd in a readable as well as parseable format. The CLI added has the following usage: # gluster get-state [daemon] [odir <path/to/output/dir>] [file <filename>] This would dump data points that reflect the local state representation of the cluster as maintained in glusterd (no other daemons are supported as of now) to a file inside the specified output directory. The default output directory and filename is /var/run/gluster and glusterd_state_<timestamp> respectively. The option for specifying the daemon name leaves room to add support for other daemons in the future. Following are the data points captured as of now to represent the state from the local glusterd pov: * Peer: - Primary hostname - uuid - state - connection status - List of hostnames * Volumes: - name, id, transport type, status - counts: bricks, snap, subvol, stripe, arbiter, disperse, redundancy - snapd status - quorum status - tiering related information - rebalance status - replace bricks status - snapshots * Bricks: - Path, hostname (for all bricks these info will be shown) - port, rdma port, status, mount options, filesystem type and signed in status for bricks running locally. * Services: - name, online status for initialised services * Others: - Base port, last allocated port - op-version - MYUUID Change-Id: I4a45cc5407ab92d8afdbbd2098ece851f7e3d618 BUG: 1353156 Signed-off-by: Samikshan Bairagya <samikshan> Reviewed-on: http://review.gluster.org/14873 Reviewed-by: Avra Sengupta <asengupt> Smoke: Gluster Build System <jenkins.org> CentOS-regression: Gluster Build System <jenkins.org> NetBSD-regression: NetBSD Build System <jenkins.org> Reviewed-by: Atin Mukherjee <amukherj>
Created attachment 1196302 [details] Example state representation for a 2 node cluster with 3 volumes as seen locally from one of the nodes
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.9.0, please open a new bug report. glusterfs-3.9.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/gluster-users/2016-November/029281.html [2] https://www.gluster.org/pipermail/gluster-users/