Bug 1516439 - Unregister DBus object returns a raw message when unregistering and a candlepin server is down
Summary: Unregister DBus object returns a raw message when unregistering and a candlep...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Jan Stavel
URL:
Whiteboard:
Depends On:
Blocks: 1489521
TreeView+ depends on / blocked
 
Reported: 2017-11-22 15:55 UTC by Jan Stavel
Modified: 2018-04-10 09:53 UTC (History)
4 users (show)

Fixed In Version: subscription-manager-1.20.10-1
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 09:52:44 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github /RedHatQE rhsm-qe pull 728 None None None 2018-01-31 15:13:42 UTC
Red Hat Product Errata RHBA-2018:0681 None None None 2018-04-10 09:53:21 UTC

Description Jan Stavel 2017-11-22 15:55:40 UTC
Description of problem:

A method Unregister of Unregister DBus object gives just a raw message when candlepin server is down.

How reproducible:

   Each time.

Steps to Reproduce:

   subscription-manager unregister

   dbus-send --system --print-reply --dest='com.redhat.RHSM1' '/com/redhat/RHSM1/Unregister' com.redhat.RHSM1.Unregister.Unregister dict:string:string:"",""

Error org.freedesktop.DBus.Python.dbus.exceptions.DBusException: Tunnel connection failed: 503 Service Unavailable

Actual results:

 A raw python exception


Expected results:

   Better self explanatory error message.

Comment 2 Jiri Hnidek 2017-11-24 08:54:38 UTC
This error is reported, when rhsm.conf includes valid configuration of proxy server and proxy server cannot connect to candlepin server. When no proxy server is used, then following error message is printed:

[root@centos7 ~]# dbus-send --system --print-reply --dest='com.redhat.RHSM1' '/com/redhat/RHSM1/Unregister' com.redhat.RHSM1.Unregister.Unregister dict:string:string:"",""

Error org.freedesktop.DBus.Python.dbus.exceptions.DBusException: [Errno 113] No route to host

Comment 4 Jan Stavel 2018-01-31 12:11:49 UTC
There is a additional string argument in method call:

error case:
[root@jstavel-rhel7-server ~]# dbus-send --system --print-reply --dest='com.redhat.RHSM1' '/com/redhat/RHSM1/Unregister' com.redhat.RHSM1.Unregister.Unregister dict:string:string:"",""
Error org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
TypeError: Unregister() takes at least 3 arguments (3 given)

right case:
[root@jstavel-rhel7-server ~]# dbus-send --system --print-reply --dest='com.redhat.RHSM1' '/com/redhat/RHSM1/Unregister' com.redhat.RHSM1.Unregister.Unregister dict:string:string:"","" string:""
method return time=1517400605.596377 sender=:1.15120 -> destination=:1.15270 serial=101 reply_serial=2

Comment 5 Jan Stavel 2018-02-01 10:04:47 UTC
It works:

[root@jstavel-rhel7-server ~]# dbus-send --system --print-reply --dest='com.redhat.RHSM1' /com/redhat/RHSM1/Unregister com.redhat.RHSM1.Unregister.Unregister dict:string:string:'','' string:'en'


Error org.freedesktop.DBus.Python.dbus.exceptions.DBusException: Tunnel connection failed: 500 Unable to connect

Comment 8 errata-xmlrpc 2018-04-10 09:52:44 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.