From 57b0a4a374a604079f37a9d9d9fffb09a718c010 Mon Sep 17 00:00:00 2001 From: hari gowtham Date: Tue, 30 May 2017 15:50:25 +0530 Subject: 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 Reviewed-on: https://review.gluster.org/17419 Smoke: Gluster Build System Tested-by: hari gowtham Reviewed-by: Shyamsundar Ranganathan Reviewed-by: Prashanth Pai CentOS-regression: Gluster Build System Reviewed-by: Samikshan Bairagya NetBSD-regression: NetBSD Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-tier.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- cgit