Fix race condition in members batch update API call
Fix a potential race condition, the member batch update API call
computes a delta between the current state of the members in the DB and
the members in the requests. But it fetches the members from the DB
before locking the load balancer, it means that another Octavia service
may still update the list of members, then the computation of the
changes may be incorrect.
The list of members is now queried in the locked section.
Reviewed: https:/ /review. opendev. org/c/openstack /octavia/ +/895251 /opendev. org/openstack/ octavia/ commit/ 8a47577b7668e6d c82e048d937d134 4c667e5124
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 8a47577b7668e6d c82e048d937d134 4c667e5124
Author: Gregory Thiemonge <email address hidden>
Date: Fri Sep 15 03:42:26 2023 -0400
Fix race condition in members batch update API call
Fix a potential race condition, the member batch update API call
computes a delta between the current state of the members in the DB and
the members in the requests. But it fetches the members from the DB
before locking the load balancer, it means that another Octavia service
may still update the list of members, then the computation of the
changes may be incorrect.
The list of members is now queried in the locked section.
Closes-Bug: #2036156 8a3e43d4fda0163 4cdce3be5d4
Change-Id: I453ff385620f48