summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorKevin Vigor <kvigor@fb.com>2016-10-27 11:18:30 -0700
committerShreyas Siravara <sshreyas@fb.com>2017-09-03 03:04:52 +0000
commitf3100ee0399889d6c4bc4b56368f91c1b8875470 (patch)
treebf34b9aa1a252fa9bf541da335ba6ebc72e9383c /libglusterfs/src
parentc4029a5cb1bb2bceaedb72964ef3da955ffe5bf2 (diff)
Log AFR quorum stats in io-stats translator.
Summary: Add AFR quorum state to io-stats translator. Sample output: { "storage.gluster.nfsd.test-replicate-0.has-quorum": "1", "storage.gluster.nfsd.test-replicate-0.quorum-threshold": "1", "storage.gluster.nfsd.test-replicate-1.has-quorum": "1", "storage.gluster.nfsd.test-replicate-1.quorum-threshold": "1" } The quorum-threshold field shows the number of bricks that can be lost while still maintaining quorum. Negative numbers indicate that quorum has been lost and show the number of bricks that must be brought online to restore quorum. Additionally, I found that the code contained both afr_have_quorum() and afr_has_quorum(), which were mostly cut-n-pasted copies of each other, but with subtle differences. Mercifully, afr_have_quorum() was totally unused, so I nuked it in passing. This is a port of D4089969 to 3.8. Test Plan: Run, observe stats output. Kill brick, observe proper change. fb-smoke. Reviewers: #posix_storage, sshreyas Reviewed By: sshreyas Subscribers: sshreyas Differential Revision: https://phabricator.intern.facebook.com/D4089969 Change-Id: Ifddb351aebfe63998846bb52be8942415ce4c1a9 Reviewed-on: https://review.gluster.org/18188 Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/glusterfs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 59f3df19420..dbe18f2c243 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -192,6 +192,7 @@
#define GF_AFR_DIRTY "trusted.afr.dirty"
#define GF_XATTROP_ENTRY_OUT "glusterfs.xattrop-entry-delete"
#define GF_XATTROP_PURGE_INDEX "glusterfs.xattrop-purge-index"
+#define GF_AFR_QUORUM_CHECK "glusterfs.afr.quorum-check"
#define GF_GFIDLESS_LOOKUP "gfidless-lookup"
/* replace-brick and pump related internal xattrs */