From b000b934aff4b452cf1c35c42272482a7738506e Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Mon, 20 Jan 2014 12:23:35 +0530 Subject: geo-rep: Config file upgrade When old config file is used with new geo-rep, config item like 'georep_session_working_dir' was missing in old config file. With this patch geo-rep sets the default value for new items. Following config options supported: - georep_session_working_dir - gluster_params - ssh_command_tar BUG: 1036539 Change-Id: I389c62e749f3b567f9ecf96d4b41367ef962c025 Signed-off-by: Aravinda VK Reviewed-on: http://review.gluster.org/6934 Reviewed-by: Venky Shankar Tested-by: Gluster Build System --- geo-replication/syncdaemon/gsyncd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'geo-replication/syncdaemon/gsyncd.py') diff --git a/geo-replication/syncdaemon/gsyncd.py b/geo-replication/syncdaemon/gsyncd.py index 64c26a5d2..6eb62c6b0 100644 --- a/geo-replication/syncdaemon/gsyncd.py +++ b/geo-replication/syncdaemon/gsyncd.py @@ -20,7 +20,7 @@ from ipaddr import IPAddress, IPNetwork from gconf import gconf from syncdutils import FreeObject, norm, grabpidfile, finalize, log_raise_exception from syncdutils import GsyncdError, select, set_term_handler, privileged, update_file -from configinterface import GConffile +from configinterface import GConffile, upgrade_config_file import resource from monitor import monitor @@ -371,6 +371,8 @@ def main_i(): namedict['remotehost'] = x.remotehost if not 'config_file' in rconf: rconf['config_file'] = os.path.join(os.path.dirname(sys.argv[0]), "conf/gsyncd_template.conf") + + upgrade_config_file(rconf['config_file']) gcnf = GConffile(rconf['config_file'], canon_peers, defaults.__dict__, opts.__dict__, namedict) checkpoint_change = False -- cgit