Bug 1135621 - subscription-manager-gui should not display a /etc/pki/product-"default" installed product cert when the same id is already in /etc/pki/product
Summary: subscription-manager-gui should not display a /etc/pki/product-"default" inst...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Bryan Kearney
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel66
TreeView+ depends on / blocked
 
Reported: 2014-08-29 19:45 UTC by John Sefler
Modified: 2014-10-14 07:48 UTC (History)
2 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-10-14 07:48:35 UTC
Target Upstream Version:


Attachments (Terms of Use)
subscription-manager-gui should not render an /etc/pki/product-default cert that is overridden (114.71 KB, application/octet-stream)
2014-08-29 19:45 UTC, John Sefler
no flags Details
Only one product 69 is renderred in the GUI's list of installed products (227.47 KB, application/octet-stream)
2014-09-15 19:05 UTC, John Sefler
no flags Details
GUI's list of installed products renders the /etc/pki/product-default when the same id is not installed in /etc/pki/product (220.80 KB, application/octet-stream)
2014-09-15 19:15 UTC, John Sefler
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1384 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2014-10-14 01:27:50 UTC

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@redhat.com>
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


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