Skip to content

Commit d582358

Browse files
author
dean.close
committed
CLOUDSTACK-9339: Leave public interfaces down in backup redundant routers.
1 parent 4db1c01 commit d582358

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from CsRule import CsRule
2929

3030
VRRP_TYPES = ['guest']
31-
PUBLIC_INTERFACE = ['eth1']
3231

3332
class CsAddress(CsDataBag):
3433

@@ -321,15 +320,14 @@ def check_is_up(self):
321320
for i in CsHelper.execute(cmd):
322321
if " DOWN " in i:
323322
cmd2 = "ip link set %s up" % self.getDevice()
324-
# If redundant only bring up public interfaces that are not eth1.
325-
# Reason: private gateways are public interfaces.
326-
# master.py and keepalived will deal with eth1 public interface.
327-
if self.cl.is_redundant() and (not self.is_public() or self.getDevice() not in PUBLIC_INTERFACE):
323+
# All interfaces should be up on non-redundant or master routers
324+
if not self.cl.is_redundant() or self.cl.is_master():
328325
CsHelper.execute(cmd2)
329-
# if not redundant bring everything up
330-
if not self.cl.is_redundant():
326+
# only bring up non-public interfaces on backup redundant routers
327+
elif not self.is_public():
331328
CsHelper.execute(cmd2)
332329

330+
333331
def set_mark(self):
334332
cmd = "-A PREROUTING -i %s -m state --state NEW -j CONNMARK --set-xmark %s/0xffffffff" % \
335333
(self.getDevice(), self.dnum)

0 commit comments

Comments
 (0)