Removing guest interfaces form the VRRP list

Removing the not is_redundant from the check that put interfaces UP.
  - it now checks only "not is_public"
This commit is contained in:
wilderrodrigues 2015-01-24 11:55:06 +01:00
parent da53a5502e
commit bd7799401b
2 changed files with 5 additions and 3 deletions

View File

@ -26,8 +26,7 @@ import time
from CsRoute import CsRoute
from CsRule import CsRule
VRRP_TYPES = ['guest']
VRRP_TYPES = ['public']
class CsAddress(CsDataBag):
@ -299,7 +298,8 @@ class CsIP:
if " DOWN " in i:
cmd2 = "ip link set %s up" % self.getDevice()
# Do not change the state of ips on a redundant router that are managed by vrrp or CsRedundant
if not self.config.cmdline().is_redundant() and not self.is_public():
# the guest networks interfaces should be up and running.
if not self.is_public():
CsHelper.execute(cmd2)
def set_mark(self):

View File

@ -147,6 +147,7 @@ class CsRedundant(object):
CsHelper.service("dnsmasq", "stop")
cl.dbag['config']['redundant_master'] = "false"
cl.save()
logging.info("Router switched to fault mode")
def set_backup(self):
""" Set the current router to backup """
@ -171,6 +172,7 @@ class CsRedundant(object):
self.cl.dbag['config']['redundant_master'] = "false"
CsHelper.service("keepalived", "restart")
self.cl.save()
logging.info("Router switched to backup mode")
def set_master(self):
""" Set the current router to master """