Description of problem: One of the attributes of a subscription product is warning_period. The intent of this attribute is to warn the consumer that the entitlement is about to expire within this number of days before the end date. Within the subscription-manager-gui, the subscription about to expire will turn yellow on the "My Subscriptions" tab. Unfortunately the subscription-manager-gui appears to be using a hard-coded warning period of 42 days instaed of using the value from the entitlement. The hard-coded values are found here... [root@jsefler-5 ~]# grep WARNING_DAYS /usr/share/rhsm/subscription_manager/gui/*.py /usr/share/rhsm/subscription_manager/gui/mysubstab.py:WARNING_DAYS = 6 * 7 # 6 weeks * 7 days / week /usr/share/rhsm/subscription_manager/gui/mysubstab.py: if date_range.end() - timedelta(days=WARNING_DAYS) < now: /usr/share/rhsm/subscription_manager/gui/widgets.py:WARNING_DAYS = 6 * 7 # 6 weeks * 7 days / week /usr/share/rhsm/subscription_manager/gui/widgets.py: if end - datetime.timedelta(days=WARNING_DAYS) < now: To see what the warning period should be for each consumed subscription, use the rct cat-cert tool like this... [root@jsefler-5 ~]# for f in `ls /etc/pki/entitlement/*.pem | grep -v key`; do rct cat-cert --no-content $f | egrep "Name|Warning Period"; done; Name: Awesome OS Server Basic (data center) Warning Period: 30 Name: Awesome OS Server Bits Name: Awesome OS Server Basic (dc-virt) Warning Period: 0 Version-Release number of selected component (if applicable): [root@jsefler-5 ~]# rpm -q subscription-manager-gui subscription-manager-gui-1.8.11-1.el5 Additional info:
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
commit eacaa452361e1f716390ad3fd90cf65e9c3f3c76 Author: ckozak <ckozak> Date: Wed Jul 10 11:24:26 2013 -0400 983250: 983281: certs check warning period
Created attachment 783957 [details] warning icon Version: # rpm -qa | egrep "subscription-manager|python-rhsm" subscription-manager-gui-1.8.18-1.el5 subscription-manager-migration-data-1.11.3.2-1.git.0.14f9d59.el5 python-rhsm-1.8.16-1.el5 subscription-manager-migration-1.8.18-1.el5 subscription-manager-1.8.18-1.el5 subscription-manager-firstboot-1.8.18-1.el5 python-rhsm-debuginfo-1.8.16-1.el5 subscription-manager-debuginfo-1.8.18-1.el5 Verification: # grep WARNING_DAYS /usr/share/rhsm/subscription_manager/gui/*.py /usr/share/rhsm/subscription_manager/gui/widgets.py:WARNING_DAYS = 6 * 7 # 6 weeks * 7 days / week There is still a hard coded value for WARNING_DAYS but it is not referenced anywhere. # for f in `ls /etc/pki/entitlement/*.pem | grep -v key`; do rct cat-cert --no-content $f | egrep "Name|Warning Period"; done; Name: Awesome OS Server Bits Name: Awesome OS Server Basic (multi-entitlement) Warning Period: 30 # rct cat-cert /etc/pki/entitlement/8294565152797454133.pem | grep -i "certificate:" -A7 Certificate: Path: /etc/pki/entitlement/8294565152797454133.pem Version: 3.2 Serial: 8294565152797454133 Start Date: 2013-07-30 00:00:00+00:00 End Date: 2014-07-30 00:00:00+00:00 Pool ID: 8a8d01e0402f9e3b01402f9f6040049a Advancing date to within warning period # date -s "30 JUN 2014 18:00:00" Warning icon is displayed in "My Subscription" tab (See attachment)
Moving to VERIFIED
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-1332.html