Bug 994266

Summary: expired entitlement shows in GUI but not in CLI
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Carter Kozak <ckozak>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5CC: bkearney, fsharath, jesusr
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No description necessary.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 21:27:14 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: 862910    
Attachments:
Description Flags
an expired entitlement shows in GUI, but not in CLI list --consumed
none
expired cert displayed in GUI none

Description John Sefler 2013-08-06 22:46:53 UTC
Created attachment 783546 [details]
an expired entitlement shows in GUI, but not in CLI list --consumed

Description of problem:

For a small period of time (up to the 4 hour default rhsm.certCheckInterval) after a subscription entitlement expires, the subscriptiion-manager GUI will show the expired subscription on the "My Subscriptions" tab.  However, the subscriptiion-manager list --consumed CLI will NOT show the expired subscription despite the fact that it is in the /etc/pki/entitlement directory.

See the attached screen shot.

Version-Release number of selected component (if applicable):
[root@jsefler-5 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.18-1
subscription-manager: 1.8.16-1.el5
python-rhsm: 1.8.16-1.el5


How reproducible:


Expected results:
For the sake of parity, if the expired subscription is viewable in the GUI, it should also be viewable in the CLI.

I would have expected the following list --consumed with Active: False
[root@jsefler-5 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS with up to 4 virtual guests
Provides:          
SKU:               awesomeos-virt-4
Contract:          1801168997
Account:           728435001
Serial:            4546885523598042761
Pool ID:           8a90f84a4035a6cb014055b9d3303df3
Active:            False
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Starts:            08/05/2013
Ends:              08/06/2013

Comment 1 John Sefler 2013-08-07 14:39:02 UTC
Deferring to RHEL65

Comment 4 Sharath Dwaral 2013-08-27 16:05:52 UTC
Created attachment 791099 [details]
expired cert displayed in GUI

Version

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-firstboot-1.9.5-1.el6.x86_64
subscription-manager-migration-data-1.12.3.2-1.el6.noarch
python-rhsm-1.9.4-1.el6.x86_64
subscription-manager-debuginfo-1.9.5-1.el6.x86_64
subscription-manager-gui-1.9.5-1.el6.x86_64
subscription-manager-1.9.5-1.el6.x86_64
subscription-manager-migration-1.9.5-1.el6.x86_64
python-rhsm-debuginfo-1.9.4-1.el6.x86_64

Verification:

Cert expired deliberately (See attachment)

# date
Wed Aug 27 00:00:10 EDT 2014

# ls /etc/pki/entitlement/
5211292157950449776-key.pem  5211292157950449776.pem

# rct cat-cert /etc/pki/entitlement/5211292157950449776.pem | grep Date
	Start Date: 2013-08-27 00:00:00+00:00
	End Date: 2014-08-27 00:00:00+00:00

# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS with up to 4 virtual guests
Provides:          Awesome OS Server Bits
SKU:               awesomeos-virt-4
Contract:          139
Account:           12331131231
Serial:            5211292157950449776
Pool ID:           8a90f83340bfe64f0140bfe7d1510616
Active:            False                                 <<<<<<<<<<< Set to False
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Starts:            08/26/2013
Ends:              08/26/2014


VERIFIED

Comment 5 errata-xmlrpc 2013-11-21 21:27:14 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