Merge "Fix incorrect masquerade rules in multivip LBs"

This commit is contained in:
Zuul 2023-10-11 12:54:03 +00:00 committed by Gerrit Code Review
commit 860d2f6aad
3 changed files with 13 additions and 6 deletions

View File

@ -356,11 +356,10 @@ class InterfaceController(object):
**rule)
def _scripts_up(self, interface, current_state):
if current_state == consts.IFACE_DOWN:
for script in interface.scripts[consts.IFACE_UP]:
LOG.debug("%s: Running command '%s'",
interface.name, script[consts.COMMAND])
subprocess.check_output(script[consts.COMMAND].split())
for script in interface.scripts[consts.IFACE_UP]:
LOG.debug("%s: Running command '%s'",
interface.name, script[consts.COMMAND])
subprocess.check_output(script[consts.COMMAND].split())
def down(self, interface):
LOG.info("Setting interface %s down", interface.name)

View File

@ -714,7 +714,9 @@ class TestInterface(base.TestCase):
table=254,
family=socket.AF_INET)])
mock_check_output.assert_not_called()
mock_check_output.assert_has_calls([
mock.call(["post-up", "eth1"])
])
@mock.patch('pyroute2.IPRoute.rule')
@mock.patch('pyroute2.IPRoute.route')

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixed an issue when using UDP listeners in dual-stack (IPv4 and IPv6) load
balancers, some masquerade rules needed by UDP were not correctly set on the
member interfaces.