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.

Bug 2082448

Summary: hammer does not show the how many times the activation key still can be used, also does not show the content host associated with the key
Product: Red Hat Satellite Reporter: qianzhan
Component: Activation KeysAssignee: Chris Roberts <chrobert>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: apatel, chrobert, iballou, kgaikwad, ofedoren, rabajaj
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: https://projects.theforeman.org/issues/36237
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-17 15:21:07 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:

Description qianzhan 2022-05-06 07:46:38 UTC
Description of problem:
hammer does not show the how many times the activation key still can be used, also does not show the content host associated with the key

Version-Release number of selected component (if applicable):
tfm-rubygem-hammer_cli_katello-1.3.1.2-1.el7sat.noarch
tfm-rubygem-hammer_cli-3.1.0.1-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_azure_rm-0.2.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-3.1.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_templates-0.2.0-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_ansible-0.3.4-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.3.0-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.17-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_virt_who_configure-0.0.9-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_webhooks-0.0.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_admin-1.1.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_discovery-1.1.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_openscap-0.1.13-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. Create an activation key(host limit is 3) in sca org on Satellite6.11.

2. Register RHEL-8.6.0-20220420.3 against Satellite6.11 by this key:

[root@hpe-dl380pgen8-02-vm-7 ~]# subscription-manager register --org="sca_org" --activationkey="hostlimit"
The system has been registered with ID: beec3692-1b7a-465e-8e1f-cce3514e987c
The registered system name is: hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com

3. Check the satellite UI:
1) Host limit shows '1 out of 3'. Please check attachment 'hostlimit_shows_correctly_on_satellite_UI.png'
2) The registered rhel shows in the associations on this activation key. Please check attachment 'associations_shows_correctly_on_satellite_UI.png'

4. Check the activaiton key info by hammer:

[root@ent-01-vm-02 ~]# hammer activation-key info --name=hostlimit --organization-label=sca_org
Name:                  hostlimit
Id:                    2
Description:           
Host Limit:            3
Auto Attach:           true
Release Version:       
Lifecycle Environment: Library
Content View:          Default Organization View
Host Collections:      

System Purpose:        
    Service Level:  
    Purpose Usage:  
    Purpose Role:   
    Purpose Addons:

[root@ent-01-vm-02 ~]# 

Actual results:
As step 4, hammer does not show the how many times the activation key still can be used, also does not show the content host associated with the key.

Expected results:
hammer should notice the customer how many times this key can be used, and which hosts are associated with the key.

Additional info:

Comment 3 Brad Buckingham 2022-05-09 13:09:51 UTC
Is this a regression from Satellite 6.10?

Comment 4 qianzhan 2022-05-10 00:20:23 UTC
Hi Brad,

I just checked on Satellite6.10, and this issue also exists:

[root@dell-per740-68-vm-09 ~]# hammer activation-key info --name=hostlimit --organization-label=sca_org
Name:                  hostlimit
Id:                    2
Description:           
Host Limit:            3
Auto Attach:           true
Release Version:       
Lifecycle Environment: Library
Content View:          Default Organization View
Host Collections:      

System Purpose:        
    Service Level:  
    Purpose Usage:  
    Purpose Role:   
    Purpose Addons:

Comment 5 qianzhan 2022-07-27 04:19:03 UTC
This bug also exist on Sat612:
[root@dell-per740-68-vm-08 ~]# hammer activation-key info --name=hostlimit --organization-label=sca_org
Name:                  hostlimit
Id:                    2
Host Limit:            3
Auto Attach:           true
Lifecycle Environment: Library
Content View:          Default Organization View
Host Collections:      

Content Overrides:     

System Purpose:        
    Service Level:  
    Purpose Usage:  
    Purpose Role:   
    Purpose Addons:

Comment 6 Ian Ballou 2024-01-17 15:21:07 UTC
Closing current release since it's fixed as of Satellite 6.14.0 and is not severe.

Comment 7 qianzhan 2024-01-18 06:10:06 UTC
Verification on Satellite6.14.1:

[root@dell-per740-68-vm-08 ~]# hammer activation-key info --name=hostlimit --organization-label=sca_org
Name:                  hostlimit
Id:                    8
Host Limit:            1 of 3
Auto Attach:           true
Lifecycle Environment: Library
Content View:          Default Organization View
Host Collections:      

Content Overrides:     

System Purpose:        
    Service Level:  
    Purpose Usage:  
    Purpose Role:   
    Purpose Addons:

[root@dell-per740-68-vm-08 ~]#