+++ This bug was initially created as a clone of Bug #1353156 +++
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.
# 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.
http://review.gluster.org/14873 posted for review.
Verified below things using the build glusterfs-3.8.4-2.
1. CLI and it's options // gluster get-state [DAEMON] odir <path/to/output/dir>
2. Tested for all volume types.
3. Tested all the entries mentioned in the file.
Issues found & Change Requests are tracking in the bug - https://bugzilla.redhat.com/show_bug.cgi?id=1382277
This bug will be moved to VERIFIED STATE once issues and change requests are address.
Issues found with the build glusterfs-3.8.4-2 are address in glusterfs-3.8.4-3 build with bz-https://bugzilla.redhat.com/show_bug.cgi?id=1382277.
Moving to verified state.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.