diff options
author | Aravinda VK <avishwan@redhat.com> | 2014-06-04 17:41:10 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2014-06-11 23:52:52 -0700 |
commit | f25c88375b0fc03a97a423b565217fb9b55f7850 (patch) | |
tree | 9867e2a706e283c341d04cb739a133a1cb86138d /geo-replication | |
parent | f0c8be68ca68ddb067a40830fecf389c74c13d02 (diff) |
geo-rep: entry_ops errors handling
Xattr.lsetxattr_l call will not raise OSError which
errno_wrap can handle, so we need to use Xattr.lsetxattr
to get proper OSError and errno_wrap ignores or retries
accordingly.
Change-Id: Ie0a777152ddbaf9ed80c977e4704974fec997bea
BUG: 1105083
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/7972
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r-- | geo-replication/syncdaemon/libcxattr.py | 5 | ||||
-rw-r--r-- | geo-replication/syncdaemon/resource.py | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/geo-replication/syncdaemon/libcxattr.py b/geo-replication/syncdaemon/libcxattr.py index e6035e26b43..74d120fa196 100644 --- a/geo-replication/syncdaemon/libcxattr.py +++ b/geo-replication/syncdaemon/libcxattr.py @@ -78,11 +78,6 @@ class Xattr(object): cls.raise_oserr() @classmethod - def lsetxattr_l(cls, path, attr, val): - """ lazy lsetxattr(): caller handles errno """ - cls.libc.lsetxattr(path, attr, val, len(val), 0) - - @classmethod def lremovexattr(cls, path, attr): ret = cls.libc.lremovexattr(path, attr) if ret == -1: diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index ca1dd4cf43b..eb6c87b102b 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -644,9 +644,10 @@ class Server(object): else: errno_wrap(os.rename, [entry, en], [ENOENT, EEXIST]) if blob: - errno_wrap(Xattr.lsetxattr_l, [pg, 'glusterfs.gfid.newfile', - blob], - [EEXIST], [ENOENT, ESTALE, EINVAL]) + errno_wrap(Xattr.lsetxattr, + [pg, 'glusterfs.gfid.newfile', blob], + [EEXIST], + [ENOENT, ESTALE, EINVAL]) @classmethod def meta_ops(cls, meta_entries): |