summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2016-11-20 18:18:45 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-11-22 07:21:26 -0800
commitdeaea10a63da5ca8ce083a75e74d57b8e41d4139 (patch)
tree41606cf65a3fbd3fad4207e93bc6fcfff0edc7fe
parent60ab6cb4e2598757279803efacb4dbcbbfce8c58 (diff)
glusterd: dump volinfo->dict in gluster get-state
>Reviewed-on: http://review.gluster.org/15889 >Smoke: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> >Reviewed-by: Rohan Kanade <rkanade@redhat.com> Change-Id: I7e60629fb8003c620847fa63441f6b098db59721 BUG: 1397352 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15900 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 163db6df8db..3fe1c8c7c03 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -4949,7 +4949,7 @@ glusterd_handle_get_vol_opt (rpcsvc_request_t *req)
}
static int
-glusterd_print_global_options (dict_t *opts, char *key, data_t *val, void *data)
+glusterd_print_dict_options (dict_t *opts, char *key, data_t *val, void *data)
{
FILE *fp = NULL;
@@ -5129,7 +5129,7 @@ glusterd_get_state (rpcsvc_request_t *req, dict_t *dict)
fprintf (fp, "\n[Global options]\n");
if (priv->opts)
- dict_foreach (priv->opts, glusterd_print_global_options, fp);
+ dict_foreach (priv->opts, glusterd_print_dict_options, fp);
rcu_read_lock ();
fprintf (fp, "\n[Peers]\n");
@@ -5352,6 +5352,10 @@ glusterd_get_state (rpcsvc_request_t *req, dict_t *dict)
volinfo->rep_brick.dst_brick->hostname,
volinfo->rep_brick.dst_brick->path);
}
+ fprintf (fp, "[Volume%d.options]\n", count);
+ if (volinfo->dict)
+ dict_foreach (volinfo->dict,
+ glusterd_print_dict_options, fp);
fprintf (fp, "\n");
}