mirror of https://github.com/apache/cloudstack.git
Configure rVPC for router.redundant.vrrp.interval advert_int setting
This commit is contained in:
parent
2bfb12cba9
commit
9c0eee4387
|
|
@ -154,3 +154,7 @@ class CsCmdLine(CsDataBag):
|
|||
return self.idata()['useextdns']
|
||||
return False
|
||||
|
||||
def get_advert_int(self):
|
||||
if 'advert_int' in self.idata():
|
||||
return self.idata()['advert_int']
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ class CsFile:
|
|||
self.new_config[sind:eind] = content
|
||||
|
||||
def greplace(self, search, replace):
|
||||
logging.debug("Searching for %s and replacing with %s" % (search, replace))
|
||||
self.new_config = [w.replace(search, replace) for w in self.new_config]
|
||||
|
||||
def search(self, search, replace):
|
||||
|
|
|
|||
|
|
@ -138,6 +138,9 @@ class CsRedundant(object):
|
|||
" router_id ", " router_id %s" % self.cl.get_name())
|
||||
keepalived_conf.search(
|
||||
" interface ", " interface %s" % guest.get_device())
|
||||
keepalived_conf.search(
|
||||
" advert_int ", " advert_int %s" % self.cl.get_advert_int())
|
||||
|
||||
keepalived_conf.greplace("[RROUTER_BIN_PATH]", self.CS_ROUTER_DIR)
|
||||
keepalived_conf.section("authentication {", "}", [
|
||||
" auth_type AH \n", " auth_pass %s\n" % self.cl.get_router_password()])
|
||||
|
|
|
|||
Loading…
Reference in New Issue