summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorhari gowtham <hgowtham@redhat.com>2017-05-30 15:50:25 +0530
committerAtin Mukherjee <amukherj@redhat.com>2017-05-31 11:39:20 +0000
commit57b0a4a374a604079f37a9d9d9fffb09a718c010 (patch)
tree11efc9ed7f03365d169b2f607ee9b89edac264c8 /xlators/mgmt/glusterd
parentfeaea7fa541b81a4988b8f394037bfedb5017f4c (diff)
tier: port value missing on cli parsing
problem: as tier didn't have a port all the values regarding the port were removed. but the cli needs a port value to parse and print the status. fix: fake the port value with a zero. Change-Id: I6491f6c441f7cfddbdaa724fcbe7c30e348aa765 BUG: 1452006 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: https://review.gluster.org/17419 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: hari gowtham <hari.gowtham005@gmail.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-tier.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-tier.c b/xlators/mgmt/glusterd/src/glusterd-tier.c
index 59a4bc1b3e0..45f6ac30ba3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-tier.c
+++ b/xlators/mgmt/glusterd/src/glusterd-tier.c
@@ -1177,6 +1177,16 @@ glusterd_add_tierd_to_dict (glusterd_volinfo_t *volinfo,
if (ret)
goto out;
+ /* tier doesn't have a port. but the cli needs a port key with
+ * an zero value to parse.
+ * */
+
+ memset (key, 0, sizeof (key));
+ snprintf (key, sizeof (key), "%s.port", base_key);
+ ret = dict_set_int32 (dict, key, 0);
+ if (ret)
+ goto out;
+
glusterd_svc_build_tierd_pidfile (volinfo, pidfile, sizeof (pidfile));
brick_online = gf_is_service_running (pidfile, &pid);