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