From 7fb2437f17e1fabf184a5ea5f9fcad5f11615c55 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Sat, 9 May 2015 00:26:14 +0530 Subject: geo-rep: Fix corrupt gsyncd output When gsyncd fails with Python traceback, glusterd fails parsing gsyncd output and shows error. BUG: 1219938 Change-Id: Ic32fd897c49a5325294a6588351b539c6e124338 Signed-off-by: Aravinda VK Reviewed-on: http://review.gluster.org/10694 Reviewed-on: http://review.gluster.org/10695 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Kotresh HR Reviewed-by: Vijay Bellur --- geo-replication/syncdaemon/gsyncdstatus.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'geo-replication/syncdaemon/gsyncdstatus.py') diff --git a/geo-replication/syncdaemon/gsyncdstatus.py b/geo-replication/syncdaemon/gsyncdstatus.py index 7268e26d629..57692f8fab0 100644 --- a/geo-replication/syncdaemon/gsyncdstatus.py +++ b/geo-replication/syncdaemon/gsyncdstatus.py @@ -310,13 +310,13 @@ class GeorepStatus(object): if data["worker_status"] not in ["Active", "Passive"]: data["slave_node"] = DEFAULT_STATUS - if data["last_synced_utc"] == 0: + if data.get("last_synced_utc", 0) == 0: data["last_synced_utc"] = DEFAULT_STATUS - if data["checkpoint_completion_time_utc"] == 0: + if data.get("checkpoint_completion_time_utc", 0) == 0: data["checkpoint_completion_time_utc"] = DEFAULT_STATUS - if data["checkpoint_time_utc"] == 0: + if data.get("checkpoint_time_utc", 0) == 0: data["checkpoint_time_utc"] = DEFAULT_STATUS return data -- cgit