From aa27fba4b5667370e5c67a9ad1a2fe4ca5ddf47d Mon Sep 17 00:00:00 2001
From: Kotresh HR <khiremat@redhat.com>
Date: Thu, 6 Apr 2017 09:58:23 -0400
Subject: [PATCH 375/375] geo-rep: Fix cherry-pick issues
Following cherry-picks from upstream had issues and
fixed the same.
1. https://code.engineering.redhat.com/gerrit/101284
2. https://code.engineering.redhat.com/gerrit/101291
3. https://code.engineering.redhat.com/gerrit/101413
Label: DOWNSTREAM ONLY
Change-Id: Idd274c8ca0d31632159e0547ed80d9bbb40873ee
BUG: 1439708
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/102726
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
geo-replication/syncdaemon/gsyncdstatus.py | 1 +
geo-replication/syncdaemon/master.py | 6 +++---
geo-replication/syncdaemon/resource.py | 11 -----------
3 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/geo-replication/syncdaemon/gsyncdstatus.py b/geo-replication/syncdaemon/gsyncdstatus.py
index 266cf5a..9b202ce 100644
--- a/geo-replication/syncdaemon/gsyncdstatus.py
+++ b/geo-replication/syncdaemon/gsyncdstatus.py
@@ -274,6 +274,7 @@ class GeorepStatus(object):
def set_passive(self):
if self.set_field("worker_status", "Passive"):
logging.info("Worker Status: Passive")
+ self.send_event(EVENT_GEOREP_PASSIVE)
def get_monitor_status(self):
data = ""
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index fb68525..96542ae 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -780,6 +780,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)
@@ -1166,9 +1169,6 @@ class GMasterChangeloghistoryMixin(GMasterChangelogMixin):
if not purge_time or purge_time == URXTIME:
raise NoPurgeTimeAvailable()
- if not data_stime or data_stime == URXTIME:
- raise NoStimeAvailable()
-
# Changelogs backend path is hardcoded as
# <BRICK_PATH>/.glusterfs/changelogs, if user configured to different
# location then consuming history will not work(Known issue as of now)
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 3ba5cf2..e81ddfe 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -551,17 +551,6 @@ class Server(object):
@classmethod
@_pathguard
- def set_entry_stime(cls, path, uuid, mark):
- """set @mark as stime for @uuid on @path"""
- errno_wrap(Xattr.lsetxattr,
- [path,
- '.'.join([cls.GX_NSPACE, uuid, 'entry_stime']),
- struct.pack('!II', *mark)],
- [ENOENT],
- [ESTALE, EINVAL])
-
- @classmethod
- @_pathguard
def set_xtime(cls, path, uuid, mark):
"""set @mark as xtime for @uuid on @path"""
errno_wrap(Xattr.lsetxattr,
--
1.8.3.1