summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorkarthik-us <ksubrahm@redhat.com>2017-09-20 18:30:21 +0530
committerkarthik-us <ksubrahm@redhat.com>2017-09-20 19:03:06 +0530
commit3bbb4fe4b33dc3a3ed068ed2284077f2a4d8265a (patch)
tree0e8d4bcc56f170b041337281784dcd65931e2166 /xlators
parent6b30347f65c9590fa1b636e4aed0471dc8eeff07 (diff)
cluster/afr: Sending subvol up/down events when subvol comes up or goes down
Change-Id: I6580351b245d5f868e9ddc6a4eb4dd6afa3bb6ec BUG: 1493539 Signed-off-by: karthik-us <ksubrahm@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index d71c45d..9d85310 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -4923,6 +4923,7 @@ __afr_handle_child_up_event (xlator_t *this, xlator_t *child_xlator,
"Subvolume '%s' came back up; "
"going online.",
child_xlator->name);
+ gf_event (EVENT_AFR_SUBVOL_UP, "subvol=%s", this->name);
} else {
*event = GF_EVENT_SOME_DESCENDENT_UP;
}
@@ -4999,6 +5000,7 @@ __afr_handle_child_down_event (xlator_t *this, xlator_t *child_xlator,
"All subvolumes are down. Going "
"offline until atleast one of them "
"comes back up.");
+ gf_event (EVENT_AFR_SUBVOLS_DOWN, "subvol=%s", this->name);
} else {
*event = GF_EVENT_SOME_DESCENDENT_DOWN;
}