Bug 1214829

Summary: [RFE] RHEL 7: make --auto-attach the default behavior for subscription-manager, and register without attaching if no matching subs found
Product: Red Hat Enterprise Linux 7 Reporter: Xixi <xdmoon>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: alikins, bcourt, bhamrick, bkearney, rjerrido, wpoteat, xdmoon
Target Milestone: pre-dev-freezeKeywords: FutureFeature, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1218438 (view as bug list) Environment:
Last Closed: 2016-01-05 16:07:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1121117    

Description Xixi 2015-04-23 15:36:29 UTC
Description of problem:
RFE to make the RHSM registration process one-step by default - i.e. system registration *and* subscription attachment, i.e. set --auto-attach to be the default behavior, and just register the systeam without descriptions if no matching subs are found.

It would help ease a lot of customer use if Red Hat Subscription Management registration process was closer to RHN Classic registration (one step
instead of two). rhnreg_ks and rhn_register for example tries to find and subscribe the most appropriate base Software Channel in addition to system registration.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
by default subscription-manager does not try to attach subscriptions, have to manually specify --auto-attach

Expected results:
subscription-manager tries to attach subscriptions as part of system registration (make --auto-attach the default behavior) so customer needs to run only a single command once for registration and subscription

Additional info:

Comment 2 John Sefler 2015-04-23 15:47:04 UTC
Although this is not exactly what you are asking for, starting with subscription-manager-1.14, the subscribe module has been updated to default to --auto attach subscriptions...

[root@qe-blade-13 ~]# subscription-manager subscribe --help | grep -A1 -- --auto
  --auto                Automatically attach compatible subscriptions to this
                        system. This is the default action.

Comment 3 John Sefler 2015-04-23 15:56:39 UTC
If this RFE is accepted and the --auto-attach/--autosubscribe options are set as default options on the register module, then I'd suggest that a new --no-auto option also be added to the register module.

Comment 4 Adrian Likins 2015-04-29 16:52:04 UTC
I would be in favor of making 'register --auto-attach' the default behaviour or register.

Comment 5 Adrian Likins 2015-04-29 16:53:42 UTC
However, that changes the default behaviour to be 'opt-out' on consuming a subscription, which is probably not acceptable.

Comment 6 Xixi 2015-05-04 22:11:05 UTC
(In reply to Adrian Likins from comment #5)
> However, that changes the default behaviour to be 'opt-out' on consuming a
> subscription, which is probably not acceptable.

Hi Adrian, could you clarify?   thanks,

Comment 7 Xixi 2015-05-04 22:15:24 UTC
cloned for RHEL 6:
Bug 1218438 - [RFE] RHEL 6: make --auto-attach the default behavior for subscription-manager, and register without attaching if no matching subs found

Comment 8 Brian Hamrick 2015-05-12 12:57:44 UTC
Re-opening.  This bug and the clone are part of a CEE initiative.  I did not see clarification/explanation based on comment 6.  Thanks.

Comment 9 Adrian Likins 2015-05-12 13:37:47 UTC
(In reply to Brian Hamrick from comment #8)
> Re-opening.  This bug and the clone are part of a CEE initiative.  I did not
> see clarification/explanation based on comment 6.  Thanks.

Registering a system is basically 0 costs, and doesn't really change the way any subscriptions are allocated. But then attaching a subscription potentially changes that, in ways that can be hard to predict (a new registered machine could exhaust a pool that could cause a prod machine to fail to heal, etc).

Comment 11 Adrian Likins 2015-05-12 14:49:31 UTC
If register and attach needs to happen in one command with no args, I'd prefer to just add a new subcommand rather than change the default behaviour of register.

It wouldn't need to do much aside from 'register [register options] --auto-attach'

How does CEE describe to customers 'register and auto attach'?

(name brainstorming follows...)
subscription-manager attach_system
subscription-manager register_attach
subscription-manager join
subscription-manager consume
subscription-manager auto
subscription-manager use_defaults
subscription-manager defaults
subscription-manager authorize
subsrciption-manager subscribe  (though that's already used...)
subscription-manager enroll

Comment 12 John Sefler 2015-05-12 18:29:04 UTC
I am not in favor of adding another subcommand as suggested in comment 11.  This would just require more documentation and confusion trying to determine which command to run.


Do we already understand that...  "subscription-manager register --auto-attach" is already a one liner that will register and attach available subscriptions that provide for the installed products.  I personally don't think this is too much for a command liner administrator to run.  As a root administrator, I generally prefer atomic operations.  For example, I'd prefer to register the machine in step one, and then explicitly review the available subscriptions/contracts in step two and manually decide which subscriptions to attach in step three.  I therefore vote to keep the current behavior.  If I really want the behavior described in comment 0, I will run "subscription-manager register --auto-attach".

Comment 16 Barnaby Court 2016-01-05 16:07:02 UTC
I am NACKing this for 7.3. Auto attach can be enabled today using the --auto-attach command line. This would be too big a change in behavior for customers that are fully accustomed to the 6.x & 7.x behavior of not auto attaching by default.