Bug #24546
closedConcurrent creation of subnets can lead to records with duplicate names
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1612909
Description of problem:
Concurrent creation of subnets can lead to records with duplicate names
Version-Release number of selected component (if applicable):
Verified in 6.3, as well as in upstream, has been around probably from the beginning
How reproducible:
Under concurrent requets
for x in {1..20}; do
echo "Attempt $x"
for y in {1..4}; do
curl k -u admin:changeme -X POST -d '{"name":"subnet'$x'","network":"192.168.0.1","mask":"255.255.255.0"}' -H 'Content-Type: application/json' http://localhost:300/api/v2/subnets &
done
sleep 1
done
Actual results:
select name, count() from subnets group by name having count() > 1;
returns multiple records
Expected results:
select name, count() from subnets group by name having count() > 1;
returns no record.
Additional info:
Testing notes: when verifying, please first generate multiple subnets with an installation without this fix and try to migrate to the version with it.
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Ivan Necas
- Pull request https://github.com/theforeman/foreman/pull/5923 added
Updated by Ivan Necas over 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 42466f75a1a7786317e60c12408f50d1407160ad.
Updated by Marek Hulán over 6 years ago
- Subject changed from Concurrent creation of subnets can lead to records with duplicate names to Concurrent creation of subnets can lead to records with duplicate names
- Fixed in Releases 1.20.0 added