Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 643432

Summary: Inconsistent behavior when importing a cert and then registering
Product: Red Hat Enterprise Linux 6 Reporter: Jeff Weiss <jweiss>
Component: subscription-managerAssignee: Shwetha Kallesh <skallesh>
Status: CLOSED ERRATA QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: bkearney, cduryee, dajohnso, ddumas, jmolet, skallesh, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No Documentation Required
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 12:56:00 UTC Type: ---
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: 738066, 756082    
Attachments:
Description Flags
Quantity of available subscriptions after importing the cert
none
Quantity of available subscriptions before importing the cert
none
the product doesnot show up in all available tab none

Description Jeff Weiss 2010-10-15 15:17:08 UTC
Description of problem:
(in the gui) If you import a cert (taken from a cp server) and then register to that cp server, and try to subscribe to that pool, nothing happens.  It still shows up in the available list.  It should not show as available but not let you subscribe to it.

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

How reproducible:
always

Steps to Reproduce:
1. Register to cp on-prem server.  Subscribe to RHEL Workstation.
2. Copy the cert from /etc/pki/entitlements/product to /tmp
3. Unregister.
4. Import the cert from /tmp
5. Register
6. Click Add.  Select RHEL Workstation
  
Actual results:
Nothing happens, you can keep going back to "Add" and selecting RHEL Workstation and subscribing to it, but it will keep showing that you're subscribed on that main panel, but still available on the Add panel.

Expected results:
This pool should not be considered available.  Or if it is, subscribing to it should remove it from the available list.

Additional info:

Comment 1 Jeff Weiss 2010-10-15 15:22:24 UTC
You can unsubscribe from RHEL Workstation, and subscribe to it.  It *STILL* shows up on the available list after that, but sm-gui throws an appropriate error if you try to subscribe a 2nd time.  It shouldn't be on the available list though.

Comment 7 Chris Duryee 2012-01-30 16:39:48 UTC
I tested this against a 6.2 install (sub-mgr 0.96.17) and it appears to work. I'm not able to subscribe to products that I'm already subscribed to, I would assume this is a filtering bug that has been fixed already in a previous commit.

Marking as MODIFIED for QE to verify. Note that I had to concatenate the copied pem and the -key file together in order for the import to succeed, but the steps other than that were the same as indicated in comment #1.

Comment 11 Shwetha Kallesh 2012-03-22 11:02:47 UTC
Created attachment 571962 [details]
Quantity of available subscriptions after importing the cert

Comment 12 Shwetha Kallesh 2012-03-22 11:09:41 UTC
Created attachment 571963 [details]
Quantity of available subscriptions before importing the cert

Comment 13 Shwetha Kallesh 2012-03-22 11:12:53 UTC
Moving back to new as the product still shows up in the available list even after importing.

RPM used:

[root@skallesh entitlement]# rpm -qa | grep subscription-manager
subscription-manager-gnome-0.99.10-1.git.85.057ca98.el6.x86_64
subscription-manager-migration-0.99.10-1.git.85.057ca98.el6.x86_64
subscription-manager-firstboot-0.99.10-1.git.85.057ca98.el6.x86_64
subscription-manager-0.99.10-1.git.85.057ca98.el6.x86_64

Comment 14 Chris Duryee 2012-03-23 18:06:07 UTC
Shwetha,

In the screenshot, the "have no overlap with existing subscriptions" checkbox is unchecked, which would make the extra subscription show up.

Here are the steps I used to attempt to repro the bug:

* subscribe to something
* copy the entitlement cert to /tmp (cert + key concatenated)
* unsubscribe
* import the copied cert, which automatically applies it to my system
* look at the all available subscriptions tab, the subscription for the product that was imported should not show up since it was already covered by the import in the previous step.

Moving back to MODIFIED, let me know if the steps above don't work, or if I'm not reproducing the bug correctly.

Comment 16 Shwetha Kallesh 2012-03-29 08:16:16 UTC
Created attachment 573567 [details]
the product doesnot show up in all available tab

Verified...

RPM used:

[root@skallesh entitlement]# rpm -qa | grep subscription-manager
subscription-manager-debuginfo-0.99.12-1.el6.x86_64
subscription-manager-firstboot-0.99.12-1.git.5.5f0e228.el6.x86_64
subscription-manager-migration-data-1.12.1.2-1.git.0.9e244c8.el6.noarch
subscription-manager-gnome-0.99.12-1.git.5.5f0e228.el6.x86_64
subscription-manager-migration-0.99.12-1.git.5.5f0e228.el6.x86_64
subscription-manager-0.99.12-1.git.5.5f0e228.el6.x86_64

     
[root@skallesh entitlement]# ll
total 8
-rw-------. 1 root root 1675 Mar 29 13:30 538756090038514596-key.pem
-rw-r--r--. 1 root root 3244 Mar 29 13:30 538756090038514596.pem
[root@skallesh entitlement]# cat 538756090038514596.pem >> new.pem
[root@skallesh entitlement]# cat 538756090038514596-key.pem >> new.pem 

[root@skallesh entitlement]# mv new.pem /etc/pki/tmp/

[root@skallesh entitlement]# subscription-manager unsubscribe --all
[root@skallesh entitlement]# subscription-manager import --certificate=/etc/pki/tmp/new.pem
Successfully imported certificate new.pem

Comment 17 James Laska 2012-05-22 19:58:12 UTC
HASH(0x1cc8e0d0)

Comment 19 Bryan Kearney 2012-05-22 20:09:31 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
s

Comment 20 Bryan Kearney 2012-05-23 17:18:10 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-s+No Documentation Required

Comment 22 errata-xmlrpc 2012-06-20 12:56:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0804.html