cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [10/12] git commit: updated refs/heads/master to ca9e934
Date Thu, 08 Oct 2015 23:49:33 GMT
CLOUDSTACK-8915 - Copy the conntrackd configuration every time _redundant_on() function is
called

   - Also refactored the copy() function under CsHelper.py


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9fe040e9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9fe040e9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9fe040e9

Branch: refs/heads/master
Commit: 9fe040e96d589f9f4bf2a0f1463ffceb5f47b843
Parents: a0c93e7
Author: Wilder Rodrigues <wrodrigues@schubergphilis.com>
Authored: Mon Oct 5 11:30:18 2015 +0200
Committer: Wilder Rodrigues <wrodrigues@schubergphilis.com>
Committed: Tue Oct 6 16:41:15 2015 +0200

----------------------------------------------------------------------
 systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py   | 7 +------
 .../patches/debian/config/opt/cloud/bin/cs/CsRedundant.py     | 6 ++++--
 2 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9fe040e9/systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py
index 6706d4f..9095558 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py
@@ -213,12 +213,7 @@ def copy_if_needed(src, dest):
     """
     if os.path.isfile(dest):
         return
-    try:
-        shutil.copy2(src, dest)
-    except IOError:
-        logging.Error("Could not copy %s to %s" % (src, dest))
-    else:
-        logging.info("Copied %s to %s" % (src, dest))
+    copy(src, dest)
 
 def copy(src, dest):
     """

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9fe040e9/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
index dcdadfa..0f71673 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
@@ -100,9 +100,11 @@ class CsRedundant(object):
         CsHelper.copy_if_needed(
             "%s/%s" % (self.CS_TEMPLATES_DIR, "keepalived.conf.templ"), self.KEEPALIVED_CONF)
         CsHelper.copy_if_needed(
-            "%s/%s" % (self.CS_TEMPLATES_DIR, "conntrackd.conf.templ"), self.CONNTRACKD_CONF)
-        CsHelper.copy_if_needed(
             "%s/%s" % (self.CS_TEMPLATES_DIR, "checkrouter.sh.templ"), "/opt/cloud/bin/checkrouter.sh")
+        #The file is always copied so the RVR doesn't't get the wrong config.
+        #Concerning the r-VPC, the configuration will be applied in a different manner
+        CsHelper.copy(
+            "%s/%s" % (self.CS_TEMPLATES_DIR, "conntrackd.conf.templ"), self.CONNTRACKD_CONF)
 
         CsHelper.execute(
             'sed -i "s/--exec\ \$DAEMON;/--exec\ \$DAEMON\ --\ --vrrp;/g" /etc/init.d/keepalived')


Mime
View raw message