Blob Blame History Raw
From 49d3a81b4cc79f4e319624154a1e13f1318cdec1 Mon Sep 17 00:00:00 2001
From: Aravinda VK <avishwan@redhat.com>
Date: Tue, 18 Oct 2016 13:34:57 +0530
Subject: [PATCH 197/206] geo-rep: Upgrade conf file only if it is session
 config

Ignore config upgrade if it is template config file present in
/var/lib/glusterd/geo-replication/gsyncd_template.conf

> Reviewed-on: http://review.gluster.org/15669
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Kotresh HR <khiremat@redhat.com>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>

BUG: 1383898
Change-Id: I2cbba3103b6801c16ff57f778a90b9a0bb2467cf
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/91360
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
 geo-replication/syncdaemon/gsyncd.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/geo-replication/syncdaemon/gsyncd.py b/geo-replication/syncdaemon/gsyncd.py
index 2c80319..195e6d2 100644
--- a/geo-replication/syncdaemon/gsyncd.py
+++ b/geo-replication/syncdaemon/gsyncd.py
@@ -540,7 +540,10 @@ def main_i():
     if not 'config_file' in rconf:
         rconf['config_file'] = TMPL_CONFIG_FILE
 
-    upgrade_config_file(rconf['config_file'], confdata)
+    # Upgrade Config File only if it is session conf file
+    if rconf['config_file'] != TMPL_CONFIG_FILE:
+        upgrade_config_file(rconf['config_file'], confdata)
+
     gcnf = GConffile(
         rconf['config_file'], canon_peers, confdata,
         defaults.__dict__, opts.__dict__, namedict)
-- 
2.9.3