From ef171ff2bfd114e46442441fbdeb692a416cc951 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Wed, 11 Dec 2013 16:26:25 -0500 Subject: Roll-up patch for NSR so far. Previous history: https://forge.gluster.org/~jdarcy/glusterfs-core/glusterfs-nsr Change-Id: I2b56328788753c6a74d9589815f2dd705ac9ce6a Signed-off-by: Jeff Darcy --- xlators/mgmt/glusterd/src/glusterd.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd.c') diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index c2be2c9da..c3fccf8e1 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1354,7 +1354,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; @@ -1400,6 +1414,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) -- cgit