summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/rconf.py
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2017-06-21 12:56:14 +0530
committerAmar Tumballi <amarts@redhat.com>2017-11-15 05:20:08 +0000
commit705ec055040268f876d04fe5743a6ce4738d6e02 (patch)
tree47841519fd8415e31777418a94575cfae06b4bb8 /geo-replication/syncdaemon/rconf.py
parentda825da9501bcb51656e82cda3c21a2ef592c5e2 (diff)
geo-rep: Refactoring Config and Arguments parsing
- Fixed Python pep8 issues - Removed dead code - Rewritten configuration management - Rewritten Arguments/subcommands handling - Added Args upgrade to accommodate all these changes without changing glusterd code - use of md5 removed, which was used to hash the brick path for workdir Both Master and Slave nodes will have subdir for session in the format "<mastervol>_<primary_slave_host>_<slavevol> $GLUSTER_LOGDIR/geo-replication/<mastervol>_<primary_slave_host>_<slavevol> $GLUSTER_LOGDIR/geo-replication-slaves/<mastervol>_<primary_slave_host>_<slavevol> Log file paths renamed since session info is available with directory name itself. $LOG_DIR_MASTER/ - gsyncd.log - Gsyncd, Worker monitor logs - mnt-<brick-path>.log - Aux mount logs, mounted by each worker - changes-<brick-path>.log - Changelog related logs(One per brick) $LOG_DIR_SLAVE/ - gsyncd.log - Slave Gsyncd logs - mnt-<master-node>-<master-brick-path>.log - Aux mount logs, mounted for each connection from master-node:master-brick - mnt-mbr-<master-node>-<master-brick-path>.log - Same as above, but mountbroker setup Fixes: #73 Change-Id: I2ec2a21e4e2a92fd92899d026e8543725276f021 Signed-off-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/rconf.py')
-rw-r--r--geo-replication/syncdaemon/rconf.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/rconf.py b/geo-replication/syncdaemon/rconf.py
new file mode 100644
index 00000000000..1b8f333c0c8
--- /dev/null
+++ b/geo-replication/syncdaemon/rconf.py
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2011-2014 Red Hat, Inc. <http://www.redhat.com>
+# This file is part of GlusterFS.
+
+# This file is licensed to you under your choice of the GNU Lesser
+# General Public License, version 3 or any later version (LGPLv3 or
+# later), or the GNU General Public License, version 2 (GPLv2), in all
+# cases as published by the Free Software Foundation.
+#
+
+
+class RConf(object):
+
+ """singleton class to store runtime globals
+ shared between gsyncd modules"""
+
+ ssh_ctl_dir = None
+ ssh_ctl_args = None
+ cpid = None
+ pid_file_owned = False
+ 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
+
+rconf = RConf()