From ca18f4bccd090e98ee5342ca05d3c0f9f94e9e2c Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Tue, 26 Jul 2016 16:01:56 +0530 Subject: glusterd: Add async events As the eventing framework is already in the code, this patch targets to capture all the async glusterd events which are important to be notified to the higher layers which consume the eventing framework. I plan to break this work into two different patches where this patch set covers the first set of events. Change-Id: Ie1bd4f6fa84117b26ccb4c75bc4dc68e6ef19134 BUG: 1360809 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/15015 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Rohan Kanade Reviewed-by: Samikshan Bairagya --- xlators/mgmt/glusterd/src/glusterd-rebalance.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index 35fa4627d04..86e21f396ba 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -1124,10 +1124,13 @@ glusterd_defrag_event_notify_handle (dict_t *dict) ret = glusterd_defrag_volume_status_update (volinfo, dict); - if (ret) + if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_DEFRAG_STATUS_UPDATE_FAIL, "Failed to update status"); + gf_event (EVENT_DEFRAG_STATUS_UPDATE_FAILED, "volume=%s", + volinfo->volname); + } out: return ret; -- cgit