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 1004893 - subscription-manager list --installed status is wrong following a newly installed product cert
Summary: subscription-manager list --installed status is wrong following a newly insta...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Carter Kozak
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel65
TreeView+ depends on / blocked
 
Reported: 2013-09-05 17:07 UTC by John Sefler
Modified: 2018-12-03 19:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Consequence: subscription-manager list --installed status is wrong following a newly installed product cert Fix: update products before showing compliance Result: Correct status is shown to the user.
Clone Of:
Environment:
Last Closed: 2013-11-21 21:28:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1659 0 normal SHIPPED_LIVE subscription-manager and python-rhsm bug fix and enhancement update 2013-11-20 21:53:10 UTC

Description John Sefler 2013-09-05 17:07:42 UTC
Description of problem:
As shown in the scenario below, after attaching a subscription that provides a new product and yum installing a package from the granted repo, a new product cert will be installed.  Then calling list --installed will show it, but the Status is wrong.  However a second call to list --installed will fix it.  See example below.


Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.9.5-1.el6
python-rhsm: 1.9.4-1.el6
I believe the candlepin version in stage is currently candlepin-0.8.25-1

How reproducible:


Steps to Reproduce:
[root@jsefler-6 ~]# subscription-manager register --username=stage_test_2 --serverurl=subscription.rhn.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: 0933f639-c0b5-4d20-92f1-aaeb71a390b0

[root@jsefler-6 ~]# subscription-manager list --avail | grep High-Availability -A9
Subscription Name: High-Availability (8 sockets)
SKU:               RH1149049
Pool ID:           8a99f9843c01ccba013c037a0fd40169
Available:         99
Service Level:     Layered
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              12/31/2013
System Type:       Virtual

[root@jsefler-6 ~]# subscription-manager attach --pool=8a99f9843c01ccba013c037a0fd40169
Successfully attached a subscription for: High-Availability (8 sockets)

[root@jsefler-6 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.3
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not covered by a valid subscription.
Starts:         
Ends:           

[root@jsefler-6 ~]# rpm -q ccs
package ccs is not installed
[root@jsefler-6 ~]# yum install -y -q ccs
This system is receiving updates from Red Hat Subscription Management.
This system is not registered with RHN Classic or RHN Satellite.
You can use rhn_register to register.
RHN Satellite or RHN Classic support will be disabled.
[root@jsefler-6 ~]# rpm -q ccs
ccs-0.16.2-63.el6.x86_64

[root@jsefler-6 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.3
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not covered by a valid subscription.
Starts:         
Ends:           

Product Name:   Red Hat Enterprise Linux High Availability (for RHEL Server)
Product ID:     83
Version:        6.4
Arch:           x86_64
Status:         Not Subscribed
Status Details: 
Starts:         12/31/2012
Ends:           12/31/2013

^^^^ BANG!
1. The newly installed product id 83 is correct
2. The start/end dates of the newly installed product id 83 is probably correct
3. The combination of Status: Not Subscribed with an Status Details: <empty> is wrong. This combination should never happen.

However if we run list installed again, the problem fixes itself; observe...

[root@jsefler-6 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.3
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not covered by a valid subscription.
Starts:         
Ends:           

Product Name:   Red Hat Enterprise Linux High Availability (for RHEL Server)
Product ID:     83
Version:        6.4
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         12/31/2012
Ends:           12/31/2013

Comment 2 Carter Kozak 2013-09-16 13:47:43 UTC
commit 001d371839b7325fed41ba5c0b4937393252982d
Author: ckozak <ckozak>
Date:   Thu Sep 5 13:09:03 2013 -0400

    1004893: update prods before compliance

Comment 4 John Sefler 2013-09-24 21:17:03 UTC
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.9.7-1.el6.x86_64

I believe the candlepin version in stage is currently candlepin-0.8.28-1

[root@jsefler-6 ~]# subscription-manager register --username=stage_test_2 --serverurl=subscription.rhn.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: e127e67d-a2e3-433b-a91f-e417dff46782 
[root@jsefler-6 ~]# subscription-manager list --avail | grep High-Availability -A9
Subscription Name: High-Availability (8 sockets)
SKU:               RH1149049
Pool ID:           8a99f9833c01cc09013c025321d00130
Available:         96
Suggested:         1
Service Level:     Layered
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              01/03/2014
System Type:       Physical
--
Subscription Name: High-Availability (8 sockets)
SKU:               RH1149049
Pool ID:           8a99f9833c01cc09013c025321df013f
Available:         Unlimited
Suggested:         1
Service Level:     Layered
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              01/03/2014
System Type:       Virtual
--
Subscription Name: High-Availability (8 sockets)
SKU:               RH1149049
Pool ID:           8a99f9843c01ccba013c037a0fa0015a
Available:         98
Suggested:         1
Service Level:     Layered
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              12/31/2013
System Type:       Physical
--
Subscription Name: High-Availability (8 sockets)
SKU:               RH1149049
Pool ID:           8a99f9843c01ccba013c037a0fd40169
Available:         98
Suggested:         1
Service Level:     Layered
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              12/31/2013
System Type:       Virtual
[root@jsefler-6 ~]# subscription-manager attach --pool 8a99f9833c01cc09013c025321d00130
Successfully attached a subscription for: High-Availability (8 sockets)
[root@jsefler-6 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.5 Beta
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not covered by a valid subscription.
Starts:         
Ends:           

[root@jsefler-6 ~]# rpm -q ccs
package ccs is not installed
[root@jsefler-6 ~]# yum install -y -q ccs
This system is receiving updates from Red Hat Subscription Management.
[root@jsefler-6 ~]# rpm -q ccs
ccs-0.16.2-63.el6.x86_64
[root@jsefler-6 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.5 Beta
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not covered by a valid subscription.
Starts:         
Ends:           

Product Name:   Red Hat Enterprise Linux High Availability (for RHEL Server)
Product ID:     83
Version:        6.4
Arch:           x86_64
Status:         Subscribed      <====== VERIFIED
Status Details: 
Starts:         01/03/2013
Ends:           01/03/2014

[root@jsefler-6 ~]# 

VERIFIED: Upon installing the first package from the new repo, it's corresponding product cert is installed and its status is correctly displayed as "Subscribed" upon the first call to list --installed.

Comment 5 errata-xmlrpc 2013-11-21 21:28:37 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-2013-1659.html


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