diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2013-05-14 14:00:08 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-05-14 10:47:09 -0700 |
commit | 2ee82710c088461cf4d3769625723346345566f9 (patch) | |
tree | c0d0ae7dec81921a9b2bac047de91219e64800bf /xlators | |
parent | c59166c5a3306231864fe7d99e383259a9385233 (diff) |
libglusterfs/statedump: move options file and statedumps from /tmp
Change-Id: I6b107b9a668b0521b955dba8895cbbeaf9e7cb02
BUG: 764890
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/5005
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 6 | ||||
-rw-r--r-- | xlators/protocol/server/src/Makefile.am | 1 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.c | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 9346e1d9c..eada07c92 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -79,7 +79,7 @@ #define NLMV4_VERSION 4 #define NLMV1_VERSION 1 -char *glusterd_sock_dir = "/tmp"; +char *glusterd_sock_dir = "/var/run"; static glusterd_lock_t lock; static void @@ -5179,7 +5179,7 @@ glusterd_brick_statedump (glusterd_volinfo_t *volinfo, } snprintf (dumpoptions_path, sizeof (dumpoptions_path), - "/tmp/glusterdump.%d.options", pid); + DEFAULT_VAR_RUN_DIRECTORY"glusterdump.%d.options", pid); ret = glusterd_set_dump_options (dumpoptions_path, options, option_cnt); if (ret < 0) { gf_log ("", GF_LOG_ERROR, "error while parsing the statedump " @@ -5252,7 +5252,7 @@ glusterd_nfs_statedump (char *options, int option_cnt, char **op_errstr) } snprintf (dumpoptions_path, sizeof (dumpoptions_path), - "/tmp/glusterdump.%d.options", pid); + DEFAULT_VAR_RUN_DIRECTORY"glusterdump.%d.options", pid); ret = glusterd_set_dump_options (dumpoptions_path, options, option_cnt); if (ret < 0) { gf_log ("", GF_LOG_ERROR, "error while parsing the statedump " diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am index 0df5894ec..11f311fd6 100644 --- a/xlators/protocol/server/src/Makefile.am +++ b/xlators/protocol/server/src/Makefile.am @@ -16,6 +16,7 @@ AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall \ -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles \ -DCONFDIR=\"$(sysconfdir)/glusterfs\" -D$(GF_HOST_OS) \ -DLIBDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/auth\" \ + -DDATADIR=\"$(localstatedir)\" \ $(GF_CFLAGS) -I$(top_srcdir)/xlators/protocol/lib/src \ -I$(top_srcdir)/rpc/rpc-lib/src/ \ -I$(top_srcdir)/rpc/xdr/src/ diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index f51dfb9c5..ffe938343 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -1208,9 +1208,9 @@ struct volume_options options[] = { }, { .key = {"statedump-path"}, .type = GF_OPTION_TYPE_PATH, - .default_value = "/tmp", + .default_value = DEFAULT_VAR_RUN_DIRECTORY, .description = "Specifies directory in which gluster should save its" - " statedumps. By default it is the /tmp directory" + " statedumps." }, { .key = {"lk-heal"}, .type = GF_OPTION_TYPE_BOOL, |