Bug 1037712 - Unregistering Subscription Manager is throwing traceback
Summary: Unregistering Subscription Manager is throwing traceback
Keywords:
Status: CLOSED DUPLICATE of bug 1034429
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-12-03 16:11 UTC by Sharath Dwaral
Modified: 2015-03-23 01:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-03 16:28:21 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Sharath Dwaral 2013-12-03 16:11:24 UTC
Description of problem:
Unregistering Subscription Manager is throwing traceback

Version-Release number of selected component (if applicable):
# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.8.33-1
subscription-manager: 1.10.7-1.git.22.758b31a.el7
python-rhsm: 1.10.8-1.git.0.69bd6af.el7

How reproducible:
Always

Steps to Reproduce:
1. Register subscription manager to candlepin
2. Unregister subscription from candlepin
3. Check /var/log/rhsm/rhsm.log

Actual results:

2013-12-03 11:05:58,144 [DEBUG] subscription-manager @plugins.py:519 - loaded plugin modules: []
2013-12-03 11:05:58,144 [DEBUG] subscription-manager @plugins.py:520 - loaded plugins: {}
2013-12-03 11:05:58,168 [DEBUG] subscription-manager @identity.py:130 - Loading consumer info from identity certificates.
2013-12-03 11:05:58,176 [DEBUG] subscription-manager @profile.py:97 - Loading current RPM profile.
2013-12-03 11:05:58,951 [INFO] subscription-manager @managercli.py:306 - Client Versions: {'python-rhsm': '1.10.8-1.git.0.69bd6af.el7', 'subscription-manager': '1.10.7-1.git.22.758b31a.el7'}
2013-12-03 11:05:58,953 [INFO] subscription-manager @connection.py:653 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = True
2013-12-03 11:05:58,953 [INFO] subscription-manager @connection.py:664 - Connection Built: host: sharath-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2013-12-03 11:05:58,954 [INFO] subscription-manager @connection.py:660 - Using no auth
2013-12-03 11:05:58,954 [INFO] subscription-manager @connection.py:664 - Connection Built: host: sharath-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2013-12-03 11:05:58,986 [DEBUG] subscription-manager @connection.py:444 - Making request: GET /candlepin/
2013-12-03 11:05:59,059 [DEBUG] subscription-manager @connection.py:467 - Response: status=200, requestUuid=8b67aa12-5014-45a4-ba6e-4a819f28b548
2013-12-03 11:05:59,061 [DEBUG] subscription-manager @connection.py:680 - Server supports the following resources:
2013-12-03 11:05:59,061 [DEBUG] subscription-manager @connection.py:681 - {'': '/', 'cdn': '/cdn', 'content_overrides': '/consumers/{consumer_uuid}/content_overrides', 'hypervisors': '/hypervisors', 'serials': '/serials', 'deleted_consumers': '/deleted_consumers', 'consumers': '/consumers', 'migrations': '/migrations', 'content': '/content', 'entitlements': '/entitlements', 'events': '/events', 'status': '/status', 'jobs': '/jobs', 'users': '/users', 'subscriptions': '/subscriptions', 'rules': '/rules', 'distributor_versions': '/distributor_versions', 'statistics/generate': '/statistics/generate', 'activation_keys': '/activation_keys', 'atom': '/atom', 'owners': '/owners', 'roles': '/roles', 'admin': '/admin', 'products': '/products', 'pools': '/pools', 'consumertypes': '/consumertypes', 'crl': '/crl'}
2013-12-03 11:05:59,062 [DEBUG] subscription-manager @connection.py:444 - Making request: GET /candlepin/status
2013-12-03 11:05:59,086 [DEBUG] subscription-manager @connection.py:467 - Response: status=200, requestUuid=b269d000-a145-40a2-af3e-c37705abcd12
2013-12-03 11:05:59,087 [INFO] subscription-manager @managercli.py:317 - Server Versions: {'candlepin': '0.8.33-1', 'server-type': 'Red Hat Subscription Management'}
2013-12-03 11:05:59,089 [DEBUG] subscription-manager @connection.py:444 - Making request: DELETE /candlepin/consumers/59c91e70-30d9-4a7a-b423-2347af1d67d5
2013-12-03 11:05:59,269 [DEBUG] subscription-manager @connection.py:467 - Response: status=204, requestUuid=b1b2bc8f-1f20-4e01-9430-612e31fea13c
2013-12-03 11:05:59,269 [INFO] subscription-manager @managerlib.py:808 - Successfully un-registered.
2013-12-03 11:05:59,271 [DEBUG] subscription-manager @identity.py:130 - Loading consumer info from identity certificates.
2013-12-03 11:05:59,272 [INFO] subscription-manager @cache.py:116 - Deleting cache: /var/lib/rhsm/facts/facts.json
2013-12-03 11:05:59,272 [INFO] subscription-manager @cache.py:116 - Deleting cache: /var/lib/rhsm/cache/installed_products.json
2013-12-03 11:05:59,272 [INFO] subscription-manager @cache.py:116 - Deleting cache: /var/lib/rhsm/cache/entitlement_status.json
2013-12-03 11:05:59,273 [INFO] subscription-manager @certlib.py:245 - certs updated:
Total updates: 0
Found (local) serial# []
Expected (UEP) serial# []
Added (new)
  <NONE>
Deleted (rogue):
  <NONE>
2013-12-03 11:05:59,276 [WARNING] subscription-manager @certmgr.py:107 - Exception caught while running <subscription_manager.repolib.RepoLib object at 0x18f29d0> update
>>2013-12-03 11:05:59,276 [ERROR] subscription-manager @certmgr.py:108 - 'NoneType' object has no attribute 'supports_resource'
>>Traceback (most recent call last):
>>  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 100, in update
>>    updates += lib.update()
>>  File "/usr/share/rhsm/subscription_manager/certlib.py", line 69, in update
>>    return self._do_update()
>>  File "/usr/share/rhsm/subscription_manager/repolib.py", line 47, in _do_update
>>    action = UpdateAction(self.uep, cache_only=self.cache_only)
>>  File "/usr/share/rhsm/subscription_manager/repolib.py", line 112, in __init__
>>    self.override_supported = self.uep.supports_resource('content_overrides')
AttributeError: 'NoneType' object has no attribute 'supports_resource'
2013-12-03 11:05:59,278 [INFO] subscription-manager @facts.py:73 - Cache /var/lib/rhsm/facts/facts.json does not exit
2013-12-03 11:05:59,312 [DEBUG] subscription-manager @hwprobe.py:531 - cpu info: {'cpu.cpu(s)': 2, 'cpu.core(s)_per_socket': 1, 'cpu.thread(s)_per_core': 1, 'cpu.topology_source': 'kernel /sys cpu sibling lists', 'cpu.cpu_socket(s)': 2}
2013-12-03 11:05:59,338 [DEBUG] subscription-manager @hwprobe.py:747 - Running 'virt-what'
2013-12-03 11:05:59,380 [DEBUG] subscription-manager @hwprobe.py:751 - virt-what stdout: kvm

2013-12-03 11:05:59,381 [DEBUG] subscription-manager @hwprobe.py:752 - virt-what stderr: 
2013-12-03 11:05:59,381 [INFO] subscription-manager @hwprobe.py:740 - virt.is_guest: True
2013-12-03 11:05:59,381 [INFO] subscription-manager @hwprobe.py:741 - virt.host_type: kvm
2013-12-03 11:05:59,396 [INFO] subscription-manager @hwprobe.py:796 - virt.uuid: dba69a34-fd73-f243-92ef-9c5d35b3215a
2013-12-03 11:05:59,422 [DEBUG] subscription-manager @certdirectory.py:204 - Installed product IDs: ['100000000000006', '1000000000000023', '100000000000011', '27060', '230', '1', '37069', '37068', '213412341237', '37065', '37067', '37060', '37062', '100000000000060', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '213412341236', '100000000000069', '213412341234', '213412341235', '100000000000020', '32060', '88888', '900', '917571', '37080', '801', '806', '37070']
2013-12-03 11:05:59,422 [DEBUG] subscription-manager @cert_sorter.py:131 - Unregistered, skipping server compliance check.
2013-12-03 11:05:59,682 [INFO] rhsmd @rhsmd:193 - rhsmd started
2013-12-03 11:05:59,687 [INFO] rhsmd @rhsmd:148 - D-Bus interface com.redhat.SubscriptionManager.EntitlementStatus.update_status called with status = 0
2013-12-03 11:05:59,780 [INFO] rhsmd @rhsmd:116 - D-Bus signal com.redhat.SubscriptionManager.EntitlementStatus.entitlement_status_changed emitted
2013-12-03 11:05:59,792 [DEBUG] subscription-manager @utils.py:389 - No virt-who pid file, not attempting to restart
2013-12-03 11:06:00,091 [INFO] rhsmd @rhsmd:193 - rhsmd started
2013-12-03 11:06:00,094 [INFO] rhsmd @rhsmd:148 - D-Bus interface com.redhat.SubscriptionManager.EntitlementStatus.update_status called with status = 0
2013-12-03 11:06:00,187 [INFO] rhsmd @rhsmd:116 - D-Bus signal com.redhat.SubscriptionManager.EntitlementStatus.entitlement_status_changed emitted

Expected results:
There should be no traceback

Additional info:

Comment 1 Carter Kozak 2014-01-03 16:28:21 UTC
commit b5a2e8e79dd1660e5a975b006af4b5365797364f
Author: Devan Goodwin <dgoodwin>
Date:   Mon Dec 2 16:30:35 2013 -0400

    1034429: Fix stacktrace in logs on unregister.
    
    Don't check if we support content resources if we don't have a valid
    identity

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


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