diff options
author | Aravinda VK <avishwan@redhat.com> | 2015-01-28 17:19:42 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-03-02 02:05:45 -0800 |
commit | 1455ee40030c8d3c4818ba7d7ca8ca851e12b848 (patch) | |
tree | b78037e6b9ec279d8453946d7620f5ec19ce032f /geo-replication/syncdaemon/master.py | |
parent | c3e6d6b54741cfbc828272ace576339ae3a37173 (diff) |
geo-rep: Add support for xattrs
This patch adds support for xattrs. When it sees SETXATTR
in Changelog, it adds the file to data queue. rsync/tar+ssh
will take care of syncing xattrs. User set xattrs will be
synced to Slave.
New config interface is introduced, sync-xattrs
Which can be set using geo-rep config(Default is True)
gluster volume geo-replication <VOLUME> <SLAVEHOST>::<SLAVEVOL> \
config sync-xattrs false
Change-Id: I70626d854a0d616469dd54d61e5ef155ed8b67d8
BUG: 1196690
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9499
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/master.py')
-rw-r--r-- | geo-replication/syncdaemon/master.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index c092c526a0e..51c26c76116 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -971,6 +971,11 @@ class GMasterChangelogMixin(GMasterCommon): st_mtime=ec[6]))) else: meta_gfid.add((os.path.join(pfx, ec[0]), )) + elif ec[1] == 'SETXATTR': + # To sync xattr use rsync/tar, --xattrs switch + # to rsync and tar + if boolify(gconf.sync_xattrs): + datas.add(os.path.join(pfx, ec[0])) else: logging.warn('got invalid changelog type: %s' % (et)) logging.debug('entries: %s' % repr(entries)) |