summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-08-19 13:53:15 -0400
committerAravinda VK <avishwan@redhat.com>2018-08-20 03:22:01 +0000
commit21199aaeb272da4b7857351bb2aa51f36c7e22cd (patch)
tree53057a00824c62282650e8776552572bc83f5350 /geo-replication
parent9d426f3522422e7499f747801b1894164a4b1589 (diff)
geo-rep: Cleanup unwanted code
Cleanup the Active/Passive logging code which is redundant. With new status infra implmented, this is redundant as every status switch is logged by status infra. fixes: bz#1619027 Change-Id: I0a6644cb998f3520e62a5189f21e4d66acc0e7c5 Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/master.py16
-rw-r--r--geo-replication/syncdaemon/rconf.py6
2 files changed, 0 insertions, 22 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index ac31e3fb81a..7985aac5439 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -448,18 +448,10 @@ class GMasterCommon(object):
if rconf.mgmt_lock_fd:
try:
fcntl.lockf(rconf.mgmt_lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
- if not rconf.active_earlier:
- rconf.active_earlier = True
- logging.info(lf("Got lock Becoming ACTIVE",
- brick=rconf.args.local_path))
return True
except:
ex = sys.exc_info()[1]
if isinstance(ex, IOError) and ex.errno in (EACCES, EAGAIN):
- if not rconf.passive_earlier:
- rconf.passive_earlier = True
- logging.info(lf("Didn't get lock Becoming PASSIVE",
- brick=rconf.local_path))
return False
raise
@@ -494,18 +486,10 @@ class GMasterCommon(object):
ex = sys.exc_info()[1]
if isinstance(ex, IOError) and ex.errno in (EACCES, EAGAIN):
# cannot grab, it's taken
- if not rconf.passive_earlier:
- rconf.passive_earlier = True
- logging.info(lf("Didn't get lock Becoming PASSIVE",
- brick=rconf.args.local_path))
rconf.mgmt_lock_fd = fd
return False
raise
- if not rconf.active_earlier:
- rconf.active_earlier = True
- logging.info(lf("Got lock Becoming ACTIVE",
- brick=rconf.args.local_path))
return True
def should_crawl(self):
diff --git a/geo-replication/syncdaemon/rconf.py b/geo-replication/syncdaemon/rconf.py
index ccac62c63a8..ff716ee4d6d 100644
--- a/geo-replication/syncdaemon/rconf.py
+++ b/geo-replication/syncdaemon/rconf.py
@@ -21,12 +21,6 @@ class RConf(object):
log_exit = False
permanent_handles = []
log_metadata = {}
- """One variable is sufficient to track the
- switching of worker to ACTIVE. Two variables
- are intentionally used to track worker going
- to PASSIVE as well mainly for debugging"""
- active_earlier = False
- passive_earlier = False
mgmt_lock_fd = None
args = None
turns = 0