summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-04-14 04:21:48 +0000
committerAnand Avati <avati@gluster.com>2011-04-14 03:38:33 -0700
commit1d1452e070f990cc91fea87408ea4905abde2fb7 (patch)
treec4bf937fe22bc609db5a7f9ef08b182ae5d982b8 /xlators/cluster/dht/src/dht-common.c
parent6c16974a0ed485c72f84922fcf67b76ac8f64358 (diff)
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 <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2536 (gsync service introspection) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r--xlators/cluster/dht/src/dht-common.c6
1 files changed, 6 insertions, 0 deletions
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;