summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-21 01:50:31 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-21 05:17:27 -0700
commitdaf868e13511d97492ca4ece5fe60a2a4f69a20f (patch)
treed0a222781b0fd99e2d713fdc8b7dcdc8c2f8631b /xlators/mgmt/glusterd/src/glusterd-utils.c
parentc429e47ae3925d0bc1ca113e37d903410f3e043a (diff)
portmapper program added to glusterfsd mgmt rpc
* some bug fixes glusterd-pmap.c * also renamed 'fetch-spec.c' -> 'glusterfsd-mgmt.c' Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1314 (portmapper functionality) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1314
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index beb4185835b..4202f271638 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -763,16 +763,18 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo,
port = pmap_registry_alloc (THIS);
GLUSTERD_GET_BRICK_PIDFILE (pidfile, path, brickinfo->hostname, count);
- snprintf (volfile, PATH_MAX, "%s/%s-%s-%d.vol", path,
- brickinfo->hostname, volinfo->volname, count);
+ snprintf (volfile, PATH_MAX, "%s-%s-%d", brickinfo->hostname,
+ volinfo->volname, count);
snprintf (cmd_str, 8192,
- "glusterfs --xlator-option server-*.listen-port=%d -f %s -p %s",
- port, volfile, pidfile);
+ "glusterfs --xlator-option server-*.listen-port=%d "
+ "-s localhost --volfile-id %s -p %s --brick-name %s "
+ "--brick-port %d",
+ port, volfile, pidfile, brickinfo->path, port);
ret = system (cmd_str);
if (ret == 0) {
- pmap_registry_bind (THIS, port, brickinfo->path);
+ //pmap_registry_bind (THIS, port, brickinfo->path);
brickinfo->port = port;
}
out:
@@ -832,6 +834,8 @@ glusterd_volume_stop_glusterfs (glusterd_volinfo_t *volinfo,
goto out;
}
+ //pmap_registry_remove (THIS, brickinfo->port, brickinfo->path);
+
ret = unlink (pidfile);
if (ret) {