summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c5
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 6ca2f3661cb..6466f9e7f1a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -1047,7 +1047,8 @@ glusterd_store_update_peerinfo (glusterd_peerinfo_t *peerinfo)
snprintf (filepath, PATH_MAX, "%s/%s", peerdir,
peerinfo->hostname);
} else {
- GF_ASSERT (peerinfo->uuid || peerinfo->hostname);
+ ret = 0;
+ goto out;
}
} else {
uuid_unparse (peerinfo->uuid, str);
@@ -1105,7 +1106,7 @@ out:
int32_t
glusterd_store_retrieve_peers (xlator_t *this)
{
- int32_t ret = -1;
+ int32_t ret = 0;
glusterd_conf_t *priv = NULL;
DIR *dir = NULL;
struct dirent *entry = NULL;
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 5b75c93fadd..7d888d944fb 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -229,6 +229,16 @@ init (xlator_t *this)
" ,errno = %d", voldir, errno);
}
+ snprintf (voldir, PATH_MAX, "%s/peers", dirname);
+
+ ret = mkdir (voldir, 0777);
+
+ if ((-1 == ret) && (errno != EEXIST)) {
+ gf_log (this->name, GF_LOG_CRITICAL,
+ "Unable to create peers directory %s"
+ " ,errno = %d", voldir, errno);
+ }
+
rpc = rpcsvc_init (this->ctx, this->options);
if (rpc == NULL) {
gf_log (this->name, GF_LOG_ERROR,