summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/monitor.py
diff options
context:
space:
mode:
authorSaravanakumar Arumugam <sarumuga@redhat.com>2015-12-02 14:26:47 +0530
committerVenky Shankar <vshankar@redhat.com>2015-12-03 02:34:53 -0800
commit93f31189ce8f6e2980a39b02568ed17088e0a667 (patch)
tree94c35829993947ba1085717df406203ba87fcefc /geo-replication/syncdaemon/monitor.py
parente6046ddc62a61f63d3c2ff2fb450c07c0604e801 (diff)
geo-rep: use cold tier bricks for namespace operations
Problem: symlinks are not getting synced to slave in a Tiering based volume. Solution: Now, symlinks are created directly in cold tier bricks( in the backend). Earlier, cold tier was avoided for namespace operations and only hot tier was used while processing changelogs. Now, cold tier is HASH subvolume in a Tiering volume. So, carry out namespace operation only in cold tier subvolume and avoid hot tier subvolume to avoid any races. Earlier, XSYNC was used(and changeloghistory avoided) during initial sync in order to avoid race while processing historychangelog in Hot tier. This is no longer required as there is no race from Hot tier. Also, avoid both live and history changelog ENTRY operations from Hot tier to avoid any race with cold tier. Change-Id: Ia8fbb7ae037f5b6cb683f36c0df5c3fc2894636e BUG: 1287519 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/12844 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/monitor.py')
-rw-r--r--geo-replication/syncdaemon/monitor.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/geo-replication/syncdaemon/monitor.py b/geo-replication/syncdaemon/monitor.py
index 7c363214903..257a280b2f2 100644
--- a/geo-replication/syncdaemon/monitor.py
+++ b/geo-replication/syncdaemon/monitor.py
@@ -99,9 +99,9 @@ class Volinfo(object):
def get(self, elem):
return self.tree.findall('.//' + elem)
- def is_cold(self, brickpath):
+ def is_hot(self, brickpath):
logging.debug('brickpath: ' + repr(brickpath))
- return brickpath in self.cold_bricks
+ return brickpath in self.hot_bricks
@property
@memoize
@@ -132,8 +132,8 @@ class Volinfo(object):
@property
@memoize
- def cold_bricks(self):
- return [b.text for b in self.get('coldBricks/brick')]
+ def hot_bricks(self):
+ return [b.text for b in self.get('hotBricks/brick')]
class Monitor(object):
@@ -268,7 +268,7 @@ class Monitor(object):
','.join([str(rw), str(ww),
str(ra), str(wa)]),
'--subvol-num', str(w[2])] +
- (['--is-coldtier'] if w[3] else []) +
+ (['--is-hottier'] if w[3] else []) +
['--resource-remote', remote_host])
cpids.add(cpid)
@@ -419,7 +419,7 @@ def distribute(*resources):
workerspex = [(brick['dir'], slaves[idx % len(slaves)],
get_subvol_num(idx, mvol.replica_count, mvol.disperse_count),
- mvol.is_cold(":".join([brick['host'], brick['dir']])))
+ mvol.is_hot(":".join([brick['host'], brick['dir']])))
for idx, brick in enumerate(mvol.bricks)
if is_host_local(brick['host'])]
logging.info('worker specs: ' + repr(workerspex))