Bug 809611 - expired products in installed tabs hits undefined variable
expired products in installed tabs hits undefined variable
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Adrian Likins
Entitlement Bugs
:
Depends On:
Blocks: 738066
  Show dependency treegraph
 
Reported: 2012-04-03 15:32 EDT by Adrian Likins
Modified: 2012-06-20 09:08 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 09:08:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
"My Installed Software" covered by two subscriptions until 4/14/2013 (63.33 KB, image/png)
2012-04-16 12:20 EDT, John Sefler
no flags Details
"My Installed Software" with "Subscription is expired" (60.82 KB, image/png)
2012-04-16 12:21 EDT, John Sefler
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0804 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2012-06-19 15:51:31 EDT

  None (edit)
Description Adrian Likins 2012-04-03 15:32:04 EDT
A couple refactors crossed the streams and ended up with a undefined
reference to entitlement_certs in installedtab.py:InstalledProductsTab.update_products()

This will throw a traceback if expired products are installed
when the gui starts up.

Fix seems to be to get the order from the corresponding
entitlement certs, and join any subscription numbers
that it finds for the info blurb.

But, it raises the question, what is Order().getSubscription()
and what is it expected to show here. ent certs created with
standalone or stage don't populate this field. But that
could be an artifact of stage.

This changes what get's populated in the "Certificate Status"
field in the installed products detail pane.

The existing code is calling getSubscription() which is grabbing
the .4.4 oid. Why? I have no idea.

(maybe it's populated for real entitlements bought with a real
redhat.com account?)
Comment 2 Adrian Likins 2012-04-05 11:42:16 EDT
commit 74c9899b9c1e3e1b2c898fa5bb40e9752917a20c
Author: Adrian Likins <alikins@redhat.com>
Date:   Tue Apr 3 14:01:23 2012 -0400

    809611: Fix undefined variable in installedtab for expired
    
    entitlement_certificate got removed in a refactor, and
    was causing an undefined variable error in
    installedtab.py:InstalledProductsTab.update_products()
    for expired products.
    
    But, the previous code was also ignore cases where
    there could be multiple entitlements or orders, so
    fix that as well by join()'ing the subscription
    numbers together for the info string.
Comment 5 John Sefler 2012-04-16 12:19:57 EDT
Verifying version...
[root@jsefler-r63-server ~]# rpm -q subscription-manager-gnome
subscription-manager-gnome-0.99.14-1.el6.x86_64


[root@jsefler-r63-server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Awesome OS Server Bits   
Product ID:           	37060                    
Version:              	6.1                      
Arch:                 	ALL                      
Status:               	Not Subscribed           
Starts:               	                         
Expires:  

[root@jsefler-r63-server ~]# subscription-manager register --username testuser1 --password password --org admin
The system has been registered with id: f2f9eabf-82af-456c-bf2a-029eab1c9931 
[root@jsefler-r63-server ~]# subscription-manager list --avail | egrep "(awesomeos-server-basic-me|awesomeos-server-2-socket-std)" -A1
Product Id:           	awesomeos-server-basic-me
Pool Id:              	8a90f81436b879570136b87a5cdb029e
--
Product Id:           	awesomeos-server-basic-me
Pool Id:              	8a90f81436b879570136b87a5ca90291
--
Product Id:           	awesomeos-server-2-socket-std
Pool Id:              	8a90f81436b879570136b87a5e9f030c
--
Product Id:           	awesomeos-server-2-socket-std
Pool Id:              	8a90f81436b879570136b87a5e6302fa
[root@jsefler-r63-server ~]# subscription-manager subscribe --pool 8a90f81436b879570136b87a5cdb029e --pool 8a90f81436b879570136b87a5e9f030c
Successfully consumed a subscription from the pool with id 8a90f81436b879570136b87a5cdb029e.
Successfully consumed a subscription from the pool with id 8a90f81436b879570136b87a5e9f030c.
[root@jsefler-r63-server ~]# 

[root@jsefler-r63-server ~]# subscription-manager-gui &
[1] 17485

See attached screenshot showing "My Installed Software" covered by two subscriptions until 4/14/2013

kill subscription-manager-gui and advance date beyond 4/14/2013

[root@jsefler-r63-server ~]# date 
Mon Apr 16 11:51:32 EDT 2012
[root@jsefler-r63-server ~]# date -s "Apr 1 12:00:00 EDT 2015"
Wed Apr  1 12:00:00 EDT 2015


[root@jsefler-r63-server ~]# subscription-manager-gui&
[2] 17609

See attached screenshot showing "My Installed Software" with "Subscription  is expired"


moving to VERIFIED
Comment 6 John Sefler 2012-04-16 12:20:28 EDT
Created attachment 577762 [details]
"My Installed Software" covered by two subscriptions until 4/14/2013
Comment 7 John Sefler 2012-04-16 12:21:32 EDT
Created attachment 577763 [details]
"My Installed Software" with "Subscription  is expired"
Comment 9 errata-xmlrpc 2012-06-20 09:08:46 EDT
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-2012-0804.html

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