Merge "Fix fully-populated API with allowed_cidrs"

This commit is contained in:
Zuul 2024-03-20 20:29:29 +00:00 committed by Gerrit Code Review
commit fa7cc01787
2 changed files with 14 additions and 0 deletions

View File

@ -558,6 +558,13 @@ class LoadBalancersController(base.BaseController):
subnet_id=add_vip.subnet_id) subnet_id=add_vip.subnet_id)
if listeners or pools: if listeners or pools:
# expire_all is required here, it ensures that the loadbalancer
# will be re-fetched with its associated vip in _graph_create.
# without expire_all the vip attributes that have been updated
# just before this call may not be set correctly in the
# loadbalancer object.
lock_session.expire_all()
db_pools, db_lists = self._graph_create( db_pools, db_lists = self._graph_create(
lock_session, db_lb, listeners, pools) lock_session, db_lb, listeners, pools)

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fixed a bug when creating a load balancer and a listener with
``allowed_cidrs`` with the fully-populated load balancer API, the call was
rejected because Octavia could not validate that the IP addresses of the
``allowed_cidrs`` have the same family as the VIP address.