diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 1a6aa81d3..4d09d7fd9 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1475,7 +1475,21 @@ init (xlator_t *this) if (list_empty (&conf->peers)) { glusterd_launch_synctask (glusterd_spawn_daemons, NULL); + gf_log (this->name, GF_LOG_INFO, + "no peers, should start FRESH etcd"); + /* + * We might not have any peers now, but if we did once before + * then we don't want to start up with a config that still has + * references to them. + */ + nuke_etcd_dir(); } + else { + gf_log (this->name, GF_LOG_INFO, + "have peers, should start etcd with old config"); + } + conf->etcd_pid = start_etcd(uuid_utoa(MY_UUID),NULL); + ret = glusterd_options_init (this); if (ret < 0) goto out; @@ -1521,6 +1535,8 @@ fini (xlator_t *this) conf = this->private; glusterd_stop_uds_listener (this); + stop_etcd(conf->etcd_pid); + nuke_etcd_dir(); FREE (conf->pmap); if (conf->handle) |