Bug 837151 - Activation key including virtual type subscriptions from multiple hosts doesn't work.
Activation key including virtual type subscriptions from multiple hosts doesn...
Status: CLOSED WONTFIX
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.3
Unspecified Unspecified
unspecified Severity medium
: rc
: 1.3
Assigned To: Tom McKay
SAM QE List
: Reopened, Triaged
Depends On:
Blocks: sam20-tracker 837915 995947
  Show dependency treegraph
 
Reported: 2012-07-02 22:09 EDT by Etsuji Nakai
Modified: 2016-03-10 22:29 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 837915 995947 (view as bug list)
Environment:
Last Closed: 2016-03-10 22:29:34 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Etsuji Nakai 2012-07-02 22:09:41 EDT
Description of problem:

I tried to use an activation key which contains virtual type subscriptions derived from multiple hosts(HostA and HostB) to register a guest(on HostB), expecting Katello would choose one corresponding to its host(HostB). But it failed.

I'm not sure this is an intended behavior(i.e. a activation key should contain only one virtual type subscription). But if so, there must be a way to check the parent subscription of each virtual subscription as reported in:

https://bugzilla.redhat.com/show_bug.cgi?id=760564

Without that, I cannot choose a correct virtual subscription for a specific host.
Comment 1 Jordan OMara 2012-08-17 17:57:43 EDT
I believe this is an issue in Candlepin as we pass this logic through directly. Assigning to candlepin component
Comment 2 Jordan OMara 2012-08-20 09:01:41 EDT
Reproduce:

1. Create Host A                                                                                                                             
2. Create Host B                                                                                                                             
3. Register Host A with a sub that gives you a virt pool                                                                                     
4. Register Host B with a sub that gives you a virt pool                                                                                     
5. Put both virt pools in an activation key                                                                                                  
6. Register a guest on Host A with the activation key                                                                                        
7. Get an error!
Comment 4 William Poteat 2013-06-12 15:56:47 EDT
An activation key is intended to be a complete set of pools for a machine to use. It is not supposed to be a menu from which to pick and choose.

The fix to be implemented is on step 5. Virt pools will not be allowed together on the same key if their host dependencies are not the same.
Comment 5 William Poteat 2013-08-01 11:03:07 EDT
master commit 0d95d1f54c9635172a2c4e7af314160172a1a4e9
Comment 6 Bryan Kearney 2013-08-02 14:51:43 EDT
SNAP0 contains these bug fixes. Moving to ON_QA.
Comment 8 Garik Khachikyan 2013-09-10 04:46:19 EDT
# REOPEN

Initial problem not fixed IMO:

1. SAM latest snapshot UI allows choosing two different virtual subscriptions and combine them in a single activation key.
2. SAM UI does not have the feature (yet?) to display information on the subscription which host it belongs to (maybe on mouse over?)
3. RHSM refuses to _even_ register the system at all to the system telling:
---
> subscription-manager register --org "virtPools" --release 6.4 --activationkey=virt-pools-combined
Guest's host does not match owner of pool: '8a90861f4106c337014106feaeee011f'.
---

to reproduce:
* create org, import a manifest having 3+ subscription slots, let's say of: 
"Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)"
* subscribe 2 kvm hosts
it creates +2 bonus subscriptions with: " Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)"
* prepare an AK (via UI) and add that both guest subscriptions.
* exec on one of the guests: subscription-manager register --org "virtPools" --release 6.4 --activationkey=virt-pools-combined

versions:
candlepin-0.8.25-1.el6sam.noarch
candlepin-cert-consumer-cfseserver2.usersys.redhat.com-1.0-1.noarch
candlepin-scl-1-5.el6_4.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-selinux-0.8.25-1.el6sam.noarch
candlepin-tomcat6-0.8.25-1.el6sam.noarch
elasticsearch-0.19.9-8.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-1.4.3-10.el6sat.noarch
katello-cli-common-1.4.3-10.el6sat.noarch
katello-common-1.4.3-12.el6sam_splice.noarch
katello-configure-1.4.4-4.el6sat.noarch
katello-glue-candlepin-1.4.3-12.el6sam_splice.noarch
katello-glue-elasticsearch-1.4.3-12.el6sam_splice.noarch
katello-headpin-1.4.3-12.el6sam_splice.noarch
katello-headpin-all-1.4.3-12.el6sam_splice.noarch
katello-selinux-1.4.4-2.el6sat.noarch
ruby193-rubygem-ldap_fluff-0.2.2-1.el6sat.noarch
thumbslug-0.0.34-1.el6sam.noarch
thumbslug-selinux-0.0.34-1.el6sam.noarch
Comment 9 Garik Khachikyan 2013-09-10 04:48:32 EDT
# QUESTION

Please from the fix I can not get the solution made there:

Do we plan to make a fix in SAM UI side to reject creation of activation key having more than one virtual subscription poolid please?

Do we plan to make a fix on candlepin side rejecting to approve activation key having +1 virtual subscriptions attached?

Else?
Comment 10 Tom McKay 2013-09-10 08:43:50 EDT
This BZ will be worked on in a future release. Assigning to myself.

Note You need to log in before you can comment on or make changes to this bug.