CLOUDSTACK-8725 RVR functionality is broken in case of isolated networks, conntrackd fails to start.

Rebased with master. This closes #692
This commit is contained in:
Bharat Kumar 2015-08-13 17:58:15 +05:30 committed by Rajani Karuturi
parent 8bc0294014
commit 18dbc0c4cb
2 changed files with 12 additions and 1 deletions

View File

@ -219,3 +219,14 @@ def copy_if_needed(src, dest):
logging.Error("Could not copy %s to %s" % (src, dest))
else:
logging.info("Copied %s to %s" % (src, dest))
def copy(src, dest):
"""
copy source to destination.
"""
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))

View File

@ -96,7 +96,7 @@ class CsRedundant(object):
d = s.replace(".templ", "")
CsHelper.copy_if_needed(
"%s/%s" % (self.CS_TEMPLATES_DIR, s), "%s/%s" % (self.CS_ROUTER_DIR, d))
CsHelper.copy_if_needed(
CsHelper.copy(
"%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)