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
Reviewed: https:/ /review. openstack. org/203384 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=80ee562dec3 f397ea6c18a4ca3 a1e69ab996341e
Committed: https:/
Submitter: Jenkins
Branch: master
commit 80ee562dec3f397 ea6c18a4ca3a1e6 9ab996341e
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
Change-Id: I20f65d3eae9421