From 18950598bef63c11237e7cdc959442e524a74061 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Tue, 24 Jul 2012 01:13:25 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/3714 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/marker/utils/syncdaemon/master.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/marker/utils/syncdaemon/master.py b/xlators/features/marker/utils/syncdaemon/master.py index 6490fd9fe..41aae9b09 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 -- cgit