RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1380341 - GUI : Invalid credentials dialog pop out when you try to auto-attach / remove / update facts / list subscriptions in available subscriptions tab
Summary: GUI : Invalid credentials dialog pop out when you try to auto-attach / remove...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-29 11:03 UTC by Shwetha Kallesh
Modified: 2018-04-10 09:48 UTC (History)
5 users (show)

Fixed In Version: subscription-manager-1.20.2-1
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-04-10 09:47:31 UTC
Target Upstream Version:
Embargoed:


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 11:03 UTC, 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 10:51 UTC, Shwetha Kallesh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1655 0 None None None 2017-06-07 14:13:20 UTC
Red Hat Product Errata RHBA-2018:0681 0 None None None 2018-04-10 09:48:38 UTC

Description Shwetha Kallesh 2016-09-29 11:03:53 UTC
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 16:01:23 UTC
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 12:29:09 UTC
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 10:51:37 UTC
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 09:47:31 UTC
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.