From f93bf09cdb417cf5e09206164a16ad9435285b45 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: 1212410 Change-Id: Ie775508f8dcb9ba6f311946a2039739e4336d9a6 Signed-off-by: Aravinda VK Reviewed-on: http://review.gluster.org/10580 Reviewed-by: darshan n Tested-by: NetBSD Build System 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/gsyncdstatus.py') 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