summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2012-07-24 01:13:25 +0530
committerVijay Bellur <vbellur@redhat.com>2012-07-24 02:45:05 -0700
commit18950598bef63c11237e7cdc959442e524a74061 (patch)
tree67e3e1aa82b0a5d64c3601fc71947f458b5a5c7d /xlators/features/marker
parentd6f88e9edb564ed2300939e4f4fb6d83ac7fc5b6 (diff)
Fixes for gsyncd / geo-rep and FUSE listxattr
This patch fixes two problems with recent changes to Geo-Replication First: ------ Recent changes to geo-replication relies on Rsync to tranfer extended attributes. Essentially Rsync would invoke a listxattr() and then getxattr() the set reutrned by listxattr() and finally transfer it to the remote slave. Xattrs like security.selinux would create problems as they are not allowed to be set explicitly (unless there's a rule that allows this). So, to make Rsync behave sanely we filter out all "*.selinux*" xattrs from listxattr() (which is getxattr() with ->name as NULL). Second: ------- Python's "if {..} else {..}" shortcut ".. and .. or .." was misused here. This is a straightforward fix by interchanging last two variables (classes in this case). Also fix a typo in sendmark_regular() definition. Change-Id: I097b5f5d88a36c7eef5560a78d4332948a545942 BUG: 842330 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/3714 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/utils/syncdaemon/master.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/master.py b/xlators/features/marker/utils/syncdaemon/master.py
index 6490fd9fec8..41aae9b09c5 100644
--- a/xlators/features/marker/utils/syncdaemon/master.py
+++ b/xlators/features/marker/utils/syncdaemon/master.py
@@ -59,7 +59,7 @@ def gmaster_builder():
modemixin = 'normal'
logging.info('setting up master for %s sync mode' % modemixin)
modemixin = getattr(this, modemixin.capitalize() + 'Mixin')
- sendmarkmixin = boolify(gconf.use_rsync_xattrs) and SendmarkNormalMixin or SendmarkRsyncMixin
+ sendmarkmixin = boolify(gconf.use_rsync_xattrs) and SendmarkRsyncMixin or SendmarkNormalMixin
purgemixin = boolify(gconf.ignore_deletes) and PurgeNoopMixin or PurgeNormalMixin
class _GMaster(GMasterBase, modemixin, sendmarkmixin, purgemixin):
pass
@@ -301,12 +301,12 @@ class BlindMixin(object):
class SendmarkNormalMixin(object):
- def sendmark_regular(self, *a, **kw):
- return self.sendmark(self, *a, **kw)
+ def sendmark_regular(self, a, *kw):
+ return self.sendmark(self, a, *kw)
class SendmarkRsyncMixin(object):
- def sendmark_regular(self, *a, **kw):
+ def sendmark_regular(self, a, *kw):
pass