Bug 1563262

Summary: concurrent registration occasionally fails with "host_id has already been taken" error
Product: Red Hat Satellite Reporter: Satellite Program <pm-sat>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: jcallaha
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.14CC: andrew.schofield, bkearney, cduryee, ehelms, kabbott, rplevka, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.4.5.63-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1553845 Environment:
Last Closed: 2018-04-27 19:48:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
script logs
none
client logs none

Comment 2 jcallaha 2018-04-04 13:30:06 UTC
Verified in Satellite 6.3.1 Snap 2.

I ran content-host-d's flood script to register 5000 new content hosts within 1h 25m. During the process, there were always 50 concurrent registrations. At no point did any of the hosts encounter the "host_id has already been taken" error.

The only two registrations that failed were due to this unrelated error:
"Unable to register system, not all services available"
Which is likely due to the Satellite struggling under the registration load.
The failed systems were bad1835 and bad3606.

I am attaching the logs for the script as well as all of the registered clients.

# python flood.py -s ibm-x3550m3-10.lab.eng.brq.redhat.com -t rhel72 -c 5000 -n bad --limit 50 --exit-criteria regis

project source: https://github.com/JacobCallahan/content-host-d

Comment 3 jcallaha 2018-04-04 13:30:34 UTC
Created attachment 1417261 [details]
script logs

Comment 4 jcallaha 2018-04-04 13:30:56 UTC
Created attachment 1417262 [details]
client logs

Comment 5 Bryan Kearney 2018-04-27 19:48:12 UTC
this was released in 6.3.1.