Concurrent create_policy_target_group call fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Group Based Policy |
Fix Released
|
High
|
Robert Kukura |
Bug Description
I see an issue when running Rally tests concurrently which creates policy target groups in parallel. I see the following error returned by the create policy target group API
5-83c6-
k/scenarios/
Note from Sumeet for reference
Hi Ajay, Overlapping IP pools are not currently supported for the same
tenant with the default Neutron rendering. So when you create multiple
PTGs in parallel without specifying the L2P/L3P, the implicit workflow
tries to create a L3P with a default IP Pool (10.0.0.0/8 in this
case). The second PTG is trying to be created while the post-commit
for the first one has not finished yet. Hence you are seeing this
issue. I would appreciate if you can file a bug for this, since we
should explore what is a better workflow in this case.
Changed in group-based-policy: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Robert Kukura (rkukura) |
milestone: | none → kilo-gbp-4 |
Changed in group-based-policy: | |
milestone: | kilo-gbp-4 → next |
Changed in group-based-policy: | |
milestone: | next → liberty-1 |
status: | Fix Committed → Fix Released |
It looks to me like this can be resolved by catching this exception and then doing another query to see if a concurrent request has created a default L3P for the tenant, and if so, using it.
This will also resolve the REVISIT regarding concurrency, as long as overlapping L3Ps are disallowed. But once that restriction is removed, this exception will no longer be raised and we'll need some other mechanism, such as the DB table mentioned in the REVISIT, to prevent multiple default L3Ps from being created for a tenant.