summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorhari gowtham <hgowtham@redhat.com>2017-05-30 15:50:25 +0530
committerRaghavendra Talur <rtalur@redhat.com>2017-05-31 17:51:32 +0000
commite51b1c9dd41dccc4c875f03e57c6186ea93abb0e (patch)
tree95ee78e841767f832dabb9248dcd1220cde3c770 /xlators
parente91bfdec983ce41a395fe0b89d2a31fb5a6564a3 (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> Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: I6491f6c441f7cfddbdaa724fcbe7c30e348aa765 BUG: 1456682 Reviewed-on: https://review.gluster.org/17427 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> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-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 e3b2bc62914..a5e8759ccf9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-tier.c
+++ b/xlators/mgmt/glusterd/src/glusterd-tier.c
@@ -1176,6 +1176,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);