Bug 927875

Summary: When the system has a expired subscription,subscription-manager-gui fails to launch
Product: Red Hat Enterprise Linux 5 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED DUPLICATE QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.10CC: dgoodwin, fsharath, jgalipea, jmolet, jsefler, skallesh, spandey
Target Milestone: beta   
Target Release: 5.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-30 18:56:09 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: 840995, 920191    

Description Rehana 2013-03-26 12:28:17 UTC
Description of problem:
Have few installed products and subscriptionss to some of them.Now tried importing an expired cert; close the GUI; later i was unable to relauch the subscription manager GUI; was able to launch to GUI after removing the particular product cert from /etc/pki/product but the GUI was not listing the installed products

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.Register and subscribe for few products
2.import a "expired cert"
3.Close the GUI
4.launch the subscription-manager-gui
  
Actual results:
unable to launch the GUI also 

Expected results:
GUI should get launched

Additional info:

tail -f /var/log/rhsm/rhsm.log

2013-03-26 08:53:36,039 [WARNING]  @connection.py:438 - Clock skew detected, please check your system time
2013-03-26 08:53:36,043 [WARNING]  @cert_sorter.py:157 - Installed product 100000000000060 not present in response from server.
2013-03-26 08:53:36,044 [WARNING]  @cert_sorter.py:157 - Installed product 1000000000000023 not present in response from server.
2013-03-26 08:53:36,044 [WARNING]  @cert_sorter.py:157 - Installed product 1144 not present in response from server.
2013-03-26 08:53:36,044 [WARNING]  @cert_sorter.py:157 - Installed product 100000000000011 not present in response from server.
2013-03-26 08:53:36,044 [WARNING]  @cert_sorter.py:157 - Installed product 27060 not present in response from server.
2013-03-26 08:53:36,045 [WARNING]  @cert_sorter.py:157 - Installed product 1 not present in response from server.
2013-03-26 08:53:36,045 [WARNING]  @cert_sorter.py:157 - Installed product 37069 not present in response from server.
2013-03-26 08:53:36,046 [WARNING]  @cert_sorter.py:157 - Installed product 37068 not present in response from server.
2013-03-26 08:53:36,046 [WARNING]  @cert_sorter.py:157 - Installed product 37065 not present in response from server.
2013-03-26 08:53:36,046 [WARNING]  @cert_sorter.py:157 - Installed product 37067 not present in response from server.
2013-03-26 08:53:36,046 [WARNING]  @cert_sorter.py:157 - Installed product 37062 not present in response from server.
2013-03-26 08:53:36,047 [WARNING]  @cert_sorter.py:157 - Installed product 100000000000006 not present in response from server.
2013-03-26 08:53:36,047 [WARNING]  @cert_sorter.py:157 - Installed product 100000000000005 not present in response from server.
2013-03-26 08:53:36,047 [WARNING]  @cert_sorter.py:157 - Installed product 100000000000002 not present in response from server.
2013-03-26 08:53:36,047 [WARNING]  @cert_sorter.py:157 - Installed product 100000000000003 not present in response from server.
2013-03-26 08:53:36,047 [WARNING]  @cert_sorter.py:157 - Installed product 100000000000001 not present in response from server.
2013-03-26 08:53:36,049 [WARNING]  @cert_sorter.py:157 - Installed product 100000000000069 not present in response from server.
2013-03-26 08:53:36,049 [WARNING]  @cert_sorter.py:157 - Installed product 100000000000020 not present in response from server.
2013-03-26 08:53:36,049 [WARNING]  @cert_sorter.py:157 - Installed product 88888 not present in response from server.
2013-03-26 08:53:36,050 [WARNING]  @cert_sorter.py:157 - Installed product 917571 not present in response from server.
2013-03-26 08:53:36,050 [WARNING]  @cert_sorter.py:157 - Installed product 801 not present in response from server.
2013-03-26 08:53:36,050 [WARNING]  @cert_sorter.py:157 - Installed product 37070 not present in response from server.
2013-03-26 08:53:36,051 [DEBUG]  @cert_sorter.py:171 - valid entitled products: ['37060', '100000000000000', '37080']
2013-03-26 08:53:36,051 [DEBUG]  @cert_sorter.py:172 - expired entitled products: ['88888']
2013-03-26 08:53:36,051 [DEBUG]  @cert_sorter.py:173 - partially entitled products: []
2013-03-26 08:53:36,051 [DEBUG]  @cert_sorter.py:174 - unentitled products: ['100000000000006', '1000000000000023', '1144', '100000000000011', '27060', '1', '37069', '37068', '37065', '37067', '37062', '100000000000060', '100000000000005', '100000000000002', '100000000000003', '100000000000001', '100000000000069', '100000000000020', '88888', '917571', '801', '37070']
2013-03-26 08:53:36,052 [DEBUG]  @cert_sorter.py:175 - future products: []
2013-03-26 08:53:36,052 [DEBUG]  @cert_sorter.py:176 - partial stacks: []
2013-03-26 08:53:36,053 [DEBUG]  @cert_sorter.py:177 - entitlements valid until: 2014-03-18 00:00:01+00:00
2013-03-26 08:53:36,053 [DEBUG]  @injection.py:61 - Returning callable provider for feature PRODUCT_DATE_RANGE_CALCULATOR: <class 'subscription_manager.validity.ValidProductDateRangeCalculator'>
2013-03-26 08:53:36,053 [DEBUG]  @injection.py:64 - Returning instance for feature IDENTITY
2013-03-26 08:53:36,054 [DEBUG]  @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-03-26 08:53:36,054 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-ca.pem'
2013-03-26 08:53:36,055 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/10.pem'
2013-03-26 08:53:36,055 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-03-26 08:53:36,055 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-03-26 08:53:36,056 [DEBUG]  @connection.py:415 - Making request: GET /candlepin/consumers/c1f954d7-3841-4db6-a66c-e8d2ff3c06ca
2013-03-26 08:53:36,120 [DEBUG]  @connection.py:434 - Response status: 200
2013-03-26 08:53:36,121 [WARNING]  @connection.py:438 - Clock skew detected, please check your system time
2013-03-26 08:53:36,123 [ERROR]  @validity.py:77 - Requested status for installed product server does not know about: 88888
2013-03-26 08:53:36,124 [ERROR]  @subscription-manager-gui:148 - 'CertSorter' object has no attribute 'get_entitlements_for_product'
Traceback (most recent call last):
  File "/sbin/subscription-manager-gui", line 131, in <module>
    main = managergui.MainWindow(auto_launch_registration=options.register)
  File "/usr/share/rhsm/subscription_manager/gui/managergui.py", line 212, in __init__
    prod_dir=self.product_dir)
  File "/usr/share/rhsm/subscription_manager/gui/installedtab.py", line 108, in __init__
    self.update_products()
  File "/usr/share/rhsm/subscription_manager/gui/installedtab.py", line 199, in update_products
    for ent_cert in self.cs.get_entitlements_for_product(product_id):
AttributeError: 'CertSorter' object has no attribute 'get_entitlements_for_product'

Comment 1 Devan Goodwin 2013-03-28 19:20:17 UTC
Fixed in subscription-manager.git: b13e22b769aea1aba1d04dbcc9d4b3f5681f17d3

Will appear in subscription-manager 1.8.5.

Comment 2 RHEL Program Management 2013-04-16 21:08:20 UTC
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.

Comment 3 Sharath Dwaral 2013-04-30 18:56:09 UTC

*** This bug has been marked as a duplicate of bug 947485 ***