Interfaces were not coming up on non redundant router

This commit is contained in:
Ian Southam 2014-11-03 14:03:49 +01:00 committed by wilderrodrigues
parent 0a95c44c51
commit e30da35879
2 changed files with 5 additions and 3 deletions

View File

@ -237,9 +237,10 @@ class CsIP:
for i in CsHelper.execute(cmd):
if " DOWN " in i:
cmd2 = "ip link set %s up" % self.getDevice()
# Do not change the state of ips on a master redundant router that are managed by vrrp
if self.cl.is_master() or \
not self.needs_vrrp():
# Do not change the state of ips on a redundant router that are managed by vrrp or CsRedundant
if self.cl.is_redundant() and self.needs_vrrp():
pass
else:
CsHelper.execute(cmd2)
def set_mark(self):

View File

@ -166,6 +166,7 @@ class CsRedundant(object):
return
ads = [o for o in self.address.get_ips() if o.needs_vrrp()]
for o in ads:
## cmd2 = "ip link set %s up" % self.getDevice()
CsHelper.execute("ifconfig %s down" % o.get_device())
CsHelper.execute("ifconfig %s up" % o.get_device())
CsHelper.execute("arping -I %s -A %s -c 1" % (o.get_device(), o.get_ip()))