Bug 1438774

Summary: removing multiple subscriptions causes parallel calls to candlepin
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: Subscription ManagementAssignee: Tom McKay <tomckay>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, jcallaha, jyejare
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 17:02:52 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:

Description Tom McKay 2017-04-04 11:47:48 UTC
When multiple subscriptions are removed from a host in a single api call, each of those subs are sent individually to candlepin for removal. This potentially can cause race conditions if those removals are parallelized by foreman tasks. This code should make sure the plan_actions are sequential and not parallel:

https://github.com/Katello/katello/blob/master/app/lib/actions/katello/host/remove_subscriptions.rb#L18-L22

Comment 1 Tom McKay 2017-04-04 11:47:53 UTC
Created from redmine issue http://projects.theforeman.org/issues/19158

Comment 2 Tom McKay 2017-04-04 11:47:58 UTC
Upstream bug assigned to tomckay

Comment 3 Tom McKay 2017-04-04 11:50:24 UTC
I suggest this be considered for backport to Sat-6.2.z. The issue was encountered when using hammer csv to remove attached subscriptions prior to adding new ones. The removal would not always work and so the host was left in an inconsistent state. Any calls to this api with multiple subs to remove (bulk actions in the ui, etc.) has the potential to encounter this.

Comment 6 Satellite Program 2017-04-05 20:15:26 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19158 has been resolved.

Comment 8 Bryan Kearney 2018-02-21 17:02:52 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336