From daf868e13511d97492ca4ece5fe60a2a4f69a20f Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Sat, 21 Aug 2010 01:50:31 +0000 Subject: 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 Signed-off-by: Anand V. Avati BUG: 1314 (portmapper functionality) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1314 --- xlators/mgmt/glusterd/src/glusterd-utils.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c') 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) { -- cgit