summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rebalance.c
diff options
context:
space:
mode:
authorShylesh Kumar <shylesh@gluster.com>2012-02-23 14:59:36 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-23 04:36:44 -0800
commit88c6c11813cbd60a6b8e5ec4e2edd40e326ac311 (patch)
tree8c4aabe2b9797747b5bc6e23c6111d460db7369b /xlators/mgmt/glusterd/src/glusterd-rebalance.c
parentd4ff4103e09ba076653aa6f0774269c47cc931f2 (diff)
Change rebalance log file namev3.3.0qa24
Log file name for the rebalance process should be <volname>-rebalance.log Change-Id: I1ed169cdc92b11058b80360086b3c1f7618064ef BUG: 795714 Signed-off-by: Shylesh Kumar <shylesh@gluster.com> Reviewed-on: http://review.gluster.com/2805 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index 0fe8d3899fe..f7304b9c074 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -313,6 +313,7 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr,
struct stat buf = {0,};
char sockfile[PATH_MAX] = {0,};
char pidfile[PATH_MAX] = {0,};
+ char logfile[PATH_MAX] = {0,};
dict_t *options = NULL;
priv = THIS->private;
@@ -357,7 +358,8 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr,
GLUSTERD_GET_DEFRAG_SOCK_FILE (sockfile, volinfo, priv);
GLUSTERD_GET_DEFRAG_PID_FILE (pidfile, volinfo, priv);
-
+ snprintf (logfile, PATH_MAX, "%s/%s-rebalance.log",
+ DEFAULT_LOG_FILE_DIRECTORY, volinfo->volname);
runinit (&runner);
runner_add_args (&runner, SBIN_DIR"/glusterfs",
"-s", "localhost", "--volfile-id", volinfo->volname,
@@ -371,6 +373,8 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr,
runner_argprintf (&runner, "%s",sockfile);
runner_add_arg (&runner, "--pid-file");
runner_argprintf (&runner, "%s",pidfile);
+ runner_add_arg (&runner, "-l");
+ runner_argprintf (&runner, logfile);
ret = runner_run_reuse (&runner);
if (ret) {