diff options
| author | shishir gowda <shishirng@gluster.com> | 2011-04-14 04:21:48 +0000 | 
|---|---|---|
| committer | Anand Avati <avati@gluster.com> | 2011-04-14 03:38:33 -0700 | 
| commit | 1d1452e070f990cc91fea87408ea4905abde2fb7 (patch) | |
| tree | c4bf937fe22bc609db5a7f9ef08b182ae5d982b8 /xlators/cluster/dht/src/dht.c | |
| parent | 6c16974a0ed485c72f84922fcf67b76ac8f64358 (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.c')
| -rw-r--r-- | xlators/cluster/dht/src/dht.c | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c index c9b77d64428..ad83d8d4f03 100644 --- a/xlators/cluster/dht/src/dht.c +++ b/xlators/cluster/dht/src/dht.c @@ -419,6 +419,19 @@ init (xlator_t *this)                  }          } +        conf->assert_no_child_down = 0; + +        if (!dict_get_str (this->options, "assert-no-child-down", &temp_str)) { +                if (!strncmp (temp_str, "on", strlen (temp_str))) { +                        conf->assert_no_child_down = 1; +                        gf_log (this->name, GF_LOG_INFO, +                                "assert-no-child-down set to on"); +                } else { +                        conf->assert_no_child_down = 0; +                        gf_log (this->name, GF_LOG_INFO, +                                "assert-no-child-down set to off"); +                } +        }          ret = dht_init_subvolumes (this, conf);          if (ret == -1) { @@ -543,5 +556,9 @@ struct volume_options options[] = {          { .key = {"use-readdirp"},            .type = GF_OPTION_TYPE_BOOL          }, +        { .key = {"assert-no-child-down"}, +          .value = {"on", "off"}, +          .type = GF_OPTION_TYPE_STR +        },          { .key  = {NULL} },  };  | 
