summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2019-07-25 11:51:32 +0530
committerAmar Tumballi <amarts@redhat.com>2019-08-14 03:21:30 +0000
commit6ef9ffea7fee43ea6f59c8c36fd183f90e9c26f8 (patch)
treec73a7e68188ecf463fc58e5843e2a860909a8675 /xlators/mgmt/glusterd/src/glusterd-mountbroker.c
parent089e53c7f1c32644ce2b37830b678b4c0c7071fc (diff)
glusterd: create separate logdirs for cluster.rc instances
Create a separate logdir for each host instance created by cluster.rc. This makes it easier to determine the files belonging to a particular instance. Change-Id: Ic8321f83f98995412b7d5f095b3d3f0391767a8b Fixes: bz#1733042 Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mountbroker.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mountbroker.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
index 691b96fcf66..9c4b2fb18cc 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
@@ -233,7 +233,7 @@ const char *georep_mnt_desc_template =
"user-map-root=%s "
")"
"SUB+("
- "log-file=" DEFAULT_LOG_FILE_DIRECTORY "/" GEOREP
+ "log-file=%s/" GEOREP
"*/* "
"log-level=* "
"volfile-id=* "
@@ -243,7 +243,8 @@ const char *georep_mnt_desc_template =
")";
int
-make_georep_mountspec(gf_mount_spec_t *mspec, const char *volnames, char *user)
+make_georep_mountspec(gf_mount_spec_t *mspec, const char *volnames, char *user,
+ char *logdir)
{
char *georep_mnt_desc = NULL;
char *meetspec = NULL;
@@ -286,7 +287,7 @@ make_georep_mountspec(gf_mount_spec_t *mspec, const char *volnames, char *user)
}
ret = gf_asprintf(&georep_mnt_desc, georep_mnt_desc_template,
- GF_CLIENT_PID_GSYNCD, user, meetspec);
+ GF_CLIENT_PID_GSYNCD, user, logdir, meetspec);
if (ret == -1) {
georep_mnt_desc = NULL;
goto out;