Bug 733658 - Unsubscribe is broken in Subscription Manager
Unsubscribe is broken in Subscription Manager
Status: CLOSED DUPLICATE of bug 733525
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Michael Stead
John Sefler
:
Depends On:
Blocks: rhsm-rhel62
  Show dependency treegraph
 
Reported: 2011-08-26 07:52 EDT by Michael Stead
Modified: 2011-08-29 09:21 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Michael Stead 2011-08-26 07:52:53 EDT
Description of problem:
Unsubscribe broken in Subscription manager.

Version-Release number of selected component (if applicable):
subscription-manager-0.96.7-1

How reproducible:
always

Steps to Reproduce:
1.Register as any user in GUI
2.Unregister that user.

  
Actual results:
Unsubscribe button remains visible, however subscriptions are removed.

An exception is thrown, due to the entitlements directory not being found:

Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/gui/managergui.py", line 247, in on_identity_change
    self.refresh()
  File "/usr/share/rhsm/subscription_manager/gui/managergui.py", line 270, in refresh
    self._set_validity_status()
  File "/usr/share/rhsm/subscription_manager/gui/managergui.py", line 384, in _set_validity_status
    sorter = CertSorter(self.product_dir, self.entitlement_dir, facts_dict=self.facts.get_facts())
  File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 77, in __init__
    self._scan_entitlement_certs()
  File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 100, in _scan_entitlement_certs
    ent_certs = self.entitlement_dir.list()
  File "/usr/share/rhsm/subscription_manager/certdirectory.py", line 105, in list
    for p, fn in Directory.list(self):
  File "/usr/share/rhsm/subscription_manager/certdirectory.py", line 49, in list
    for p, fn in self.listAll():
  File "/usr/share/rhsm/subscription_manager/certdirectory.py", line 42, in listAll
    for fn in os.listdir(self.path):
OSError: [Errno 2] No such file or directory: '/etc/pki/entitlement'

Expected results:
Unregister should succeed without issue.

Additional info:
Comment 1 Michael Stead 2011-08-26 08:02:01 EDT
Fixed in master branch: ce5c072361a558f9706742de4a91f282ba3c0e34

Added checks to make sure that the directory exists before listing files.
Comment 4 John Sefler 2011-08-26 08:17:16 EDT
This looks like a dup of bug 733525
Comment 5 Michael Stead 2011-08-29 09:21:06 EDT

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

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