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 1401106 - [RFE] Subscription-Intent: Allow a user to express the intent of how a subscription should be used, using a rules based syntax.
Summary: [RFE] Subscription-Intent: Allow a user to express the intent of how a subscr...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: jcallaha
URL:
Whiteboard:
: 1308544 1339286 1423505 1436822 1443108 1459551 1478080 1500959 1644962 1659480 (view as bug list)
Depends On:
Blocks: 1296845 1353215 1399395 1476375 1650573
TreeView+ depends on / blocked
 
Reported: 2016-12-02 20:55 UTC by Rich Jerrido
Modified: 2023-10-06 17:34 UTC (History)
34 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-03 10:21:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1307036 0 medium CLOSED [RFE] Auto attach VDC subscription to ESXi hypervisor 2023-09-07 18:44:25 UTC
Red Hat Bugzilla 1308544 0 high CLOSED [RFE] Allow automatic assignment of subscriptions to hypervisors discovered by "virt-who" 2023-10-06 17:31:43 UTC
Red Hat Bugzilla 1322653 0 unspecified CLOSED Provide a means for activation keys to define/force specific Red Hat Products to be installed. 2021-06-10 11:14:23 UTC
Red Hat Bugzilla 1343935 0 medium CLOSED [RFE] User specified rules for auto-attach 2024-06-13 20:42:17 UTC
Red Hat Bugzilla 1524528 0 urgent CLOSED [RFE] Restrict a system to only auto-attach either host-provided subscriptions or temporary guest subscriptions 2023-10-06 17:41:50 UTC
Red Hat Knowledge Base (Solution) 2159981 0 None None None 2018-07-24 15:06:04 UTC


Description Rich Jerrido 2016-12-02 20:55:11 UTC
Description of problem:


As aa user of Satellite 6, I would like the ability to attach subscriptions based upon known subscription-manager facts. 

At registration time, the client reports its facts (via subscription-manager facts). I would like the ability to create a list of rules which govern how subscriptions get attached, based upon those system facts. 

Maybe an ordered list that states something like

if network.ipv4_address == 192.168.*.*, attach qty 1 of '$SOME_SUB'
if dmi.system.manufacturer == 'HP', attach qty 2 of $SOME_OTHER SUB. 

This capability should support booleans (AND, OR & NOT)

The idea is that end users purchases subs based upon particular facts (I purchase $X subs for dev systems, or $Y subs for physical systems. This capability will allow them to reflect that within Satellite 6.

Comment 2 Rich Jerrido 2017-01-09 18:12:17 UTC
Thinking about this a bit more, this would be a functionality/feature that would be useful as an organizational setting in addition to (or in lieu of) it being an activation key feature. 

As hosts/consumers can be created via means other than registration via subscription-manager (such as via virt-who or hammer csv), it may make sense to have this logic somewhere that covers all registration methods.

Comment 9 Barnaby Court 2017-04-03 17:38:28 UTC
*** Bug 1436822 has been marked as a duplicate of this bug. ***

Comment 13 Rich Jerrido 2017-12-14 21:15:24 UTC
*** Bug 1339286 has been marked as a duplicate of this bug. ***

Comment 14 Rich Jerrido 2017-12-14 21:16:37 UTC
*** Bug 1443108 has been marked as a duplicate of this bug. ***

Comment 15 Rich Jerrido 2017-12-16 10:38:02 UTC
*** Bug 1459551 has been marked as a duplicate of this bug. ***

Comment 16 Rich Jerrido 2018-01-18 15:49:06 UTC
*** Bug 1423505 has been marked as a duplicate of this bug. ***

Comment 17 Rich Jerrido 2018-01-18 15:49:36 UTC
*** Bug 1500959 has been marked as a duplicate of this bug. ***

Comment 18 Rich Jerrido 2018-02-26 19:30:40 UTC
*** Bug 1478080 has been marked as a duplicate of this bug. ***

Comment 20 Rich Jerrido 2018-07-24 15:06:05 UTC
*** Bug 1308544 has been marked as a duplicate of this bug. ***

Comment 22 Daniele Palumbo 2018-10-01 14:37:42 UTC
"attach qty 2 of $SOME_OTHER SUB."
is suitable on some condition but not all.
Likely "attach qty needed", having the math done by Satellite, is a common configuration.

Comment 23 Daniele Palumbo 2018-10-01 14:52:05 UTC
Some more considerations, please forgive the facts name, this is to explain just the expectation

if type = "hypervisor" and vmware.cluster="vdc_cluster" ( # start of a condition
if ( vmware.cluster_guests_members / vmware.cluster_host_members > 5), attach ( ( "RHEL Premium VDC subscription" or "RHEL Standard VDC subscription" ) and ("Smart Management Premium VDC Subscription" or "Smart Management Standard VDC Subscription" ) ) # mixed variables need to be evaluated. Math operations has to be possible.
else --attach Nil # remove the attached subscription if not matched on the 2nd condition
)

process # keyword to run the above queries not performed still and wait for the results

if type = "guest" and hypervisor.sub = Nil --attach ( ( "RHEL Premium Physical Node subscription" or "RHEL Standard Physical Node subscription" ) and ("Smart Management Premium Physical Node Subscription" or "Smart Management Standard Physical Node Subscription" ) ) # in case of Hypervisor is without a valid subscription, after process keyword

if type = "guest" and hypervisor.sub != Nil --attach ( hypervisor.all_available_subs ) #this will attach all of the available subscriptions that can be inherited from the Host

if type = "physical" --attach ( ( "RHEL Premium Physical Node subscription" or "RHEL Standard Physical Node subscription" ) and ("Smart Management Premium Physical Node Subscription" or "Smart Management Standard Physical Node Subscription" ) ) # simple rules for physical node

###

process is needed otherwise we need 2 round of the attachment of subscription to run.
Example: one Host currently has one subscription, and therefore is potentially need to have the first run to remove the attached subscription and then proceed with the other activities.

Comment 24 Rich Jerrido 2018-11-09 16:48:54 UTC
*** Bug 1644962 has been marked as a duplicate of this bug. ***

Comment 26 Rich Jerrido 2019-01-24 18:20:27 UTC
*** Bug 1659480 has been marked as a duplicate of this bug. ***

Comment 31 Sean O'Keeffe 2020-02-03 10:21:52 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support.

Note, Simple Content Access and Subscription Watch may help. See https://access.redhat.com/documentation/en-us/subscription_central for more details.


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