In a case when first attempt to fetch default security group
fails and attempt to add it fails too due to a concurrent insertion,
later attempt to fetch the same default sg may fail due to
REPEATABLE READ transaction isolation level.
For this case RetryRequest should be issued to restart the
whole transaction and be able to see default group.
The patch also removes 'while True' logic as it's unsafe
Closes-Bug: #1475938
Change-Id: I20f65d3eae9421429aced1f4586cb6988ab577ff
(cherry-picked from commit 80ee562dec3f397ea6c18a4ca3a1e69ab996341e)
Reviewed: https:/ /review. openstack. org/229153 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=96276d5f9b0 92a226aec665779 6c4a1c5d25e6af
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit 96276d5f9b092a2 26aec6657796c4a 1c5d25e6af
Author: Eugene Nikanorov <email address hidden>
Date: Sun Jul 19 03:17:43 2015 +0400
Fix _ensure_ default_ security_ group logic
In a case when first attempt to fetch default security group
fails and attempt to add it fails too due to a concurrent insertion,
later attempt to fetch the same default sg may fail due to
REPEATABLE READ transaction isolation level.
For this case RetryRequest should be issued to restart the
whole transaction and be able to see default group.
The patch also removes 'while True' logic as it's unsafe
Closes-Bug: #1475938 429aced1f4586cb 6988ab577ff ea6c18a4ca3a1e6 9ab996341e)
Change-Id: I20f65d3eae9421
(cherry-picked from commit 80ee562dec3f397