|
|
256ebe |
From c4e292379928eaf1ebb47ee1c8e9b1eabbe90574 Mon Sep 17 00:00:00 2001
|
|
|
256ebe |
From: Kotresh HR <khiremat@redhat.com>
|
|
|
256ebe |
Date: Tue, 14 May 2019 11:05:45 +0530
|
|
|
256ebe |
Subject: [PATCH 170/178] geo-rep: Convert gfid conflict resolutiong logs into
|
|
|
256ebe |
debug
|
|
|
256ebe |
|
|
|
256ebe |
The gfid conflict resolution code path is not supposed
|
|
|
256ebe |
to hit in generic code path. But few of the heavy rename
|
|
|
256ebe |
workload (BUG: 1694820) makes it a generic case. So
|
|
|
256ebe |
logging the entries to be fixed as INFO floods the log
|
|
|
256ebe |
in these particular workloads. Hence convert them to DEBUG.
|
|
|
256ebe |
|
|
|
256ebe |
Backport of:
|
|
|
256ebe |
> Patch: https://review.gluster.org/22720
|
|
|
256ebe |
> fixes: bz#1709653
|
|
|
256ebe |
> Change-Id: I4d5e102b87be5fe5b54f78f329e588882d72b9d9
|
|
|
256ebe |
|
|
|
256ebe |
BUG: 1714536
|
|
|
256ebe |
Change-Id: I4d5e102b87be5fe5b54f78f329e588882d72b9d9
|
|
|
256ebe |
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
256ebe |
Reviewed-on: https://code.engineering.redhat.com/gerrit/172731
|
|
|
256ebe |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
256ebe |
---
|
|
|
256ebe |
geo-replication/syncdaemon/master.py | 21 ++++++++++++---------
|
|
|
256ebe |
1 file changed, 12 insertions(+), 9 deletions(-)
|
|
|
256ebe |
|
|
|
256ebe |
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
|
|
|
256ebe |
index 42c86d7..3f98337 100644
|
|
|
256ebe |
--- a/geo-replication/syncdaemon/master.py
|
|
|
256ebe |
+++ b/geo-replication/syncdaemon/master.py
|
|
|
256ebe |
@@ -811,7 +811,7 @@ class GMasterChangelogMixin(GMasterCommon):
|
|
|
256ebe |
st = lstat(os.path.join(pfx, slave_gfid))
|
|
|
256ebe |
# Takes care of scenarios with no hardlinks
|
|
|
256ebe |
if isinstance(st, int) and st == ENOENT:
|
|
|
256ebe |
- logging.info(lf('Entry not present on master. Fixing gfid '
|
|
|
256ebe |
+ logging.debug(lf('Entry not present on master. Fixing gfid '
|
|
|
256ebe |
'mismatch in slave. Deleting the entry',
|
|
|
256ebe |
retry_count=retry_count,
|
|
|
256ebe |
entry=repr(failure)))
|
|
|
256ebe |
@@ -843,7 +843,7 @@ class GMasterChangelogMixin(GMasterCommon):
|
|
|
256ebe |
if matching_disk_gfid(slave_gfid, pbname):
|
|
|
256ebe |
# Safe to ignore the failure as master contains same
|
|
|
256ebe |
# file with same gfid. Remove entry from entries list
|
|
|
256ebe |
- logging.info(lf('Fixing gfid mismatch in slave. '
|
|
|
256ebe |
+ logging.debug(lf('Fixing gfid mismatch in slave. '
|
|
|
256ebe |
' Safe to ignore, take out entry',
|
|
|
256ebe |
retry_count=retry_count,
|
|
|
256ebe |
entry=repr(failure)))
|
|
|
256ebe |
@@ -865,14 +865,14 @@ class GMasterChangelogMixin(GMasterCommon):
|
|
|
256ebe |
dst_entry = os.path.join(pfx, realpath.split('/')[-2],
|
|
|
256ebe |
realpath.split('/')[-1])
|
|
|
256ebe |
src_entry = pbname
|
|
|
256ebe |
- logging.info(lf('Fixing dir name/gfid mismatch in '
|
|
|
256ebe |
+ logging.debug(lf('Fixing dir name/gfid mismatch in '
|
|
|
256ebe |
'slave', retry_count=retry_count,
|
|
|
256ebe |
entry=repr(failure)))
|
|
|
256ebe |
if src_entry == dst_entry:
|
|
|
256ebe |
# Safe to ignore the failure as master contains
|
|
|
256ebe |
# same directory as in slave with same gfid.
|
|
|
256ebe |
# Remove the failure entry from entries list
|
|
|
256ebe |
- logging.info(lf('Fixing dir name/gfid mismatch'
|
|
|
256ebe |
+ logging.debug(lf('Fixing dir name/gfid mismatch'
|
|
|
256ebe |
' in slave. Safe to ignore, '
|
|
|
256ebe |
'take out entry',
|
|
|
256ebe |
retry_count=retry_count,
|
|
|
256ebe |
@@ -886,7 +886,7 @@ class GMasterChangelogMixin(GMasterCommon):
|
|
|
256ebe |
entry=src_entry,
|
|
|
256ebe |
entry1=dst_entry, stat=st,
|
|
|
256ebe |
link=None)
|
|
|
256ebe |
- logging.info(lf('Fixing dir name/gfid mismatch'
|
|
|
256ebe |
+ logging.debug(lf('Fixing dir name/gfid mismatch'
|
|
|
256ebe |
' in slave. Renaming',
|
|
|
256ebe |
retry_count=retry_count,
|
|
|
256ebe |
entry=repr(rename_dict)))
|
|
|
256ebe |
@@ -896,7 +896,7 @@ class GMasterChangelogMixin(GMasterCommon):
|
|
|
256ebe |
# renamed file exists and we are sure from
|
|
|
256ebe |
# matching_disk_gfid check that the entry doesn't
|
|
|
256ebe |
# exist with same gfid so we can safely delete on slave
|
|
|
256ebe |
- logging.info(lf('Fixing file gfid mismatch in slave. '
|
|
|
256ebe |
+ logging.debug(lf('Fixing file gfid mismatch in slave. '
|
|
|
256ebe |
'Hardlink/Rename Case. Deleting entry',
|
|
|
256ebe |
retry_count=retry_count,
|
|
|
256ebe |
entry=repr(failure)))
|
|
|
256ebe |
@@ -915,7 +915,7 @@ class GMasterChangelogMixin(GMasterCommon):
|
|
|
256ebe |
# Safe to ignore the failure as master doesn't contain
|
|
|
256ebe |
# parent directory.
|
|
|
256ebe |
if isinstance(st, int):
|
|
|
256ebe |
- logging.info(lf('Fixing ENOENT error in slave. Parent '
|
|
|
256ebe |
+ logging.debug(lf('Fixing ENOENT error in slave. Parent '
|
|
|
256ebe |
'does not exist on master. Safe to '
|
|
|
256ebe |
'ignore, take out entry',
|
|
|
256ebe |
retry_count=retry_count,
|
|
|
256ebe |
@@ -925,7 +925,7 @@ class GMasterChangelogMixin(GMasterCommon):
|
|
|
256ebe |
except ValueError:
|
|
|
256ebe |
pass
|
|
|
256ebe |
else:
|
|
|
256ebe |
- logging.info(lf('Fixing ENOENT error in slave. Create '
|
|
|
256ebe |
+ logging.debug(lf('Fixing ENOENT error in slave. Create '
|
|
|
256ebe |
'parent directory on slave.',
|
|
|
256ebe |
retry_count=retry_count,
|
|
|
256ebe |
entry=repr(failure)))
|
|
|
256ebe |
@@ -1223,10 +1223,13 @@ class GMasterChangelogMixin(GMasterCommon):
|
|
|
256ebe |
|
|
|
256ebe |
if gconf.get("gfid-conflict-resolution"):
|
|
|
256ebe |
count = 0
|
|
|
256ebe |
+ if failures:
|
|
|
256ebe |
+ logging.info(lf('Entry ops failed with gfid mismatch',
|
|
|
256ebe |
+ count=len(failures)))
|
|
|
256ebe |
while failures and count < self.MAX_OE_RETRIES:
|
|
|
256ebe |
count += 1
|
|
|
256ebe |
self.handle_entry_failures(failures, entries)
|
|
|
256ebe |
- logging.info("Retry original entries. count = %s" % count)
|
|
|
256ebe |
+ logging.info(lf('Retry original entries', count=count))
|
|
|
256ebe |
failures = self.slave.server.entry_ops(entries)
|
|
|
256ebe |
if not failures:
|
|
|
256ebe |
logging.info("Successfully fixed all entry ops with "
|
|
|
256ebe |
--
|
|
|
256ebe |
1.8.3.1
|
|
|
256ebe |
|