diff options
| author | hari gowtham <hgowtham@redhat.com> | 2017-05-18 14:15:39 +0530 | 
|---|---|---|
| committer | Raghavendra Talur <rtalur@redhat.com> | 2017-05-31 06:00:16 +0000 | 
| commit | 580ede76c7c9fbf2bb250d43996b26ab9ffa386e (patch) | |
| tree | bfffd42b0a8f77ee01c50695d26281459d32b789 | |
| parent | c49a2de9ad193c1de0b7f9db3f73d44c7555d3fb (diff) | |
Tier: removing port allocated for tier
Problem: Tier has a port which it doesn't use.
Fix: Remove the port getting allocated for tier.
>Change-Id: If0fe393fc335d9f622a063787e0a3c6db9b7a50c
>BUG: 1452006
>Signed-off-by: hari gowtham <hgowtham@redhat.com>
>Reviewed-on: https://review.gluster.org/17328
>Tested-by: hari gowtham <hari.gowtham005@gmail.com>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Change-Id: If0fe393fc335d9f622a063787e0a3c6db9b7a50c
BUG: 1456682
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Reviewed-on: https://review.gluster.org/17420
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: hari gowtham <hari.gowtham005@gmail.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-tier.c | 6 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-tierd-svc.c | 28 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-tierd-svc.h | 1 | 
3 files changed, 0 insertions, 35 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-tier.c b/xlators/mgmt/glusterd/src/glusterd-tier.c index 0afdab56c9c..e3b2bc62914 100644 --- a/xlators/mgmt/glusterd/src/glusterd-tier.c +++ b/xlators/mgmt/glusterd/src/glusterd-tier.c @@ -1176,12 +1176,6 @@ glusterd_add_tierd_to_dict (glusterd_volinfo_t *volinfo,          if (ret)                  goto out; -        memset (key, 0, sizeof (key)); -        snprintf (key, sizeof (key), "%s.port", base_key); -        ret = dict_set_int32 (dict, key, volinfo->tierd.port); -        if (ret) -                goto out; -          glusterd_svc_build_tierd_pidfile (volinfo, pidfile, sizeof (pidfile));          brick_online = gf_is_service_running (pidfile, &pid); diff --git a/xlators/mgmt/glusterd/src/glusterd-tierd-svc.c b/xlators/mgmt/glusterd/src/glusterd-tierd-svc.c index bfc879a3436..c88e6a3a9a4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-tierd-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-tierd-svc.c @@ -226,7 +226,6 @@ glusterd_tierdsvc_manager (glusterd_svc_t *svc, void *data, int flags)                                  volinfo->volname);                          goto out;                  } -                volinfo->tierd.port = 0;          }  out: @@ -244,7 +243,6 @@ glusterd_tierdsvc_start (glusterd_svc_t *svc, int flags)          glusterd_conf_t     *priv                       = NULL;          xlator_t            *this                       = NULL;          char                 valgrind_logfile[PATH_MAX] = {0}; -        int                  tierd_port                 = 0;          char                 msg[1024]                  = {0,};          char                 tierd_id[PATH_MAX]         = {0,};          glusterd_volinfo_t  *volinfo                    = NULL; @@ -345,32 +343,6 @@ glusterd_tierdsvc_start (glusterd_svc_t *svc, int flags)          if (volinfo->memory_accounting)                  runner_add_arg (&runner, "--mem-accounting"); -        /* Do a pmap registry remove on the older connected port */ -        if (volinfo->tierd.port) { -                ret = pmap_registry_remove (this, volinfo->tierd.port, -                                tierd_id, GF_PMAP_PORT_BRICKSERVER, -                                NULL); -                if (ret) { -                        snprintf (msg, sizeof (msg), "Failed to remove pmap " -                                        "registry for older signin"); -                        goto out; -                } -        } - - - -        tierd_port = pmap_registry_alloc (this); -        if (!tierd_port) { -                snprintf (msg, sizeof (msg), "Could not allocate port " -                                "for tierd service for volume %s", -                                volinfo->volname); -                runner_log (&runner, this->name, GF_LOG_DEBUG, msg); -                ret = -1; -                goto out; -        } - -        volinfo->tierd.port = tierd_port; -          snprintf (msg, sizeof (msg),                    "Starting the tierd service for volume %s", volinfo->volname);          runner_log (&runner, this->name, GF_LOG_DEBUG, msg); diff --git a/xlators/mgmt/glusterd/src/glusterd-tierd-svc.h b/xlators/mgmt/glusterd/src/glusterd-tierd-svc.h index dfc63d25eb2..2ff840d0f25 100644 --- a/xlators/mgmt/glusterd/src/glusterd-tierd-svc.h +++ b/xlators/mgmt/glusterd/src/glusterd-tierd-svc.h @@ -18,7 +18,6 @@ typedef struct glusterd_tierdsvc_ glusterd_tierdsvc_t;  struct glusterd_tierdsvc_ {          glusterd_svc_t          svc; -        int                     port;          gf_store_handle_t      *handle;  };  | 
