summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-02-09 02:12:59 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-10 22:28:42 -0800
commitd6407c59a4fd262749edd11ecb457b1e5be7a77a (patch)
treeae448de8f143f4f65e72f42cb16ae3b073cf6260 /xlators/features
parent6248ead2ab0481a40d91b824fb249e4bc4f943ba (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
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/marker/utils/syncdaemon/resource.py7
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 3aaca02c0..659e344f8 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):