Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1380341 - GUI : Invalid credentials dialog pop out when you try to auto-attach / remove / update facts / list subscriptions in available subscriptions tab
GUI : Invalid credentials dialog pop out when you try to auto-attach / remove...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager (Show other bugs)
7.3
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Jiri Hnidek
John Sefler
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-29 07:03 EDT by Shwetha Kallesh
Modified: 2018-04-10 05:48 EDT (History)
5 users (show)

See Also:
Fixed In Version: subscription-manager-1.20.2-1
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 05:47:31 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)
Invalid credentials error when tried to remove subscription on a consumer that is deleted at server (259.07 KB, image/png)
2016-09-29 07:03 EDT, Shwetha Kallesh
no flags Details
Unit has been deleted message when you try to list/remove/facts update (334.49 KB, image/png)
2017-11-07 05:51 EST, Shwetha Kallesh
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Github candlepin/subscription-manager/pull/1655 None None None 2017-06-07 10:13 EDT
Red Hat Product Errata RHBA-2018:0681 None None None 2018-04-10 05:48 EDT

  None (edit)
Description Shwetha Kallesh 2016-09-29 07:03:53 EDT
Created attachment 1205913 [details]
Invalid credentials error when tried to remove subscription on a consumer that is deleted at server

Description of problem:

Invalid credntials dialog pop out when you try to auto-attach / remove /  update facts /list subscriptions in available subscriptions tab
Version-Release number of selected component (if applicable):

[root@dhcp35-233 ~]# rpm -qa subscription-manager-gui
subscription-manager-gui-1.17.15-1.el7.x86_64


How reproducible:


Steps to Reproduce:
1.register the system , attach subscriptions and delete consumer using following command

curl -k -u <username>:<password> --request DELETE https://<server>:<port>/candlepin/consumers/<consumerid>

2.launch GUI and try to list subscriptions in available subscriptions tab or try to update facts or try to remove subscriptions attach 
3.

Actual results:

invalid crendtials

Expected results:

Consumer has been deleted

Additional info:

rhsm log when tried to remove subscriptions


2016-09-29 16:18:35,650 [INFO] rhsmd:1369:MainThread @rhsmd:261 - rhsmd started
2016-09-29 16:18:35,762 [INFO] rhsmd:1369:MainThread @connection.py:830 - Connection built: host=skallesh.usersys.redhat.com port=8443 handler=/candlepin auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
2016-09-29 16:18:36,151 [ERROR] rhsmd:1369:MainThread @cache.py:209 - Unit 1f311ae7-6003-442f-b6ea-229d65831cdb has been deleted
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/subscription_manager/cache.py", line 197, in load_status
    self._sync_with_server(uep, uuid)
  File "/usr/lib/python2.7/site-packages/subscription_manager/cache.py", line 306, in _sync_with_server
    self.server_status = uep.getCompliance(uuid)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1084, in getCompliance
    return self.conn.request_get(method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 694, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 611, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 647, in validateResponse
    parsed['deletedId'])
GoneException: Unit 1f311ae7-6003-442f-b6ea-229d65831cdb has been deleted


rhsm log when tried to auto-attach subscriptions:

2016-09-29 16:27:15,438 [ERROR] subscription-manager-gui:31777:MainThread @registergui.py:1350 - (<class 'rhsm.connection.RestlibException'>, RestlibException(), <traceback object at 0x3bdd950>)
Traceback (most recent call last):
  File "/sbin/subscription-manager-gui", line 87, in <module>
    import dbus.dbus_bindings
ImportError: No module named dbus_bindings
2016-09-29 16:27:15,440 [ERROR] subscription-manager-gui:31777:MainThread @utils.py:138 - None
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/subscription_manager/gui/registergui.py", line 2125, in _find_service_levels
    suitable_slas = self._find_suitable_service_levels(consumer_uuid, facts)
  File "/usr/lib/python2.7/site-packages/subscription_manager/gui/registergui.py", line 2067, in _find_suitable_service_levels
    consumer_uuid)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1064, in getConsumer
    return self.conn.request_get(method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 694, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 611, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 661, in validateResponse
    raise RestlibException(response['status'], error_msg, response.get('headers'))
RestlibException: Invalid credentials.
Comment 2 Chris Snyder 2016-09-30 12:01:23 EDT
We should investigate why candlepin is returning different exceptions. Also investigate how we are processing these responses from candlepin in subman.
Comment 3 Jiri Hnidek 2017-06-07 08:29:09 EDT
It is even worse in current version. When you try to launch sub-man gui, then it is ended with following error on console:

'NoneType' object is not iterable

Content of rhsm.log is following:

2017-06-07 08:25:23,394 [ERROR] subscription-manager-gui:1529:MainThread @cache.py:223 - Unit fb7f8891-af2a-425d-bd47-f7909310c106 has been deleted
Traceback (most recent call last):
  File "/home/jhnidek/github/candlepin/subscription_manager/src/subscription_manager/cache.py", line 211, in load_status
    self._sync_with_server(uep, uuid)
  File "/home/jhnidek/github/candlepin/subscription_manager/src/subscription_manager/cache.py", line 534, in _sync_with_server
    self.server_status = uep.getEntitlementList(uuid)
  File "/home/jhnidek/github/candlepin/subscription_manager/python-rhsm/src/rhsm/connection.py", line 1310, in getEntitlementList
    results = self.conn.request_get(method + filters)
  File "/home/jhnidek/github/candlepin/subscription_manager/python-rhsm/src/rhsm/connection.py", line 651, in request_get
    return self._request("GET", method, headers=headers)
  File "/home/jhnidek/github/candlepin/subscription_manager/python-rhsm/src/rhsm/connection.py", line 677, in _request
    info=info, headers=headers)
  File "/home/jhnidek/github/candlepin/subscription_manager/python-rhsm/src/rhsm/connection.py", line 566, in _request
    self.validateResponse(result, request_type, handler)
  File "/home/jhnidek/github/candlepin/subscription_manager/python-rhsm/src/rhsm/connection.py", line 598, in validateResponse
    parsed['deletedId'])
GoneException: Unit fb7f8891-af2a-425d-bd47-f7909310c106 has been deleted
2017-06-07 08:25:23,395 [ERROR] subscription-manager-gui:1529:MainThread @subscription-manager-gui:233 - 'NoneType' object is not iterable
Traceback (most recent call last):
  File "./bin/subscription-manager-gui", line 216, in <module>
    main = managergui.MainWindow(auto_launch_registration=options.register)
  File "/home/jhnidek/github/candlepin/subscription_manager/src/subscription_manager/gui/managergui.py", line 241, in __init__
    prod_dir=self.product_dir)
  File "/home/jhnidek/github/candlepin/subscription_manager/src/subscription_manager/gui/mysubstab.py", line 64, in __init__
    self.pooltype_cache = inj.require(inj.POOLTYPE_CACHE)
  File "/home/jhnidek/github/candlepin/subscription_manager/src/subscription_manager/injection.py", line 107, in require
    return FEATURES.require(feature, *args, **kwargs)
  File "/home/jhnidek/github/candlepin/subscription_manager/src/subscription_manager/injection.py", line 81, in require
    self.providers[feature] = provider()
  File "/home/jhnidek/github/candlepin/subscription_manager/src/subscription_manager/cache.py", line 548, in __init__
    self.update()
  File "/home/jhnidek/github/candlepin/subscription_manager/src/subscription_manager/cache.py", line 555, in update
    self._do_update()
  File "/home/jhnidek/github/candlepin/subscription_manager/src/subscription_manager/cache.py", line 570, in _do_update
    for ent in entitlement_list:
TypeError: 'NoneType' object is not iterable
Comment 5 Shwetha Kallesh 2017-11-07 05:51 EST
Created attachment 1348901 [details]
Unit has been deleted message when you try to list/remove/facts update

Fixed in following version

[root@hp-ms-01-c02 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.2.0-1
subscription management rules: 5.26
subscription-manager: 1.20.5-1.el7
Comment 8 errata-xmlrpc 2018-04-10 05:47:31 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.

https://access.redhat.com/errata/RHBA-2018:0681

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