diff options
author | Ravishankar N <ravishankar@redhat.com> | 2016-09-01 13:01:22 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-09-06 23:05:37 -0700 |
commit | 86e312d872a957afff1e508f13f62c4102dba22d (patch) | |
tree | 3339b2180693ab20e8971538632331a59d23a9f3 /xlators/cluster/afr/src/afr-self-heal-common.c | |
parent | f20e41aec392a45f860fa7e80ad5ee9d5607a45c (diff) |
afr: add replication events
Added the following events for the eventing framework:
"EVENT_AFR_QUORUM_MET", --> Sent when quorum is met.
"EVENT_AFR_QUORUM_FAIL" -->Sent when quorum is lost.
"EVENT_AFR_SUBVOL_UP" -->Sent when afr witnesses the first up subvolume.
"EVENT_AFR_SUBVOLS_DOWN"-->Sent when all children of an afr subvol are down.
"EVENT_AFR_SPLIT_BRAIN" -->Sent when self-heal detects split-brain in heal
path (not read/write path).
Change-Id: I937c61ca1ce78b5922ade73c7bfa3051df59c513
BUG: 1371485
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/15349
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index 52e0c75d73e..6b852bf2e78 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -14,6 +14,7 @@ #include "byte-order.h" #include "protocol-common.h" #include "afr-messages.h" +#include "events.h" void afr_heal_synctask (xlator_t *this, afr_local_t *local); @@ -1653,6 +1654,13 @@ afr_selfheal_unlocked_inspect (call_frame_t *frame, xlator_t *this, (int) replies[i].poststat.ia_type, priv->children[i]->name, uuid_utoa (replies[i].poststat.ia_gfid)); + gf_event (EVENT_AFR_SPLIT_BRAIN, "subvol=%s;" + "msg=file type mismatch;gfid=%s;" + "ia_type-%d=%s;ia_type-%d=%s", + this->name, + uuid_utoa (replies[i].poststat.ia_gfid), first, + gf_inode_type_to_str (first.ia_type), i, + gf_inode_type_to_str (replies[i].poststat.ia_type)); ret = -EIO; goto out; } |