summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2017-10-06 06:02:56 -0400
committerKotresh HR <khiremat@redhat.com>2017-10-10 13:46:36 +0000
commit3afbe4201d864d2e886509f5633468aa344fa444 (patch)
treee7445ce7cb61ed80162f588914f461481c3ef381 /geo-replication/syncdaemon
parentc4a608799a577a4f38139f6bb8a47da8efb0fec3 (diff)
geo-rep: Add ENOTSUP error to retry list
os.listdir gives ENOTSUP on gfid path occasionally which is not persistant. Adding it to retry list to avoid worker to crash if it's transient error. Change-Id: Ic795dd1f02a27c9e5d901e20722ee32451838feb BUG: 1499180 Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon')
-rw-r--r--geo-replication/syncdaemon/resource.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index a6e351590f8..45106af2c85 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -23,6 +23,7 @@ import logging
import tempfile
import threading
import subprocess
+import errno
from errno import EEXIST, ENOENT, ENODATA, ENOTDIR, ELOOP, EACCES
from errno import EISDIR, ENOTEMPTY, ESTALE, EINVAL, EBUSY, EPERM
from select import error as SelectError
@@ -49,6 +50,7 @@ UrlRX = re.compile('\A(\w+)://([^ *?[]*)\Z')
HostRX = re.compile('[a-zA-Z\d](?:[a-zA-Z\d.-]*[a-zA-Z\d])?', re.I)
UserRX = re.compile("[\w!\#$%&'*+-\/=?^_`{|}~]+")
+ENOTSUP = getattr(errno, 'ENOTSUP', 'EOPNOTSUPP')
def sup(x, *a, **kw):
"""a rubyesque "super" for python ;)
@@ -677,7 +679,7 @@ class Server(object):
return
names = []
- names = errno_wrap(os.listdir, [path], [ENOENT], [ESTALE])
+ names = errno_wrap(os.listdir, [path], [ENOENT], [ESTALE, ENOTSUP])
if isinstance(names, int):
return