From 41ff43131f030d7a01f6d09a1c12f16cf0d400dd Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Fri, 5 Apr 2019 11:24:05 -0700 Subject: [PATCH] Fix the amphora base port coming up A recent change[1] broke the base port IP address coming up in the amphora. This would cause active/standby and single topology amphora with members on the VIP subnet to fail. This patch resolves this issue by not flushing the eth1:0 address. Story: 2005383 Task: 30368 [1] https://review.openstack.org/#/c/648504/ Change-Id: I52e7e9f172b7783bae09be76cc137f4e7198165f --- octavia/amphorae/backends/agent/api_server/osutils.py | 11 ++++++----- .../notes/fix-eth1-ip-flush-7fadda4bdca387b5.yaml | 11 +++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/fix-eth1-ip-flush-7fadda4bdca387b5.yaml diff --git a/octavia/amphorae/backends/agent/api_server/osutils.py b/octavia/amphorae/backends/agent/api_server/osutils.py index 40cf07b50f..4f5431c938 100644 --- a/octavia/amphorae/backends/agent/api_server/osutils.py +++ b/octavia/amphorae/backends/agent/api_server/osutils.py @@ -199,7 +199,7 @@ class BaseOS(object): return host_routes @classmethod - def _bring_if_up(cls, interface, what): + def _bring_if_up(cls, interface, what, flush=True): # Note, we are not using pyroute2 for this as it is not /etc/netns # aware. # Work around for bug: @@ -215,9 +215,10 @@ class BaseOS(object): out = subprocess.check_output(int_up.split(), stderr=subprocess.STDOUT) LOG.debug(out) - out = subprocess.check_output(addr_flush.split(), - stderr=subprocess.STDOUT) - LOG.debug(out) + if flush: + out = subprocess.check_output(addr_flush.split(), + stderr=subprocess.STDOUT) + LOG.debug(out) out = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT) LOG.debug(out) @@ -248,7 +249,7 @@ class BaseOS(object): cls._bring_if_down(secondary_interface) cls._bring_if_up(primary_interface, 'VIP') if secondary_interface: - cls._bring_if_up(secondary_interface, 'VIP') + cls._bring_if_up(secondary_interface, 'VIP', flush=False) def has_ifup_all(self): return True diff --git a/releasenotes/notes/fix-eth1-ip-flush-7fadda4bdca387b5.yaml b/releasenotes/notes/fix-eth1-ip-flush-7fadda4bdca387b5.yaml new file mode 100644 index 0000000000..76992ab444 --- /dev/null +++ b/releasenotes/notes/fix-eth1-ip-flush-7fadda4bdca387b5.yaml @@ -0,0 +1,11 @@ +--- +upgrade: + - | + To fix the issue with active/standby load balancers or single topology + load balancers with members on the VIP subnet, you need to update the + amphora image. +critical: + - | + Fixed a bug where active/standby load balancers and single topology + load balancers with members on the VIP subnet may fail. An updated + image is required to fix this bug.