Bug 967755

Summary: [register] unable to combine --servicelevel with --activationkey option
Product: Red Hat Enterprise Linux 6 Reporter: Garik Khachikyan <gkhachik>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED NOTABUG QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.4CC: bkearney, gkhachik, mkoci, wpoteat
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-03 14:52:36 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: 862910    

Description Garik Khachikyan 2013-05-28 09:12:35 UTC
Description of problem:
Right now the recent available option of RHSM seems does not allow to combine service level with activation keys during registration.
It is useful stuff to have different activation keys (with different usage limits) and with different RHEL subscriptions attached to them (recent implementation of Katello allows it) with different support levels there.
So one may want to expose it wishing to perform something like:
===
subscription-manager register --activationkey akTesting --release 6.4 --force --name awesomeSystem --org awesomeOrg --servicelevel Premium --auto-attach
=== 

it just gets fails with:
===
WARNING

This system has already been registered with Red Hat using RHN Classic.

The tool you are using is attempting to re-register using Red Hat Subscription Management technology. Red Hat recommends that customers only register once.

To learn how to unregister from either service please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563
Error: Activation keys cannot be used with --auto-attach.
===

Version-Release number of selected component (if applicable):
subscription-manager-1.1.23.1-1.el6_4.x86_64
python-rhsm-1.8.0-1.pulp.el6sat.x86_64


How reproducible:
always

Steps to Reproduce:
1.Setup a Katello
2.manifest import + enable repo sets of RHEL6Server
3.promote to Testing env
4.prepare ak for Testing, set limit to 3, add the RHEL subscription from that manifest.
5.configure rhsm to connect to the Katello
6.perform the command above

Actual results:
failure

Expected results:
available to set servicelevel on registration using AKs

Additional info:

Comment 3 William Poteat 2013-06-03 14:52:36 UTC
This must be run a separate commonads:

subscription-manager register --activationkey akTesting --release 6.4 --force --name awesomeSystem --org awesomeOrg


subscription-manager register --servicelevel Premium --auto-attach


These commands are mutually exclusive by design.

Comment 4 Garik Khachikyan 2013-06-03 14:59:13 UTC
I have nothing to argue if it "by-design" :) ty