From 0b573c3d93159d4e801714211343b220c0f45e1e Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Tue, 5 May 2015 18:20:19 +0530 Subject: geo-rep: Fix Default values in Xml output Default Values for last_synced, checkpoint_time and checkpoint_completion_time was zero instead of 'N/A' BUG: 1218586 Change-Id: I8a96688588dd6e22edf8bc06ee0f3afe12a9e0f5 Reviewed-on: http://review.gluster.org/10580 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/10636 Reviewed-by: Saravanakumar Arumugam Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- geo-replication/syncdaemon/gsyncdstatus.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'geo-replication/syncdaemon') diff --git a/geo-replication/syncdaemon/gsyncdstatus.py b/geo-replication/syncdaemon/gsyncdstatus.py index a49b9c23dea..7268e26d629 100644 --- a/geo-replication/syncdaemon/gsyncdstatus.py +++ b/geo-replication/syncdaemon/gsyncdstatus.py @@ -310,6 +310,15 @@ class GeorepStatus(object): if data["worker_status"] not in ["Active", "Passive"]: data["slave_node"] = DEFAULT_STATUS + if data["last_synced_utc"] == 0: + data["last_synced_utc"] = DEFAULT_STATUS + + if data["checkpoint_completion_time_utc"] == 0: + data["checkpoint_completion_time_utc"] = DEFAULT_STATUS + + if data["checkpoint_time_utc"] == 0: + data["checkpoint_time_utc"] = DEFAULT_STATUS + return data def print_status(self, checkpoint_time=0): -- cgit