Merge "Fix race condition in members batch update API call"
This commit is contained in:
commit
025bfdd758
|
@ -336,7 +336,6 @@ class MembersController(MemberController):
|
|||
|
||||
with context.session.begin():
|
||||
db_pool = self._get_db_pool(context.session, self.pool_id)
|
||||
old_members = db_pool.members
|
||||
|
||||
project_id, provider = self._get_lb_project_id_provider(
|
||||
context.session, db_pool.load_balancer_id)
|
||||
|
@ -354,6 +353,11 @@ class MembersController(MemberController):
|
|||
with context.session.begin():
|
||||
self._test_lb_and_listener_and_pool_statuses(context.session)
|
||||
|
||||
# Reload the pool, the members may have been updated between the
|
||||
# first query in this function and the lock of the loadbalancer
|
||||
db_pool = self._get_db_pool(context.session, self.pool_id)
|
||||
old_members = db_pool.members
|
||||
|
||||
old_member_uniques = {
|
||||
(m.ip_address, m.protocol_port): m.id for m in old_members}
|
||||
new_member_uniques = [
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed a race condition in the members batch update API call, the data
|
||||
passed to the Octavia worker service may have been incorrect when quickly
|
||||
sending successive API calls. Then the load balancer was stuck in
|
||||
PENDING_UPDATE provisioning_status.
|
Loading…
Reference in New Issue