summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2016-02-10 15:02:48 +0530
committerRajesh Joseph <rjoseph@redhat.com>2016-02-17 00:48:19 -0800
commitbfe689d25ecde567a90135b47f31b89d7714aaf4 (patch)
tree67418c1cff72d142430461e54d58334d572aa281 /xlators/mgmt
parentd7e052ee24b3e09f2e76c2fdb980e33e74d2a855 (diff)
downloadglusterfs-bfe689d25ecde567a90135b47f31b89d7714aaf4.tar.gz
glusterfs-bfe689d25ecde567a90135b47f31b89d7714aaf4.tar.xz
glusterfs-bfe689d25ecde567a90135b47f31b89d7714aaf4.zip
glusterd/snapshot : Remove stale pmap registry entry
Perform a pmap_registry_remove on a stale registry entry from the previous run of snapd, which makes the query callback always return the older port number. Change-Id: I7fc504d2b09d32a9c945ec2c33e0e092a0d186ec BUG: 1306193 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/13420 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapd-svc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
index 7cd6fdd6ac..82ba7f7755 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
@@ -295,6 +295,17 @@ glusterd_snapdsvc_start (glusterd_svc_t *svc, int flags)
"--brick-name", snapd_id,
"-S", svc->conn.sockpath, NULL);
+ /* Do a pmap registry remove on the older connected port */
+ if (volinfo->snapd.port) {
+ ret = pmap_registry_remove (this, volinfo->snapd.port,
+ snapd_id, GF_PMAP_PORT_BRICKSERVER,
+ NULL);
+ if (ret) {
+ snprintf (msg, sizeof (msg), "Failed to remove pmap "
+ "registry for older signin");
+ goto out;
+ }
+ }
snapd_port = pmap_registry_alloc (THIS);
if (!snapd_port) {