summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2013-12-11 16:26:25 -0500
committerJeff Darcy <jdarcy@redhat.com>2013-12-11 16:26:25 -0500
commitef171ff2bfd114e46442441fbdeb692a416cc951 (patch)
tree27ac663045954c8efb145fbbae3df87d7bbfe5b3 /xlators/mgmt/glusterd/src/glusterd.c
parent4bbbda2017be3cfae57c122d70d11c9470364f63 (diff)
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 <jdarcy@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c16
1 files changed, 16 insertions, 0 deletions
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)