summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2015-05-09 00:26:14 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-09 02:18:04 -0700
commit7fb2437f17e1fabf184a5ea5f9fcad5f11615c55 (patch)
tree32ac3a667908e71567495bafdc8b80264227f912
parent48de09dd3856b7fa9cd1eb372170d5d39f71e0b9 (diff)
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 <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/10694 Reviewed-on: http://review.gluster.org/10695 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--geo-replication/syncdaemon/gsyncdstatus.py6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c4
2 files changed, 5 insertions, 5 deletions
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
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 6b95beed490..b5020b741d2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -1474,7 +1474,7 @@ glusterd_check_geo_rep_configured (glusterd_volinfo_t *volinfo,
/*
* is_geo_rep_active:
* This function reads the state_file and sets is_active to 1 if the
- * monitor status is neither "Stopped" or "Not Started"
+ * monitor status is neither "Stopped" or "Created"
*
* RETURN VALUE:
* 0: On successful read of state_file.
@@ -1530,7 +1530,7 @@ is_geo_rep_active (glusterd_volinfo_t *volinfo, char *slave,
}
if ((!strcmp(monitor_status, "Stopped")) ||
- (!strcmp(monitor_status, "Not Started"))) {
+ (!strcmp(monitor_status, "Created"))) {
*is_active = 0;
} else {
*is_active = 1;