In the implicit_policy driver, when creating a default L3 policy,
raise DefaultL3PolicyAlreadyExists if an L3 policy named 'default'
already exists.
If DefaultL3PolicyAlreadyExists is raised when the implicit_policy
driver attempts to create the default L3 policy for a tenant, query
again to see if a default L3 policy has been concurrently created, and
if so, use that. This requires adding local_api wrappers for
postcommit group policy resource CRUD operations called in the
implicit_policy driver, so that clean DB sessions are used.
Also, fix the resource_mapping driver's
delete_policy_target_group_postcommit to gracefully handle partially
constructed states, such as a null L2 policy or a subnet not attached
to a router.
Reviewed: https:/ /review. openstack. org/228607 /git.openstack. org/cgit/ stackforge/ group-based- policy/ commit/ ?id=4fcd843eff4 f19d1d8c77ba30c 1d9f0bac06b9c8
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit 4fcd843eff4f19d 1d8c77ba30c1d9f 0bac06b9c8
Author: Robert Kukura <email address hidden>
Date: Wed Sep 16 14:50:26 2015 -0400
Handle concurrent implicit L3P creation
In the implicit_policy driver, when creating a default L3 policy, AlreadyExists if an L3 policy named 'default'
raise DefaultL3Policy
already exists.
If DefaultL3Policy AlreadyExists is raised when the implicit_policy
driver attempts to create the default L3 policy for a tenant, query
again to see if a default L3 policy has been concurrently created, and
if so, use that. This requires adding local_api wrappers for
postcommit group policy resource CRUD operations called in the
implicit_policy driver, so that clean DB sessions are used.
Also, fix the resource_mapping driver's policy_ target_ group_postcommi t to gracefully handle partially
delete_
constructed states, such as a null L2 policy or a subnet not attached
to a router.
Closes-bug: 1462024
Partial-bug: 1417312
Conflicts: /network/ neutronv2/ local_api. py /neutron/ services/ grouppolicy/ drivers/ resource_ mapping. py
gbpservice
gbpservice
Change-Id: I09f29eef22edb4 5290070aae30e97 c93c77ea341 1b0dc230cc944c9 6f1366d9dd)
(cherry picked from commit 7acac86b65f360b