From d80846bee0621f591a7b519743e4d91a620ccdca Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 11 Apr 2012 11:47:17 +0530 Subject: dht/rebalance: Handle ASSERT_ON_CHILD_DOWN gracefully In rebalance process, instead of terminating, send a stop event. The migration in question will either complete or be handled as error. Also, handle few syncop calls as errors, instead of just logging them. Change-Id: If6ed54474cb0f1fe0e28a5765e6d90966740dfde BUG: 811444 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.com/3120 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur --- xlators/cluster/dht/src/dht-common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-common.c') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index d58cac9fae4..57bacb88865 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4568,7 +4568,11 @@ dht_notify (xlator_t *this, int event, void *data, ...) if (conf->assert_no_child_down) { gf_log (this->name, GF_LOG_WARNING, "Received CHILD_DOWN. Exiting"); - kill (getpid(), SIGTERM); + if (conf->defrag) { + gf_defrag_stop (conf->defrag, NULL); + } else { + kill (getpid(), SIGTERM); + } } for (i = 0; i < conf->subvolume_cnt; i++) { -- cgit