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 1423505 - [RFE] add a "any derived SKU" field to activation key subscription management
Summary: [RFE] add a "any derived SKU" field to activation key subscription management
Keywords:
Status: CLOSED DUPLICATE of bug 1401106
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: Barnaby Court
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-17 13:25 UTC by François Cami
Modified: 2023-09-15 00:01 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-18 15:49:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1527227 0 medium CLOSED [RFE] add additional info to activation key subscription attachment page 2021-09-09 13:41:37 UTC
Red Hat Issue Tracker SAT-4978 0 None None None 2021-09-09 12:10:38 UTC

Internal Links: 1527227

Description François Cami 2017-02-17 13:25:36 UTC
When subscription auto-attach is disabled [0] in an activation key, and when VDC subscriptions are present, registering a VM with an activation key requires that all the /derived/ SKUs boxes are checked in the activation key.

This requires tedious management as adding and removing hypervisors requires hand-managing all the activation keys.

Please add a "any derived SKY" field / checkbox with *-like functionality in the subscription pane of activation keys.


[0] and this is nearly always the case as auto-attach is not compatible with custom products AFAICT

Comment 1 Rich Jerrido 2017-02-17 15:55:23 UTC
The use case that I believe you are trying to accomplish is

When registering a guest:

- I want to ensure that it consumes the subscription of its hypervisor. 
- I want to do this without requiring the admin to attach every derived SKU (of each hypervisor the guest might be hosted on) to the activation key. 


That can be accomplished with an Activation Key with no subscriptions attached (absolutely zero. No Red Hat subs. No Custom Subs)+ auto-attach = true. This will allow you to register guests on their respective hypervisors without having to attach the derived subs to the key. 

This is documented in use case #2 of this doc (https://access.redhat.com/blogs/1169563/posts/2867891) 


The interesting twist is adding in custom products. 

According to Satellite's UI:

"When Auto Attach is enabled, registering systems will be attached to all associated custom products and only associated Red Hat subscriptions required to satisfy the system's installed products."

If I understand you correctly, you are stating that if you were to create a key with auto-attach = true AND custom products attached, that they are not. 

This would be counter to the statement in the UI, and further investigation would be required. 

Generally, I recommend putting custom products on their own activation key anyway because since they behave differently from Red Hat products, it makes sense to separate them. Plus I am a big fan of the UNIX model of doing 'one thing well'. 


I am hesitant to support adding a new field to an activation key to 'add any Derived SKU' as I believe that the use case that it would solve is already solved today.

Comment 3 François Cami 2017-02-17 21:11:58 UTC
@Rich: yes, if auto-attach is set to true and custom products are added, no Red Hat products are attached. 
So it seems the UI wording could be better - please test & confirm what I saw if at all possible.

Using multiple activation might solve the use case indeed.

Comment 5 Tom McKay 2017-02-27 13:55:11 UTC
All custom products in an activation key will be attached, regardless of auto-attach true or false. If this is not the case then please file a BZ with reproducer steps.

Comment 6 Rich Jerrido 2017-02-27 16:26:52 UTC
(In reply to Tom McKay from comment #5)
> All custom products in an activation key will be attached, regardless of
> auto-attach true or false. If this is not the case then please file a BZ
> with reproducer steps.

Understood. The question is what is the expected behavior of Red Hat subscriptions in this scenario:

- User creates an activation key. 
- User sets key to auto-attach = true. 
- User associates a custom subscription. 
- User associated no/zero Red Hat subscriptions. 

Should:

[A] Only the custom product get attached. 
[B] Both the custom product AND a Red Hat subscription get attached

The wording in the UI is arguably unclear:

"When Auto Attach is enabled, registering systems will be attached to all associated custom products and only associated Red Hat subscriptions required to satisfy the system's installed products."


Based upon the reproducer below, it appears to be [A]

# Assume the following custom sub. 

[
  {
    "ID": 18,
    "UUID": "2c91809352db8ab10152db9c9c770d57",
    "Name": "Extra Packages for Enterprise Linux",
    "Contract": null,
    "Account": null,
    "Support": null,
    "Quantity": "Unlimited",
    "Consumed": 2,
    "End Date": "2046-02-05T17:10:15.000+0000",
    "Attached": 2
  },
]

# Create an AK, set the auto-attach = true & associate the custom sub. 
ORG=Example
hammer activation-key create --organization "$ORG" --name 'ak-test-custom' --content-view RHEL7_w_EPEL --lifecycle-environment Library
hammer activation-key update --organization "$ORG" --name 'ak-test-custom' --auto-attach true
hammer activation-key add-subscription --organization "$ORG" --name "ak-test-custom" --subscription-id 18


# verify the key is setup as desired. 
hammer activation-key info --organization "$ORG" --name ak-test-custom
Name:                  ak-test-custom
ID:                    23
Description:           
Host Limit:            Unlimited
Auto Attach:           true
Lifecycle Environment: Library
Content View:          RHEL7_w_EPEL
Host Collections:


hammer --output json activation-key subscriptions --activation-key ak-test-custom --organization "$ORG" 
[
  {
    "ID": 18,
    "Name": "Extra Packages for Enterprise Linux",
    "Attached": null,
    "Quantity": null,
    "Start Date": "2016-02-13T17:10:15.000+0000",
    "End Date": "2046-02-05T17:10:15.000+0000",
    "Support": null,
    "Contract": null,
    "Account": null
  }
]


# On a client:

# subscription-manager register --org Example --activationkey ak-test-custom
The system has been registered with ID: cd762202-8e2d-4ace-9a65-0ec60d8a9921 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Not Subscribed

Unable to find available subscriptions for all your installed products.
# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Extra Packages for Enterprise Linux
Provides:            Extra Packages for Enterprise Linux
SKU:                 1455383415560
Contract:            
Account:             
Serial:              2355506871675640933
Pool ID:             2c91809352db8ab10152db9c9c770d57
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              02/13/2016
Ends:                02/05/2046
System Type:         Physical



Lastly, since we commonly recommend to users to create an AK with no Red Hat Subs attached with the intent of getting either the derived SKU or 24h unmapped guest pool, it is not unreasonable for them to believe that a key with no Red Hat subs attached (regardless of the presence of custom subs) will behave exactly the same. 

They currently do not.

Comment 7 Rich Jerrido 2017-02-27 17:25:40 UTC
My recommendation would be to:

- change the behavior such that activation keys with no Red Hat subscriptions will behave the same regardless of the presence of a Custom subscription. 

OR 

- update the wording in the Satellite UI to make this distinction more obvious. 

I would strongly prefer the former. Also, assuming that the former is completed, I believe it would also satisfy François' request in the description.

Comment 8 François Cami 2017-02-27 17:56:15 UTC
For the record, "activation keys set to auto-attach must behave the same regardless of the presence of a custom subscription" would indeed satisfy my request.

If we cannot do that the wording in the UI should be adapted.

Comment 9 Michael Stead 2018-01-15 16:54:43 UTC
Currently in candlepin, when registering with a key that has autoattach=true and a set of subscriptions associated with the key (regardless of being custom or not), only the set of subscriptions associated with the key will be considered by the auto-attach process.

Comment 11 Rich Jerrido 2018-01-15 17:33:17 UTC
(In reply to Michael Stead from comment #9)
> Currently in candlepin, when registering with a key that has autoattach=true
> and a set of subscriptions associated with the key (regardless of being
> custom or not), only the set of subscriptions associated with the key will
> be considered by the auto-attach process.

Fair enough, but I seem to (mis)remember that it didn't use to work this way. That is, an activation key with autoattach=true + Custom Subs + 0 Red Hat sub would still end up with an unreported guest getting an temp unmapped pool. 

(However, I could be misremembering).

The net effect is that a user would need an additional activation key for custom products, and present them all at registration time. This is what we recommend in Subscription-manager for the former Red Hat Network User: Part 9 - A Case Study with activation keys.(https://access.redhat.com/blogs/1169563/posts/2867891)


Also, it is not entirely clear the intended/expected behavior of keys in the UI (https://bugzilla.redhat.com/show_bug.cgi?id=1527227)

Comment 13 Rich Jerrido 2018-01-18 15:49:06 UTC
After discussing this with the team, we won't implement this functionality. Activation keys are confusing enough as is, and it doens't make sense to have a singular key behave in multiple ways. (and potentially changing the behavior of already deployed keys).

We are closing this bug in favor of  [RFE] add additional info to activation key subscription attachment page (https://bugzilla.redhat.com/show_bug.cgi?id=1527227) with longer term changes to subscription intent being delivered with [RFE] Subscription-Intent:   Allow a user to express the intent of how a subscription should be used,   using a rules based syntax (https://bugzilla.redhat.com/show_bug.cgi?id=1401106)

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

Comment 14 Red Hat Bugzilla 2023-09-15 00:01:20 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


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