Bug 670868 - task_to_dict() exposed by lab controller XML RPC fails with exception
Summary: task_to_dict() exposed by lab controller XML RPC fails with exception
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: lab controller
Version: 0.6
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Dan Callaghan
QA Contact:
URL:
Whiteboard:
: 834389 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-19 15:15 UTC by Jan Stancek
Modified: 2019-05-22 13:42 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-20 00:38:55 UTC
Embargoed:


Attachments (Terms of Use)

Comment 4 Dan Callaghan 2012-03-29 00:15:20 UTC
In this case it seems the uploader field is None. The server has no problem with that, but the lab controller proxy code isn't setting allow_none=True. It gets None back from the server and tries to marshal it for the client and then blows up.

We could probably just set allow_none=True for the proxy:

--- a/LabController/proxy/src/bkr/labcontroller/main.py
+++ b/LabController/proxy/src/bkr/labcontroller/main.py
@@ -127,7 +127,7 @@ def main_loop(conf=None, foreground=False):
         stop_on_exception=False)
     login.daemon = True
     login.start()
-    server = ForkingXMLRPCServer(("", 8000))
+    server = ForkingXMLRPCServer(("", 8000), allow_none=True)
     server.register_instance(proxy)
     try:
         server.serve_forever()

but will this break old clients which can't understand XML-RPC nil?

Comment 5 Dan Callaghan 2012-07-13 04:42:48 UTC
*** Bug 834389 has been marked as a duplicate of this bug. ***

Comment 6 Dan Callaghan 2012-07-13 04:44:01 UTC
I think we can bite the bullet and set allow_none=True. It works back to Python 2.4 (RHEL5).

Comment 7 Dan Callaghan 2012-07-13 05:29:28 UTC
On Gerrit: http://gerrit.beaker-project.org/1214

Verified that this works correctly for RHEL5 and RHEL6 clients.

Comment 10 Raymond Mancy 2012-07-17 05:15:02 UTC
>>> server.task_to_dict("/CoreOS/abrt/Sanity/cli-sanity")
{'excluded_osmajor': [], 'creation_date': '2010-05-28 08:59:23', 'bugzillas': [], 'runfor': ['abrt'], 'path': '/mnt/tests/CoreOS/abrt/Sanity/cli-sanity', 'owner': None, 'rpm': 'rh-tests-abrt-Sanity-cli-sanity-1.0-0.noarch.rpm', 'id': 1232, 'update_date': '2011-09-06 06:24:14', 'priority': None, 'version': '1.0-0', 'description': 'does sanity on abrt-cli', 'repo': 'None', 'uploader': None, 'oldrpm': None, 'destructive': False, 'types': ['Sanity'], 'excluded_arch': [], 'name': '/CoreOS/abrt/Sanity/cli-sanity', 'license': 'GPLv3', 'nda': False, 'required': ['abrt', 'abrt-cli'], 'max_time': 1200, 'valid': True}

Comment 11 Dan Callaghan 2012-07-20 00:38:55 UTC
Beaker 0.9.1 has been released.


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