summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 5f7298c3436..766c926b802 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -79,23 +79,21 @@ glusterd_opinfo_init ()
return ret;
}
-static int
-glusterd_uuid_init (int flag)
+int
+glusterd_uuid_init ()
{
int ret = -1;
glusterd_conf_t *priv = NULL;
priv = THIS->private;
- if (!flag) {
- ret = glusterd_retrieve_uuid ();
- if (!ret) {
- uuid_copy (glusterd_uuid, priv->uuid);
- gf_log ("glusterd", GF_LOG_INFO,
- "retrieved UUID: %s", uuid_utoa (priv->uuid));
- return 0;
- }
- }
+ ret = glusterd_retrieve_uuid ();
+ if (ret == 0) {
+ uuid_copy (glusterd_uuid, priv->uuid);
+ gf_log ("glusterd", GF_LOG_INFO,
+ "retrieved UUID: %s", uuid_utoa (priv->uuid));
+ return 0;
+ }
uuid_generate (glusterd_uuid);
@@ -978,10 +976,6 @@ init (xlator_t *this)
(void) glusterd_nodesvc_set_running ("glustershd", _gf_false);
/* this->ctx->top = this;*/
- ret = glusterd_uuid_init (first_time);
- if (ret < 0)
- goto out;
-
GLUSTERD_GET_HOOKS_DIR (hooks_dir, GLUSTERD_HOOK_VER, conf);
if (stat (hooks_dir, &buf)) {
ret = glusterd_hooks_create_hooks_directory (dirname);