Red Hat Bugzilla – 1401106 – [RFE] Subscription-Intent: Allow a user to express the intent of how a subscription should be used, using a rules based syntax.
Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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.
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.
"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.
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.
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.