summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2016-07-26 16:01:56 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-08-22 06:10:44 -0700
commitca18f4bccd090e98ee5342ca05d3c0f9f94e9e2c (patch)
tree4ea51c5424f1b0d927292c8b51177da99d1cd213 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parentfcb5b70b1099d0379b40c81f35750df8bb9545a5 (diff)
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 <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15015 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> Reviewed-by: Rohan Kanade <rkanade@redhat.com> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index b06a5978540..a0904fb9634 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2194,8 +2194,13 @@ glusterd_stop_bricks (glusterd_volinfo_t *volinfo)
cds_list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
/*TODO: Need to change @del_brick in brick_stop to _gf_true
* once we enable synctask in peer rpc prog */
- if (glusterd_brick_stop (volinfo, brickinfo, _gf_false))
+ if (glusterd_brick_stop (volinfo, brickinfo, _gf_false)) {
+ gf_event (EVENT_BRICK_STOP_FAILED,
+ "peer=%s;volume=%s;brick=%s",
+ brickinfo->hostname, volinfo->volname,
+ brickinfo->path);
return -1;
+ }
}
return 0;
@@ -2217,6 +2222,10 @@ glusterd_start_bricks (glusterd_volinfo_t *volinfo)
"Failed to start %s:%s for %s",
brickinfo->hostname, brickinfo->path,
volinfo->volname);
+ gf_event (EVENT_BRICK_START_FAILED,
+ "peer=%s;volume=%s;brick=%s",
+ brickinfo->hostname, volinfo->volname,
+ brickinfo->path);
goto out;
}
}