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 1249012

Summary: The 'Start-End Date' of expired subscription is not in red status when the subscription expired.
Product: Red Hat Enterprise Linux 7 Reporter: qianzhan
Component: subscription-managerAssignee: vritant <vrjain>
Status: CLOSED ERRATA QA Contact: Sean Toner <stoner>
Severity: medium Docs Contact:
Priority: high    
Version: 7.2CC: bkearney, crog, gxing, stoner, vrjain, wpoteat
Target Milestone: alpha   
Target Release: 7.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1337817 (view as bug list) Environment:
Last Closed: 2015-11-19 11:50:18 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: 1337817    
Attachments:
Description Flags
the_Start-End_Date_not_in_red_status_when_the_subscription_is_expired.png
none
Shows that if the date is past the end date, the Start End Date field in red none

Description qianzhan 2015-07-31 10:32:19 UTC
Description of problem:
The 'Start-End Date' of expired subscription is not in red status when the subscription expired.

Version-Release number of selected component (if applicable):
candlepin-scl-rhino-1.7R3-3.el7.noarch
candlepin-0.9.49.3-1.el7.noarch
candlepin-guice-3.0-2_redhat_1.el7.noarch
candlepin-common-1.0.22-1.el7.noarch
candlepin-scl-runtime-1-5.el7.noarch
candlepin-scl-1-5.el7.noarch
candlepin-selinux-0.9.49.3-1.el7.noarch
candlepin-scl-quartz-2.1.5-6.el7.noarch
candlepin-tomcat-0.9.49.3-1.el7.noarch
subscription-manager: 1.15.6-1.el7
python-rhsm: 1.15.3-1.el7


How reproducible:
always

Steps to Reproduce:
1. Register RHEL-7.2-20150720.0 to Satellite-6.1.0-RHEL-7-20150729.0, and auto-attach.
2. Record the valid date of consumed subscription, and make it expired by changing the client/server system time.

1)
[root@dhcp-128-17 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to
                     4 guests)
Provides:            Oracle Java (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Beta
SKU:                 RH0103708
Contract:            
Account:             
Serial:              3287992463091455910
Pool ID:             8a90c2024edd159b014edde1966b044b
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Premium
Service Type:        L1-L3
Status Details:      Guest has not been reported on any host and is using a
                     temporary unmapped guest subscription.
Subscription Type:   Standard (Temporary)
Starts:              05/05/2015
Ends:                08/01/2015
System Type:         Virtual

2) On the client:
[root@dhcp-128-17 ~]# date -s 20160901
Thu Sep  1 00:00:00 EDT 2016

3) On satellite:
[root@dhcp-128-17 ~]# date -s 20160901
Thu Sep  1 00:00:00 EDT 2016


3. Open subscription-manager-gui on client, and check the 'Start/End Date' in 'My Subscriptions' tab: The date field is not marked as red. See attachment 'the_Start-End_Date_not_in_red_status_when_the_subscription_is_expired.png'.

Actual results:
As step 3.

Expected results:
The Start/End Date should be in red status.

Additional info:

Comment 1 qianzhan 2015-07-31 10:32:43 UTC
Created attachment 1058016 [details]
the_Start-End_Date_not_in_red_status_when_the_subscription_is_expired.png

Comment 6 Chris "Ceiu" Rog 2015-09-28 14:48:37 UTC
commit 60cd683f8e46d14c9f817d341d203db250c13be2
Author: Vritant Jain <vrjain>
Date:   Fri Sep 1 00:06:19 2017 -0400

    1249012: Start-End Date of expired subscription is now in red status

commit 75c553dda431cb032f664dc0065abc1524374508
Author: Vritant Jain <vrjain>
Date:   Fri Sep 23 00:26:07 2016 -0400

    1249012: fix start-end date original color FIXME

Comment 8 Sean Toner 2015-09-29 18:40:21 UTC
I verified this slightly differently.  I used a development candlepin server and registered a client with that server.  I then changed the date on my dev candlepin server and on my client machine.  After restarting the subman-gui, the installed product now shows red.

[root@rh72-stoner-latest entitlement]# rpm -qa | grep subscription
subscription-manager-initial-setup-addon-1.15.9-12.el7.x86_64
subscription-manager-migration-data-2.0.24-1.el7.noarch
subscription-manager-gui-1.15.9-12.el7.x86_64
subscription-manager-1.15.9-12.el7.x86_64
subscription-manager-migration-1.15.9-12.el7.x86_64


Before changing time
====================


[root@rh72-stoner-latest entitlement]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Stackable with Awesome OS for x86_64
Provides:            Stackable with Awesome OS for x86_64 Bits
SKU:                 stackable-with-awesomeos-x86_64
Contract:            1
Account:             12331131231
Serial:              2506523345639402542
Pool ID:             8a8d01c94fff6064014fff62fee006f4
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription is current
Subscription Type:   
Starts:              09/23/2015
Ends:                09/22/2016
System Type:         Physical

Subscription Name:   Admin OS Instance Based one socket
Provides:            Admin OS Developer Bits
                     Admin OS Premium Architecture Bits
                     Awesome OS Instance Server Bits
SKU:                 adminos-onesocketib
Contract:            1
Account:             12331131231
Serial:              5518834617399955174
Pool ID:             8a8d01c94fff6064014fff62f1c204c3
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Standard
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   
Starts:              09/23/2015
Ends:                09/22/2016
System Type:         Physical

After Changing Time
===================

[root@rh72-stoner-latest entitlement]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Stackable with Awesome OS for x86_64
Provides:            Stackable with Awesome OS for x86_64 Bits
SKU:                 stackable-with-awesomeos-x86_64
Contract:            1
Account:             12331131231
Serial:              2506523345639402542
Pool ID:             8a8d01c94fff6064014fff62fee006f4
Provides Management: No
Active:              False
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription is expired
Subscription Type:   
Starts:              09/23/2015
Ends:                09/22/2016
System Type:         Physical

Subscription Name:   Admin OS Instance Based one socket
Provides:            Admin OS Developer Bits
                     Admin OS Premium Architecture Bits
                     Awesome OS Instance Server Bits
SKU:                 adminos-onesocketib
Contract:            1
Account:             12331131231
Serial:              5518834617399955174
Pool ID:             8a8d01c94fff6064014fff62f1c204c3
Provides Management: No
Active:              False
Quantity Used:       1
Service Level:       Standard
Service Type:        L1-L3
Status Details:      Subscription is expired
Subscription Type:   
Starts:              09/23/2015
Ends:                09/22/2016
System Type:         Physical

And after again changing time back to the correct date on both systems
(had to restart the GUI, as the icon color does not automatically update)
======================================================================

[root@rh72-stoner-latest entitlement]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Stackable with Awesome OS for x86_64
Provides:            Stackable with Awesome OS for x86_64 Bits
SKU:                 stackable-with-awesomeos-x86_64
Contract:            1
Account:             12331131231
Serial:              2506523345639402542
Pool ID:             8a8d01c94fff6064014fff62fee006f4
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription is current
Subscription Type:   
Starts:              09/23/2015
Ends:                09/22/2016
System Type:         Physical

Subscription Name:   Admin OS Instance Based one socket
Provides:            Admin OS Developer Bits
                     Admin OS Premium Architecture Bits
                     Awesome OS Instance Server Bits
SKU:                 adminos-onesocketib
Contract:            1
Account:             12331131231
Serial:              5518834617399955174
Pool ID:             8a8d01c94fff6064014fff62f1c204c3
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Standard
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   
Starts:              09/23/2015
Ends:                09/22/2016
System Type:         Physical

Comment 9 errata-xmlrpc 2015-11-19 11:50:18 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.

https://rhn.redhat.com/errata/RHBA-2015-2122.html

Comment 10 Sean Toner 2016-05-24 18:05:28 UTC
Created attachment 1161167 [details]
Shows that if the date is past the end date, the Start End Date field in red