Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1210294 - [RFE] request for subscription-manager to support filtering auto-attach pools using matches
[RFE] request for subscription-manager to support filtering auto-attach pools...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager (Show other bugs)
7.3
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: candlepin-bugs
John Sefler
: FutureFeature, Triaged, UserExperience
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-09 07:10 EDT by Rich Jerrido
Modified: 2018-04-03 00:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 Rich Jerrido 2015-04-09 07:10:24 EDT
Description of problem:

Newer versions of subscription-manager (>=1.13.7), a user can invoke a command to search for a matching subscription. 

Example would be:

subscription-manager list --available --matches 'Awesome*'

Which would show all the pools that match 'Awesome'


This RFE requests extending the 'attach' subcommand such that the user can attach the matching subscriptions with one command. Proposed example would be


subscription-manager attach --available --matches 'Awesome*' 


This would support this use case:


"As a user, I know I need a sub that provides RHEL, RHSCL & Satellite
(because the documentation says so), I may not have any/all of them installed yet (thus no product certs in /etc/pki/product) and I am deferring the decision making to you (subscription-manager) because you are better at it than me"

After invoking the proposed command, (which would give us a much shorter list of pools to work with) we'd run through a process similar
to auto-attach, where we consult the systems facts, host/guest
relationship, SLA preference, etc. to *attempt* to pick the most appropriate
pool, (I.e. a virtual guest should preferably consume from its
hypervisors pool before consuming a unit/instance based sub).  Failing
gracefully with 'you don't have a sub that matches what you asked for'
is totally appropriate.
Comment 2 John Sefler 2015-04-09 09:13:19 EDT
Let me try and rephrase the request...

The syntax for the new function would be...

# subscription-manager attach --auto --matches 'Awesome*' 
or now that --auto is the default behavior starting in subscription-manager-1.14)
# subscription-manager attach --matches 'Awesome*'

Under the covers, candlepin's algorithm would be something like this...
  1a. search through all of the engineering product (Names and IDs) that are provided by the currently available pools for this consumer
  1b. assume that the matching engineering products are installed
  2a. search through all of the subscription pools (Names, SKU, Contract, Service Level) that are currently available for this consumer
  2b. assume that *all* of the product Ids provided by the matching subscriptions are installed
  3.  run the auto binding algorithm against only the union of assumed installed products from 1b and 2b.


Reference on matches: https://bugzilla.redhat.com/show_bug.cgi?id=1146125#c7
Comment 7 Barnaby Court 2017-08-21 10:10:31 EDT
This is specifically for adding the ability to use the --matches flag with the auto-attach to filter the pools that will be considered for auto-attch.

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