summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-08-10 08:18:47 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-11 23:46:40 -0700
commitca938bbe6f50fc77cbcfb3ca47efef0feb8e7526 (patch)
tree54ca10c1b55e0d616d55a30bcbdaa7061df1e3e2 /xlators/mgmt/glusterd/src/glusterd.c
parentced85cce0700d702640c66829a72822e430f1cca (diff)
glusterd: Remove dependency on existence of peers directory
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1310 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1310
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c10
1 files changed, 10 insertions, 0 deletions
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,