Bug 1406177

Summary: handle pool stackingId in an org-safe manner
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: Subscription ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: asahni, bbuckingham, bkearney, jcallaha, jsherril, jyejare, mmccune, oshtaier, psagat
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-3.3.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:37 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
patch for 6.2.z none

Description Justin Sherrill 2016-12-19 22:22:18 UTC
currently stacking id processing used to hook up a pool and a subscription is not org-aware and can link pools with subscriptions in different orgs.

The result is that product content does not properly show up for a subscription in the UI

Comment 1 Justin Sherrill 2016-12-19 22:22:22 UTC
Created from redmine issue http://projects.theforeman.org/issues/17789

Comment 2 Justin Sherrill 2016-12-19 22:22:25 UTC
Upstream bug assigned to jsherril

Comment 5 Justin Sherrill 2016-12-19 23:43:08 UTC
Created attachment 1233641 [details]
patch for 6.2.z

Comment 6 Justin Sherrill 2016-12-20 13:58:10 UTC
after applying the patch and restarting the services, run:

# foreman-rake console

> Katello::Pool.import_all

Comment 8 Bryan Kearney 2016-12-21 15:18:38 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17789 has been resolved.

Comment 9 Chris Roberts 2017-03-30 00:24:19 UTC
*** Bug 1433122 has been marked as a duplicate of this bug. ***

Comment 10 Pete Sagat 2017-04-07 14:34:40 UTC
I have a customer that would like to use this patch. What steps can I give him to follow to get this implemented on their Sat server?

Comment 11 Justin Sherrill 2017-05-15 15:33:41 UTC
I really don't know the exact reproductions steps, as this was observed on a customer database.  The best I can say is to import a two manifests into two orgs with the same subscriptions.  Use virt-who to register a hypervisor to both, and assign it a vdc sub. 

Then register a client to each org and try to assign the client a guest subscription. I believe the symptoms are that the name of the subscription will be blank or nil or something.

Comment 12 Justin Sherrill 2017-05-15 15:35:08 UTC
Pete, for now they can try to apply the attached patch, restart all the satellite services and then run run:

# foreman-rake console

> Katello::Pool.import_all

Comment 14 Jitendra Yejare 2018-01-11 18:51:12 UTC
Verified!

@ Satellite 6.3 snap 31

Steps (As per comment 11) :

1. Import two manifests into two orgs with the same subscriptions.
2. virt-who to register two different hypervisors to both orgs, and assign it a vdc sub.
3. Registered a client to each org and assigning the client a guest subscription.


Observation:

Correct subscription name and product contents are shown on the guest host.

Note:

The virt-who hypervisor and guests both were docker based and shown as vmware hosts.

Comment 15 Satellite Program 2018-02-21 16:54:37 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