Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1322653 - Provide a means for activation keys to define/force specific Red Hat Products to be installed.
Summary: Provide a means for activation keys to define/force specific Red Hat Products...
Keywords:
Status: CLOSED DUPLICATE of bug 1441117
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Activation Keys
Version: 6.1.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact:
URL:
Whiteboard:
: 1383662 1614002 (view as bug list)
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2016-03-31 01:39 UTC by Rich Jerrido
Modified: 2021-06-10 11:14 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-06 15:42:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1401106 0 medium CLOSED [RFE] Subscription-Intent: Allow a user to express the intent of how a subscription should be used, using a rules based ... 2023-10-06 17:34:56 UTC
Red Hat Knowledge Base (Solution) 2693361 0 None None None 2019-12-16 07:03:43 UTC

Internal Links: 1383662 1401106

Description Rich Jerrido 2016-03-31 01:39:26 UTC
Description of problem:
When attempting to attach a subscription from multiple pools of similar layered products activation keys aren't flexible enough. 


Version of components:
katello-2.2.0.19-1.el7sat.noarch


Detailed problem statement:
Activation keys in Satellite 6.1 support 3 basic use cases

[1] provide a list of subs and run auto-attach against the list
[2] provide no subs & run auto-attach (basically run subscription-manager attach --auto-attach)
[3] provide a list of subs and attach ALL of them. 


Consider the following Satellite with these subscriptions. 

hammer --output json subscription list --organization "$ORG"
[
  {
    "Name": "Resilient Storage",
    "Contract": "********",
    "Account": "********",
    "Support": "Layered",
    "Quantity": 100,
    "Consumed": 0,
    "End Date": "2016-08-05",
    "ID": "2c91809352db8ab10152db91919a0cc0",
    "Product": "Resilient Storage",
    "Attached": 0
  },
  {
    "Name": "Resilient Storage",
    "Contract": "********",
    "Account": "********",
    "Support": "Layered",
    "Quantity": 50,
    "Consumed": 0,
    "End Date": "2017-11-05",
    "ID": "2c8b6681cf44b9bfa7eb97fbea5afb",
    "Product": "Resilient Storage",
    "Attached": 0
  },
  {
    "Name": "Red Hat Enterprise Linux for Virtual Datacenters, Premium",
    "Contract": "********",
    "Account": "*******",
    "Support": "Premium",
    "Quantity": 6,
    "Consumed": 0,
    "End Date": "2016-08-05",
    "ID": "2c91809352db8ab10152db91363e04f3",
    "Product": "Red Hat Enterprise Linux for Virtual Datacenters, Premium",
    "Attached": 0
  }
]

Due to my organizations purchasing policies/sales motion/renewal/whatever, we have purchased two groups of Resilient Storage (RS) subscriptions. When provisioning a new RHEL virtual system, I don't really care which group of (RS) subscriptions are used, but I'd like to ensure that when provisioning a node, it has one.  

Today, this is impossible to do:

First and foremost, best practices (https://access.redhat.com/articles/1554633) for using an activation key state to use an activation key with 'auto-attach=true' and no subscriptions attached to register the virtual systems to consume RHEL via vDC. That part works. The challenge is how do I attach exactly 1 RS subscription in addition to the RHEL subscriptions. I'd like to use this first key to attach a RHEL sub, and an additional key to attach the layered product, and provide both at registration time. 

* if I use the use case as described in [1] - 'provide a list of subs and run auto-attach against the list', I create a key with 'auto-attach=true' and both sets of RS subs attached. This key fails to have the desired result because the nodes at registration time do not have any Resilient Storage bits installed, so there is effectively nothing (90.pem doesnt exist in /etc/pki/product) for auto-attach to attach to. 

* if I use the use case as described in [2] - 'provide no subs & run auto-attach', I create a key with 'auto-attach=true' and no subs attached. This key fails to have the desired result since it is effectively the same as running 'subscription-manager attach --auto' and again, 90.pem doesn't exist, so auto-attach cannot attach a Resilient Storage subscription. 

* if I use the use case as described in [3] - 'provide a list of subs and attach ALL of them.', I create a key with 'auto-attach=false' and both sets of RS subs attached. This key fails to have the desired effect as the node will get 1 subscription from *each* pool attached. The system would have too many Resilient Storage subscriptions attached. 


Expected results:

I would like to see the activation key extended with the capability for the end user to define/force a Red Hat product certificate to be installed, even if bits from that products repositories haven't been installed yet. That is, allow me to say 'Resilient Storage is going to be installed on this system, run auto-attach as if it was installed already'. This would allow the [1] use case to work and provide me with exactly the 1 subscription that I desire. 

Additional info:

Today, I can workaround this, by extracting the product certificate for Resilient Storage from a working system (or from the repo) and placing it in /etc/pki/product/ prior to registration and using a use case [1] key, but this is kinda hackish and isn't sustainable. 


For what it's worth, this BZ is effectively the activation key version of  [RFE] request for subscription-manager to support attaching a matching subscription (https://bugzilla.redhat.com/show_bug.cgi?id=1210294)

Comment 1 Barnaby Court 2016-03-31 18:40:16 UTC
With any Sat 6.1.x release Candlepin supports specifying extra product ids for use by auto-attach activation-keys. When a consumer is registered using an auto-attach enabled activation key any product listed in the "productIds" list for the activation key will be added to the installed product's list of the consumer before the auto-attach is run. 

The REST API is documented at http://www.candlepinproject.org/docs/candlepin/api.html#activation-keys

This could be used by Katello (hammer/gui) with no additional work from Candlepin.

Comment 2 Bryan Kearney 2016-07-26 19:00:40 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 3 Peter Vreman 2016-10-11 15:00:37 UTC
I have opened https://bugzilla.redhat.com/show_bug.cgi?id=1383662 with a similair issue, but then for EUS layered product.

Thinking from a User complexity i do not know if adding ProductIds in the mix for ActivationKeys is a good thing.

It adds another dimension of values that needs to be managed and though of.

I recommend an easier alternative to not allow Layered subscriptions together with Auto-Attach. When disallowed provide the user instructions to create and use separate ActivationKeys if he needs.

Also the Auto-Attach is not the perfect solution for all cases. A better guidance like the 3 use cases above on this when it makes sense and not can be helpfull in the WebUI.

Comment 4 Brad Buckingham 2016-10-13 19:39:17 UTC
*** Bug 1383662 has been marked as a duplicate of this bug. ***

Comment 8 Kevin Howell 2018-09-05 19:48:03 UTC
*** Bug 1614002 has been marked as a duplicate of this bug. ***

Comment 10 Rich Jerrido 2018-09-06 15:42:27 UTC

*** This bug has been marked as a duplicate of bug 1441117 ***


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