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 1135621

Summary: subscription-manager-gui should not display a /etc/pki/product-"default" installed product cert when the same id is already in /etc/pki/product
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.6CC: bkearney, jesusr
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: subscription-manager GUI was showing both the default product certs and the installed product certs. Consequence: Duplicate certs were displayed. Fix: Prefer the installed one over the default product certs. Result: Only one cert is displayed in the GUI.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 07:48:35 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: 1014343    
Attachments:
Description Flags
subscription-manager-gui should not render an /etc/pki/product-default cert that is overridden
none
Only one product 69 is renderred in the GUI's list of installed products
none
GUI's list of installed products renders the /etc/pki/product-default when the same id is not installed in /etc/pki/product none

Description John Sefler 2014-08-29 19:45:03 UTC
Description of problem:
As demonstrated in new RFE bug 1123029, it will now be the norm to have a RHEL product cert installed in /etc/pki/product-default.  It should only visible to the user via the CLI tool and GUI tool when there is not already a product cert with the same product id installed in /etc/pki/product.  The CLI tool behaves as expected, but the GUI tool fails to mask the /etc/pki/product-default/<PRODUCTID>.pem cert when /etc/pki/product/<PRODUCTID>.pem is installed.


Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# rpm -q subscription-manager-gui
subscription-manager-gui-1.12.14-2.el6.x86_64


How reproducible:


Steps to Reproduce:
With a system setup as follows...
[root@jsefler-6 ~]# ls /etc/pki/product-default/
69.pem  70.pem
[root@jsefler-6 ~]# ls /etc/pki/product
69.pem
[root@jsefler-6 ~]# rct cat-cert /etc/pki/product-default/69.pem | grep Product: -A3
Product:
	ID: 69
	Name: Red Hat Enterprise Linux Server
	Version: 6.5
[root@jsefler-6 ~]# rct cat-cert /etc/pki/product/69.pem | grep Product: -A3
Product:
	ID: 69
	Name: Red Hat Enterprise Linux Server
	Version: 6.6 Beta
[root@jsefler-6 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.6 Beta
Arch:           x86_64
Status:         Unknown
Status Details: 
Starts:         
Ends:           

Product Name:   Red Hat Enterprise Linux Server - Extended Update Support
Product ID:     70
Version:        6.6
Arch:           x86_64
Status:         Unknown
Status Details: 
Starts:         
Ends:           




Actual results:
Notice that the CLI tool displays only one 69 product cert (from /etc/pki/product).  This is correct!

Now see the attached screenshot. 

Expected results:
Installed product certs with the same product id from /etc/pki/product should mask the product cert from /etc/pki/product-default.


Additional info:

Comment 1 John Sefler 2014-08-29 19:45:40 UTC
Created attachment 932801 [details]
subscription-manager-gui should not render an /etc/pki/product-default cert that is overridden

Comment 2 John Sefler 2014-09-12 13:59:07 UTC
Note that the severity of this bug will not be noticed by a customer until Release Engineering delivers RFE bug 1080007 or RFE bug 1080012

Comment 3 Carter Kozak 2014-09-12 15:23:00 UTC
commit 88deef9cd3fb69b986f8fa3a3c9d3210ac9e0465
Author: ckozak <ckozak>
Date:   Fri Sep 12 10:20:48 2014 -0400

    1135621: fix duplicate product ids from default dir

Comment 6 John Sefler 2014-09-15 19:05:04 UTC
Created attachment 937703 [details]
Only one product 69 is renderred in the GUI's list of installed products

Testing Version...
[root@jsefler-6 ~]# rpm -q subscription-manager-gui 
subscription-manager-gui-1.12.14-6.el6.x86_64


[root@jsefler-6 ~]# rct cat-cert /etc/pki/product-default/69.pem | grep Version: | tail -1
	Version: 6.6
[root@jsefler-6 ~]# rct cat-cert /etc/pki/product/69.pem | grep Version: | tail -1
	Version: 6.6 Beta
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.6 Beta
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         12/31/2013
Ends:           12/30/2014

[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager-gui 

VERIFIED: Notice in the attached screenshot that only the "6.6 Beta" product cert from /etc/pki/product/69.pem is rendered as well as listed in the CLI subscription-manager list --installed.  This is the expected behavior.  The product cert located in /etc/pki/product will mask a product cert with the same id installed in /etc/pki/product-default.

Comment 7 John Sefler 2014-09-15 19:15:07 UTC
Created attachment 937706 [details]
GUI's list of installed products renders the /etc/pki/product-default when the same id is not installed in /etc/pki/product

And.... after deleting /etc/pki/product/69.pem, the one in the product-default directory is now listed in both the CLI and GUI as the sole installed product 69...


[root@jsefler-6 ~]# rm /etc/pki/product/69.pem 
rm: remove regular file `/etc/pki/product/69.pem'? y
[root@jsefler-6 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.6
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         12/31/2013
Ends:           12/30/2014

[root@jsefler-6 ~]# rct cat-cert /etc/pki/product-default/69.pem | grep Version | tail -1
	Version: 6.6
[root@jsefler-6 ~]#

Comment 8 errata-xmlrpc 2014-10-14 07:48:35 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-2014-1384.html