Bug 975726

Summary: The status of command 'list --installed' shows 'Subscribed' when the subscriptions are expired
Product: [Retired] Subscription Asset Manager Reporter: qianzhan
Component: candlepinAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED NOTABUG QA Contact: SAM QE List <sam-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.3CC: bkearney, ckozak, gxing, liliu, qianzhan, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-16 15:00:22 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: 833466    
Attachments:
Description Flags
'status in GUI'
none
'rhsm.log' none

Description qianzhan 2013-06-19 08:34:24 UTC
Description of problem:
The status of command 'list --installed' shows 'Subscribed' when the subscriptions are expired

Version-Release number of selected component (if applicable):
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-1.4.2-7.el6sat.noarch
katello-cli-common-1.4.2-7.el6sat.noarch
katello-common-1.4.2-13.el6sam_splice_2.noarch
katello-configure-1.4.3-16.el6sat.noarch
katello-glue-candlepin-1.4.2-13.el6sam_splice_2.noarch
katello-glue-elasticsearch-1.4.2-13.el6sam_splice_2.noarch
katello-headpin-1.4.2-13.el6sam_splice_2.noarch
katello-headpin-all-1.4.2-13.el6sam_splice_2.noarch
katello-selinux-1.4.3-3.el6sat.noarch
signo-katello-0.0.18-1.el6sat.noarch
candlepin-0.8.9-1.el6_4.noarch
candlepin-scl-1-5.el6_4.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-tomcat6-0.8.9-1.el6_4.noarch
thumbslug-0.0.32-1.el6sam.noarch
thumbslug-selinux-0.0.32-1.el6sam.noarch
subscription-manager-1.8.10-1.el5

How reproducible:
always

Steps to Reproduce:
1. Register to SAM and autosubscribe
[root@dhcp-65-87 product]# subscription-manager register
Username: admin
Password: 
The system has been registered with ID: ce9f459f-3234-4950-bf2a-c94e8c7a51eb 
[root@dhcp-65-87 product]# subscription-manager subscribe --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

2. Modify the system time to make all the subscriptions expired.
[root@dhcp-65-87 product]# date -s 20250619
Thu Jun 19 00:00:00 EDT 2025

3. Check the status of installed product
[root@dhcp-65-87 product]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        5.10 Beta
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         09/27/2012
Ends:           09/26/2013

4. Restart the rhsmcertd service
[root@dhcp-65-87 product]# service rhsmcertd restart
Stopping rhsmcertd...                                      [  OK  ]
Starting rhsmcertd...                                      [  OK  ]

5. Check the entitlement cert
[root@dhcp-65-87 product]# ls /etc/pki/entitlement/
5379366305375875722-key.pem  5379366305375875722.pem

6. Check the consumed subscription
[root@dhcp-65-87 product]# subscription-manager list --consumed
No consumed subscription pools to list

7. Check the status of installed product
[root@dhcp-65-87 product]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        5.10 Beta
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         09/27/2012
Ends:           09/26/2013

8. Open subscription-manager-gui check the status of installed product, and the status is "Subscribed"


Actual results:
When the subscriptions are expired, the status of installed product shows "Subscribed"

Expected results:
When the subscriptions are expired, the status of installed product should be 'Expired'

Additional info:
We have tested and make sure that the problem does not exist on stage candlepin.
The rhsm.log has been attached in 'rhsm.log'.
The status of installed product has been attached in 'status in GUI'.

Comment 1 qianzhan 2013-06-19 08:38:57 UTC
Created attachment 762787 [details]
'status in GUI'

Comment 2 qianzhan 2013-06-19 08:39:47 UTC
Created attachment 762789 [details]
'rhsm.log'

Comment 3 Carter Kozak 2013-07-16 15:00:22 UTC
You must modify both the system time and the server time.  We calculate compliance on the server, and the server is telling the client that it is still compliant.  If the client and server are out of sync, the setup is invalid.