summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/master.py
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2017-01-10 00:30:42 -0500
committerAravinda VK <avishwan@redhat.com>2017-01-13 05:00:02 -0800
commit91ad7fe0ed8e8ce8f5899bb5ebbbbe57ede7dd43 (patch)
tree842c98c7935ab54f0ea99ada7ac0162824a58ee1 /geo-replication/syncdaemon/master.py
parent27c85d014bb7d03c323e08038d9c6db538d632fb (diff)
geo-rep: Handle directory sync failure as hard error
If directory creation is failed, return immediately before further processing. Allowing it to further process will fail the entire directory tree syncing to slave. Hence master will log and raise exception if it's directory failure. Earlier, master used to log the failure and proceed. Change-Id: Iba2a8b5d3d0092e7a9c8a3c2cdf9e6e29c73ddf0 BUG: 1411607 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/16364 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/master.py')
-rw-r--r--geo-replication/syncdaemon/master.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index d2481ee06ec..8c60dab899c 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -758,6 +758,9 @@ class GMasterChangelogMixin(GMasterCommon):
num_failures += 1
logging.error('%s FAILED: %s' % (log_prefix,
repr(failure)))
+ if failure[0]['op'] == 'MKDIR':
+ raise GsyncdError("The above directory failed to sync."
+ " Please fix it to proceed further.")
self.status.inc_value("failures", num_failures)