summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-03-31 08:13:31 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-31 22:30:13 -0700
commit0f67ad828895960ab96f9e237eae8acbc6c63988 (patch)
treebe969610834e1b1a8274da9f623b3f8fd718d6e5 /xlators/features/marker
parent05daec675f1716554864e34e0a3c9c71423b6594 (diff)
syncdaemon: minor cleanups in cascading code
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2535 (gsync cascading) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2535
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/utils/syncdaemon/resource.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py
index 8556e4246..bebe5c22b 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)