diff options
author | Mohamed Ashiq <mliyazud@redhat.com> | 2015-11-09 22:09:34 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2015-11-30 00:09:32 -0800 |
commit | 0441e50959e9305c5bc4d0af0576593f8755730e (patch) | |
tree | 0ed25f1a08acef4b461b92f7973272f638cd34cd /xlators/mgmt/glusterd/src/glusterd-quota.c | |
parent | 87845356171afcd07f62f46dd81596e4f71e7935 (diff) |
quota: vol quota fails when transport.socket.bind-address is set in glusterd
When glusterd is binded to specific IP quota fails, since the server is
hardcoded to localhost. IP can be assigned in the glusterd part of quota,
but IP is not populated in cli part. So Quota makes use of glusterfsd's unix
domain socket transport type.
Change-Id: Ib03332cc203795456ee6087017cea08eed3d7417
BUG: 1277105
Signed-off-by: Mohamed Ashiq <mliyazud@redhat.com>
Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/12489
Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-quota.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-quota.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c index b8efcf12eeb..12198cc6cac 100644 --- a/xlators/mgmt/glusterd/src/glusterd-quota.c +++ b/xlators/mgmt/glusterd/src/glusterd-quota.c @@ -229,6 +229,7 @@ glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, char *volname, char mountdir[] = "/tmp/mntXXXXXX"; char logfile[PATH_MAX] = {0,}; runner_t runner = {0}; + char *volfileserver = NULL; if (mkdtemp (mountdir) == NULL) { gf_msg_debug ("glusterd", 0, @@ -239,9 +240,13 @@ glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, char *volname, snprintf (logfile, sizeof (logfile), DEFAULT_LOG_FILE_DIRECTORY"/%s-quota-crawl.log", volname); + if (dict_get_str (THIS->options, "transport.socket.bind-address", + &volfileserver) != 0) + volfileserver = "localhost"; + runinit (&runner); runner_add_args (&runner, SBIN_DIR"/glusterfs", - "-s", "localhost", + "-s", volfileserver, "--volfile-id", volname, "--use-readdirp=no", "--client-pid", QUOTA_CRAWL_PID, |