Bug 1019296 - --activationkey=ak1,ak2 takes in action the first activation key *only*
Summary: --activationkey=ak1,ak2 takes in action the first activation key *only*
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Tom McKay
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-15 12:33 UTC by Garik Khachikyan
Modified: 2019-09-26 14:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 14:06:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs (786.89 KB, application/gzip)
2013-10-15 12:33 UTC, Garik Khachikyan
no flags Details

Description Garik Khachikyan 2013-10-15 12:33:12 UTC
Description of problem:
My RHEL 6.4 client registration to Satellite6 recent compose correctly displays in the system both activation keys but under the yum redhat.repo there is just the first repo plugged.

Version-Release number of selected component (if applicable):
subscription-manager-1.8.22-1.el6_4.x86_64
python-rhsm-1.8.17-1.el6_4.x86_64

How reproducible:
always

Steps to Reproduce:
1.have in Satellite6 a synced RHEL6Latest + AK assigned to the content view having the repo + the subscription attached
2.another custom repo (zoo4 http://hhovsepy.fedorapeople.org/fakerepos/zoo4/) assigned to another ak through the same way as above (content view promoted to the environment + according subscription attached to the AK).
3.register a system with "--activationkey=z004,rhel"

Actual results:
Satellite6 UI shows - two key on details of the registered system
yum repolist shows only zoo4 repo (RHEL6 not!)

Expected results:
all repos to show up for yum

Additional info:
logs attached

Comment 2 Garik Khachikyan 2013-10-15 12:33:43 UTC
Created attachment 812487 [details]
logs

Comment 3 Garik Khachikyan 2013-10-15 12:35:07 UTC
curious if there is a possibility to reach to RHEL6.4 please (the version where i did experienced this). tyia.

Comment 4 Devan Goodwin 2013-10-15 19:12:37 UTC
I think the correct syntax is --activationkey=z004 --activationkey=rhel. Try this and see if it helps.

I learned today that candlepin's implementation of activation keys is entirely unused in Satellite/SAM, they use their own implementation, so if this is not a matter of command usage then it's more likely Satellite is not correctly supporting key1,key2 syntax. I am quite sure Candlepin does.

It's worth noting that thomasmckay is working on getting this switched to use Candlepin for the entitlement portion of activation keys, so this will possibly be remedied with this. In any case, I will re-align to Satellite 6.

No need for a fix to go to RHEL 6.4 as far as I can tell, the client is sending up the correct API call, this is likely a server side fix.

Comment 5 RHEL Program Management 2013-10-15 19:14:55 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 7 John Sefler 2013-10-15 20:45:58 UTC
Confirming that both of these activationkey syntaxes have been working from the subscription-manager command line for a long time (including subscription-manager-1.1 shipped on rhel64) against a standalone Candlepin.

subscription-manager register --org=org1 --activationkey=ak1 --activationkey=ak2
subscription-manager register --org=org1 --activationkey=ak1,ak2

Comment 12 Kedar Bidarkar 2014-05-12 14:09:08 UTC
sat6 release :- beta-snap4
subscription-manger :- subscription-manager-1.9.11-1
cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

also looks like the entitlement certs get pulled in at /etc/pki/entitlement for both the ak's, but redhat.repo does not get populated with the repo info from that of second ak.


[root@xxxx ~]# subscription-manager register --org="ACME_Corporation" --activationkey=rhel65_ak1 --activationkey=tools_ak2The system has been registered with ID: a0bec826-a919-4f31-bc50-ee7c64b82d8d 
[root@xxxx ~]# yum repolist
Loaded plugins: product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
rhel-6-server-rpms                                                                                    | 3.5 kB     00:00     
repo id                                         repo name                                                              status
rhel-6-server-rpms                              Red Hat Enterprise Linux 6 Server (RPMs)                               12,505
repolist: 12,505
[root@xxxx ~]# subscription-manager unregister
System has been unregistered.

[root@xxxx ~]# subscription-manager register --org="ACME_Corporation" --activationkey=tools_ak2 --activationkey=rhel65_ak1
The system has been registered with ID: 83b49d1d-23df-429c-84be-13348ee99e21 
[root@xxxx ~]# yum repolist
Loaded plugins: product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
ACME_Corporation_Sat6_Tools                                                                           | 3.3 kB     00:00     
ACME_Corporation_Sat6_Tools/primary_db                                                                |  21 kB     00:00     
repo id                                                               repo name                                        status
ACME_Corporation_Sat6_Tools                                           Tools                                            42
repolist: 42


the same happens even when trying with the below commands, i.e, only the repos from the first ak get's populated in the redhat.repo file.

a) subscription-manager register --org="ACME_Corporation" --activationkey=rhel65_ak1,tools_ak2
b) subscription-manager register --org="ACME_Corporation" --activationkey=tools_ak2,rhel65_ak1

Comment 13 Tom McKay 2014-05-15 13:45:03 UTC
Worked using latest master.

Made three activation keys:
A - Subscription to product A, no env or cv set
B - Subscription to product B, no env or cv set
L - No subscriptions, env Library and cv Default Organization View

% subscription-manager register --org megacorp --activationkey A,B,L
% subscription-manager register --org megacorp --activationkey L,A,B
% subscription-manager register --org megacorp --activationkey A --activationkey B --activationkey L
% subscription-manager register --org megacorp --activationkey L --activationkey A --activationkey B

All worked, yielding the same

% subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: A
Provides:          A
SKU:               1400159910746
Contract:          
Account:           
Serial:            981882317830493284
Pool ID:           8a8d01a245f5535d01460008c00d000c
Active:            True
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Subscription Type: Standard
Starts:            14/05/14
Ends:              06/05/44
System Type:       Physical

Subscription Name: B
Provides:          B
SKU:               1400159920013
Contract:          
Account:           
Serial:            8642440211163236455
Pool ID:           8a8d01a245f5535d01460008e14f0010
Active:            True
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Subscription Type: Standard
Starts:            14/05/14
Ends:              06/05/44
System Type:       Physical

Comment 15 Kedar Bidarkar 2014-05-29 07:32:46 UTC
Tested with sat6-beta-snap7

[root@netgear ~]# subscription-manager unregister
System has been unregistered.
[root@netgear ~]# yum clean all
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: 
Cleaning up Everything
[root@netgear ~]# subscription-manager register --org ACME_Corporation --activationkey rhel65_aks,rhcommon_aks
The system has been registered with ID: 295c0ca0-3425-46b8-9117-3cbf750390d2 
[root@netgear ~]# yum repolist
Loaded plugins: product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
ACME_Corporation_RHEL6_RHEL65_x86_64                                                                                                                                   | 2.9 kB     00:00     
ACME_Corporation_Sat6Tools_rhcommon                                                                                                                                    | 2.5 kB     00:00     
repo id                                                                                                repo name                                                                        status
ACME_Corporation_RHEL6_RHEL65_x86_64                                                                   RHEL65_x86_64                                                                    3,690
ACME_Corporation_Sat6Tools_rhcommon                                                                    rhcommon                                                                            45
repolist: 3,735
[root@netgear ~]# subscription-manager unregister
System has been unregistered.
[root@netgear ~]# subscription-manager register --org ACME_Corporation --activationkey rhel65_aks --activationkey rhcommon_aks
The system has been registered with ID: ecef2f62-3390-4d17-ba34-33c927f3c521 
[root@netgear ~]# yum repolist
Loaded plugins: product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
ACME_Corporation_RHEL6_RHEL65_x86_64                                                                                                                                   | 2.9 kB     00:00     
ACME_Corporation_Sat6Tools_rhcommon                                                                                                                                    | 2.5 kB     00:00     
repo id                                                                                                repo name                                                                        status
ACME_Corporation_RHEL6_RHEL65_x86_64                                                                   RHEL65_x86_64                                                                    3,690
ACME_Corporation_Sat6Tools_rhcommon                                                                    rhcommon                                                                            45
repolist: 3,735

Comment 16 Bryan Kearney 2014-07-02 14:06:11 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.


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