Project

General

Profile

Actions

Bug #24546

closed

Concurrent creation of subnets can lead to records with duplicate names

Added by Ivan Necas over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Network
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by The Foreman Bot over 5 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
Actions #2

Updated by Ivan Necas over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #3

Updated by Marek Hulán over 5 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
Actions

Also available in: Atom PDF