diff options
author | Amar Tumballi <amar@gluster.com> | 2010-08-29 07:08:37 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-08-29 11:37:26 -0700 |
commit | fb3cb751f18a931d2a61d168fa13bf8ec3b45e1a (patch) | |
tree | 24cb373f99771e9a3323469ae7c6432993f7d152 /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | 127dd2ada6e06abf0761ea647f7ae18a5de78e4f (diff) |
mgmt/glusterd: handle port allocation so ports are reused for same brickv3.1.0qa11
* if 'brickinfo->port' exists use it instead of pmap_registry_alloc(),
hence a brick after stop/start starts on same port
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1473 (reuse the ports while starting 'glusterfsd')
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1473
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 156e262ab16..0d1d7bf64e8 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -786,7 +786,9 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo, goto out; } - port = pmap_registry_alloc (THIS); + port = brickinfo->port; + if (!port) + port = pmap_registry_alloc (THIS); GLUSTERD_GET_BRICK_PIDFILE (pidfile, path, brickinfo->hostname, brickinfo->path); |