diff options
author | Aravinda VK <avishwan@redhat.com> | 2015-01-07 21:56:58 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-02-02 12:19:07 -0800 |
commit | 52765ad94f233e4b4e57515e49f5b7c9e7c08b43 (patch) | |
tree | badad9a91e6a45e54205d3bc7941c305bf903c5a /cli/src/cli-xml-output.c | |
parent | 63f17d66258bca46532fe649bbb76a5e5948f22b (diff) |
geo-rep: Adding Slave user field to georep status
New column introduced in Status output, "SLAVE USER",
Slave user is not "root" in non root Geo-replication setup.
Added additional tag in XML output <slave_user>
BUG: 1180459
Change-Id: Ia48a5a8eb892ce883b9ec114be7bb2d46eff8535
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9409
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'cli/src/cli-xml-output.c')
-rw-r--r-- | cli/src/cli-xml-output.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index dcce53901f4..b4c72eaa84e 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -3909,8 +3909,8 @@ cli_xml_output_vol_gsync_status (dict_t *dict, int i = 1; int j = 0; int count = 0; - const int number_of_fields = 12; - const int number_of_basic_fields = 7; + const int number_of_fields = 13; + const int number_of_basic_fields = 8; int closed = 1; int session_closed = 1; gf_gsync_status_t **status_values = NULL; @@ -3924,6 +3924,7 @@ cli_xml_output_vol_gsync_status (dict_t *dict, char *title_values[] = {"master_node", "master_node_uuid", "master_brick", + "slave_user", "slave", "status", "checkpoint_status", @@ -4006,7 +4007,7 @@ cli_xml_output_vol_gsync_status (dict_t *dict, session_closed = 0; - tmp = get_struct_variable (14, status_values[i]); + tmp = get_struct_variable (15, status_values[i]); if (!tmp) { gf_log ("cli", GF_LOG_ERROR, "struct member empty."); @@ -4031,7 +4032,7 @@ cli_xml_output_vol_gsync_status (dict_t *dict, // Displaying the master_node uuid as second field if (j == 1) - tmp = get_struct_variable (12, + tmp = get_struct_variable (13, status_values[i]); else tmp = get_struct_variable (j, status_values[i]); @@ -4052,8 +4053,8 @@ cli_xml_output_vol_gsync_status (dict_t *dict, XML_RET_CHECK_AND_GOTO (ret, out); if (i+1 < count) { - slave = get_struct_variable (13, status_values[i]); - slave_next = get_struct_variable (13, + slave = get_struct_variable (14, status_values[i]); + slave_next = get_struct_variable (14, status_values[i+1]); volume = get_struct_variable (1, status_values[i]); volume_next = get_struct_variable (1, |