diff options
author | Kaushik BV <kaushikbv@gluster.com> | 2011-02-09 02:12:59 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2011-02-10 22:28:42 -0800 |
commit | d6407c59a4fd262749edd11ecb457b1e5be7a77a (patch) | |
tree | ae448de8f143f4f65e72f42cb16ae3b073cf6260 | |
parent | 6248ead2ab0481a40d91b824fb249e4bc4f943ba (diff) |
syncdaemon: Syncdaemon should not crash on ENOENT while performing setxattr()
Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2342 ([glusterfs-3.1.2geosyncqa4]: crash in gsyncd script)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2342
-rw-r--r-- | xlators/features/marker/utils/syncdaemon/resource.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index 3aaca02c025..659e344f8e1 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -156,7 +156,12 @@ class Server(object): @classmethod def set_xtime(cls, path, uuid, mark): - Xattr.lsetxattr(path, '.'.join([cls.GX_NSPACE, uuid, 'xtime']), struct.pack('!II', *mark)) + try: + Xattr.lsetxattr(path, '.'.join([cls.GX_NSPACE, uuid, 'xtime']), struct.pack('!II', *mark)) + except OSError: + ex = sys.exc_info()[1] + if ex.errno == ENOENT: + logging.error ("File for which the setxattr to be done is not present") @staticmethod def setattr(path, adct): |