-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geo-replication: replace logging.warn with logging.warning (#4344) #4345
Open
jelly
wants to merge
1
commit into
gluster:devel
Choose a base branch
from
jelly:cleanup-logging-warn
base: devel
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -542,8 +542,8 @@ def crawlwrap(self, oneshot=False, register_time=None): | |
rconf.volume_id = self.uuid | ||
if self.volinfo: | ||
if self.volinfo['retval']: | ||
logging.warn(lf("primary cluster's info may not be valid", | ||
error=self.volinfo['retval'])) | ||
logging.warning(lf("primary cluster's info may not be valid", | ||
error=self.volinfo['retval'])) | ||
else: | ||
raise GsyncdError("primary volinfo unavailable") | ||
self.lastreport['time'] = time.time() | ||
|
@@ -1169,9 +1169,9 @@ def process_change(self, change, done, retry): | |
entries.append( | ||
edct(ty, stat=st, entry=en, gfid=gfid, link=rl)) | ||
else: | ||
logging.warn(lf('ignoring op', | ||
gfid=gfid, | ||
type=ty)) | ||
logging.warning(lf('ignoring op', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here and check for all the changes. |
||
gfid=gfid, | ||
type=ty)) | ||
elif et == self.TYPE_GFID: | ||
# If self.unlinked_gfids is available, then that means it is | ||
# retrying the changelog second time. Do not add the GFID's | ||
|
@@ -1202,8 +1202,8 @@ def process_change(self, change, done, retry): | |
(gconf.get("sync-xattrs") or gconf.get("sync-acls")): | ||
datas.add(os.path.join(pfx, ec[0])) | ||
else: | ||
logging.warn(lf('got invalid fop type', | ||
type=et)) | ||
logging.warning(lf('got invalid fop type', | ||
type=et)) | ||
logging.debug('entries: %s' % repr(entries)) | ||
|
||
# Increment counters for Status | ||
|
@@ -1407,8 +1407,8 @@ def process(self, changes, done=1): | |
# entry_ops() that failed... so we retry the _whole_ changelog | ||
# again. | ||
# TODO: remove entry retries when it's gets fixed. | ||
logging.warn(lf('incomplete sync, retrying changelogs', | ||
files=list(map(os.path.basename, changes)))) | ||
logging.warning(lf('incomplete sync, retrying changelogs', | ||
files=list(map(os.path.basename, changes)))) | ||
|
||
# Reset the Data counter before Retry | ||
self.status.dec_value("data", self.files_in_batch) | ||
|
@@ -1708,8 +1708,8 @@ def Xsyncer(): | |
time=item[1])) | ||
self.upd_stime(item[1][1], item[1][0]) | ||
else: | ||
logging.warn(lf('unknown tuple in comlist', | ||
entry=item)) | ||
logging.warning(lf('unknown tuple in comlist', | ||
entry=item)) | ||
except IndexError: | ||
time.sleep(1) | ||
|
||
|
@@ -1787,20 +1787,20 @@ def Xcrawl(self, path='.', xtr_root=None): | |
xtr_root = self.xtime('.', self.secondary) | ||
if isinstance(xtr_root, int): | ||
if xtr_root != ENOENT: | ||
logging.warn(lf("secondary cluster not returning the " | ||
"xtime for root", | ||
error=xtr_root)) | ||
logging.warning(lf("secondary cluster not returning the " | ||
"xtime for root", | ||
error=xtr_root)) | ||
xtr_root = self.minus_infinity | ||
xtl = self.xtime(path) | ||
if isinstance(xtl, int): | ||
logging.warn("primary cluster's xtime not found") | ||
logging.warning("primary cluster's xtime not found") | ||
xtr = self.xtime(path, self.secondary) | ||
if isinstance(xtr, int): | ||
if xtr != ENOENT: | ||
logging.warn(lf("secondary cluster not returning the " | ||
"xtime for dir", | ||
path=path, | ||
error=xtr)) | ||
logging.warning(lf("secondary cluster not returning the " | ||
"xtime for dir", | ||
path=path, | ||
error=xtr)) | ||
xtr = self.minus_infinity | ||
xtr = max(xtr, xtr_root) | ||
zero_zero = (0, 0) | ||
|
@@ -1815,32 +1815,32 @@ def Xcrawl(self, path='.', xtr_root=None): | |
dem = self.primary.server.entries(path) | ||
pargfid = self.primary.server.gfid(path) | ||
if isinstance(pargfid, int): | ||
logging.warn(lf('skipping directory', | ||
path=path)) | ||
logging.warning(lf('skipping directory', | ||
path=path)) | ||
for e in dem: | ||
bname = e | ||
e = os.path.join(path, e) | ||
xte = self.xtime(e) | ||
if isinstance(xte, int): | ||
logging.warn(lf("irregular xtime", | ||
path=e, | ||
error=errno.errorcode[xte])) | ||
logging.warning(lf("irregular xtime", | ||
path=e, | ||
error=errno.errorcode[xte])) | ||
continue | ||
if not self.need_sync(e, xte, xtr): | ||
continue | ||
st = self.primary.server.lstat(e) | ||
if isinstance(st, int): | ||
logging.warn(lf('got purged in the interim', | ||
path=e)) | ||
logging.warning(lf('got purged in the interim', | ||
path=e)) | ||
continue | ||
if self.is_sticky(e, st.st_mode): | ||
logging.debug(lf('ignoring sticky bit file', | ||
path=e)) | ||
continue | ||
gfid = self.primary.server.gfid(e) | ||
if isinstance(gfid, int): | ||
logging.warn(lf('skipping entry', | ||
path=e)) | ||
logging.warning(lf('skipping entry', | ||
path=e)) | ||
continue | ||
mo = st.st_mode | ||
self.counter += 1 if ((stat.S_ISDIR(mo) or | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next line is not indented properly