From 0f67ad828895960ab96f9e237eae8acbc6c63988 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Thu, 31 Mar 2011 08:13:31 +0000 Subject: syncdaemon: minor cleanups in cascading code Signed-off-by: Csaba Henk Signed-off-by: Vijay Bellur BUG: 2535 (gsync cascading) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2535 --- xlators/features/marker/utils/syncdaemon/resource.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index 8556e4246f7..bebe5c22b92 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -338,15 +338,11 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote): class GLUSTERServer(Server): - forgn_mark_size = struct.calcsize(Server.FRGN_FMTSTR) - nativ_mark_size = struct.calcsize(Server.NTV_FMTSTR) - @classmethod def attr_unpack_dict(cls, xattr, extra_fields = ''): fmt_string = cls.NTV_FMTSTR + extra_fields buf = Xattr.lgetxattr('.', xattr, struct.calcsize(fmt_string)) vm = struct.unpack(fmt_string, buf) - logging.info("str: %s" % `vm`) m = re.match('(.{8})(.{4})(.{4})(.{4})(.{12})', "".join(['%02x' % x for x in vm[2:18]])) uuid = '-'.join(m.groups()) volinfo = { 'version': vm[0:2], @@ -354,7 +350,6 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote): 'retval' : vm[18], 'volume_mark': vm[18:20], } - logging.info("volinfo: %s" % `volinfo`) if extra_fields: return volinfo, vm[-len(extra_fields):] else: @@ -365,8 +360,7 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote): dict_list = [] xattr_list = Xattr.llistxattr_buf('.') for ele in xattr_list: - if (ele.find('trusted.glusterfs.volume-mark') != -1): - #buf = Xattr.lgetxattr('.', ele, cls.forgn_mark_size) + if ele.find('trusted.glusterfs.volume-mark.') == 0: d, x = cls.attr_unpack_dict(ele, cls.FRGN_XTRA_FMT) d['timeout'] = x[0] dict_list.append(d) -- cgit