summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-11-15 02:55:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-11-15 04:04:04 -0800
commitb552465ca4a8d65650cb1d0beb4ccfe5eaf93c26 (patch)
tree3973545fe47ad102becd20b3f31b8b77eac29031
parent6d42bc03d0ebe6100d9f3815f06637cb1b44c2ac (diff)
Remove symlnk of default log dir to /etc/glusterd
Hence forth the default log dir will be /usr/local/var/log/glusterfs Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2109 (Remove symbolic link of log directory from /etc/glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2109
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c11
2 files changed, 4 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index f7934ef..e675581 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -978,8 +978,8 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo,
exp_path);
brickinfo->logfile = gf_strdup (logfile);
} else if (!brickinfo->logfile) {
- snprintf (logfile, PATH_MAX, "%s/logs/bricks/%s.log",
- priv->workdir, exp_path);
+ snprintf (logfile, PATH_MAX, "%s/bricks/%s.log",
+ DEFAULT_LOG_FILE_DIRECTORY, exp_path);
brickinfo->logfile = gf_strdup (logfile);
}
@@ -1745,7 +1745,7 @@ glusterd_nfs_server_start ()
goto out;
}
- snprintf (logfile, PATH_MAX, "%s/logs/nfs.log", priv->workdir);
+ snprintf (logfile, PATH_MAX, "%s/nfs.log", DEFAULT_LOG_FILE_DIRECTORY);
snprintf (cmd_str, 8192,
"%s/sbin/glusterfs -f %s -p %s -l %s",
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 78328b9..223ab42 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -305,16 +305,7 @@ init (xlator_t *this)
exit (1);
}
- snprintf (voldir, PATH_MAX, "%s/logs", dirname);
- ret = symlink (DEFAULT_LOG_FILE_DIRECTORY, voldir);
- if ((-1 == ret) && (errno != EEXIST)) {
- gf_log (this->name, GF_LOG_CRITICAL,
- "Unable to create symlink to logs directory %s"
- " ,errno = %d", voldir, errno);
- exit (1);
- }
-
- snprintf (voldir, PATH_MAX, "%s/logs/bricks", dirname);
+ snprintf (voldir, PATH_MAX, "%s/bricks", DEFAULT_LOG_FILE_DIRECTORY);
ret = mkdir (voldir, 0777);
if ((-1 == ret) && (errno != EEXIST)) {
gf_log (this->name, GF_LOG_CRITICAL,