Skip to content

Commit

Permalink
Merge pull request #1234 from zhaoqin-github/v212.6.8-dev
Browse files Browse the repository at this point in the history
[OPENSTACK-2985] Cherry-pick patches to v212.6.8 maintanence branch
  • Loading branch information
zhaoqin-github authored Jan 29, 2024
2 parents 45ff8a4 + c56dcaa commit 518c90a
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
13 changes: 13 additions & 0 deletions docs/RELEASE-NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

Release Notes
=============
v212.6.8.1 (Pike)
--------------

Added Functionality
```````````````````
* [OPENSTACK-2915] New implementation of flavor 21
* [OPENSTACK-2936] Disable SNAT IP validation

Bug Fixes
`````````
* [OPENSTACK-2925] Fix bulk create and delete to fit the input args
* [OPENSTACK-2985] Fix RouterInterfaceDuplicateForSubnet exception

v212.6.8 (Pike)
--------------

Expand Down
2 changes: 1 addition & 1 deletion f5lbaasdriver/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "212.6.8"
__version__ = "212.6.8.1"
5 changes: 3 additions & 2 deletions f5lbaasdriver/v2/bigip/driver_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,9 @@ def __init__(self, driver):
super(LoadBalancerManager, self).__init__(driver)
self.model = models.LoadBalancer
self.validators = [
validator.FlavorValidator(),
validator.SnatIPValidator(driver)
validator.FlavorValidator()
# NOTE(qzhao): Disable SNAT validation until we need it again
# validator.SnatIPValidator(driver)
]

@log_helpers.log_method_call
Expand Down
13 changes: 13 additions & 0 deletions f5lbaasdriver/v2/bigip/plugin_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,19 @@ def attach_subnet_to_router(self, context, router_id=None, subnet_id=None):
subnet_id)
else:
raise
except Exception as ex:
# SDN vendor might have their own router exception type. We
# do not have exception definition, so that have to check
# the error message.
ignore_msg = "already has a port on subnet"
if hasattr(ex, "message") and ignore_msg in ex.message:
LOG.debug("Router is already attached to subnet %s",
subnet_id)
elif hasattr(ex, "msg") and ignore_msg in ex.msg:
LOG.debug("Router is already attached to subnet %s",
subnet_id)
else:
raise

@log_helpers.log_method_call
def detach_subnet_from_router(self, context, router_id=None,
Expand Down
6 changes: 3 additions & 3 deletions f5lbaasdriver/v2/bigip/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def get_available_ips(self, context, lb):

def validate_create(self, context, lb):
flavor = lb.flavor
if flavor in [7, 8]:
if flavor not in [11, 12, 13]:
return

v4_r, v6_r = self._calculate_snat(lb)
Expand All @@ -131,13 +131,13 @@ def validate_update(self, context, old_lb, lb):
flavor = lb.flavor
old_flavor = old_lb.flavor

if flavor in [7, 8]:
if flavor not in [11, 12, 13]:
return

v4_r, v6_r = self._calculate_snat(lb)
old_v4_r, old_v6_r = self._calculate_snat(old_lb)

if old_flavor not in [7, 8]:
if old_flavor in [11, 12, 13]:
v4_r -= old_v4_r
v6_r -= old_v6_r

Expand Down

0 comments on commit 518c90a

Please sign in to comment.