From 1d1452e070f990cc91fea87408ea4905abde2fb7 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Thu, 14 Apr 2011 04:21:48 +0000 Subject: DHT: Add xlator-option assert_no_child_down If this is set, when CHILD_DOWN event is received, call exit Signed-off-by: shishir gowda Signed-off-by: Anand Avati BUG: 2536 (gsync service introspection) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536 --- xlators/cluster/dht/src/dht-common.c | 6 ++++++ 1 file changed, 6 insertions(+) (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 c89b809b49f..5cf19d017a9 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -5164,6 +5164,12 @@ dht_notify (xlator_t *this, int event, void *data, ...) case GF_EVENT_CHILD_DOWN: subvol = data; + if (conf->assert_no_child_down) { + gf_log (this->name, GF_LOG_WARNING, + "Received CHILD_DOWN. Exiting"); + exit(0); + } + for (i = 0; i < conf->subvolume_cnt; i++) { if (subvol == conf->subvolumes[i]) { cnt = i; -- cgit