A user creates an L3Policy with a subnet 10.0.x.y/z, where x=0-to-254,y=0-to-254, z>8, not being aware of a default ip-pool range of default L3Policy
Now the user wants to create a PTG using default L2Policy, that create will fail(Exceptions are thrown), although PTG still gets created will null-subnet & L2Policy (ideally we should NOT have allowed this creation.. please refer the bug: 1416177).
Reason behind the failure: Default L2Policy results in default L3Policy which in turn uses a default(pre-defined) ip-pool range which supernets the above user-created L3Policy. Since its overlapping the L3Policy creation fails and the effect cascades
-- We should ideally block the default ip-pool range so that user can avoid creation of over-lapping IP
-- We should reduce the default ip-block size(/8), since it is indeed quite a large IP range, not sure how much applicable for an Enterprise customer
Reviewed: https:/ /review. openstack. org/224293 /git.openstack. org/cgit/ stackforge/ group-based- policy/ commit/ ?id=7acac86b65f 360b1b0dc230cc9 44c96f1366d9dd
Committed: https:/
Submitter: Jenkins
Branch: master
commit 7acac86b65f360b 1b0dc230cc944c9 6f1366d9dd
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
Change-Id: I09f29eef22edb4 5290070aae30e97 c93c77ea341