Skip to content

Commit 860d2f6

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix incorrect masquerade rules in multivip LBs"
2 parents 6a02e0a + 5c051a6 commit 860d2f6

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

octavia/amphorae/backends/utils/interface.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,10 @@ def _rules_up(self, interface, ipr, idx):
356356
**rule)
357357

358358
def _scripts_up(self, interface, current_state):
359-
if current_state == consts.IFACE_DOWN:
360-
for script in interface.scripts[consts.IFACE_UP]:
361-
LOG.debug("%s: Running command '%s'",
362-
interface.name, script[consts.COMMAND])
363-
subprocess.check_output(script[consts.COMMAND].split())
359+
for script in interface.scripts[consts.IFACE_UP]:
360+
LOG.debug("%s: Running command '%s'",
361+
interface.name, script[consts.COMMAND])
362+
subprocess.check_output(script[consts.COMMAND].split())
364363

365364
def down(self, interface):
366365
LOG.info("Setting interface %s down", interface.name)

octavia/tests/unit/amphorae/backends/utils/test_interface.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,9 @@ def test_up_update(self, mock_wait_tentative, mock_check_output,
714714
table=254,
715715
family=socket.AF_INET)])
716716

717-
mock_check_output.assert_not_called()
717+
mock_check_output.assert_has_calls([
718+
mock.call(["post-up", "eth1"])
719+
])
718720

719721
@mock.patch('pyroute2.IPRoute.rule')
720722
@mock.patch('pyroute2.IPRoute.route')
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Fixed an issue when using UDP listeners in dual-stack (IPv4 and IPv6) load
5+
balancers, some masquerade rules needed by UDP were not correctly set on the
6+
member interfaces.

0 commit comments

Comments
 (0)