Bug 1568238 - XMLRPC Fault in taskactions.to_xml: TypeError: expected string or buffer
Summary: XMLRPC Fault in taskactions.to_xml: TypeError: expected string or buffer
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: scheduler
Version: 25
Hardware: Unspecified
OS: Unspecified
urgent
unspecified vote
Target Milestone: 25.2
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
: 1568684 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-17 03:12 UTC by Roman Joost
Modified: 2018-04-19 03:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-19 03:51:03 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Beaker Project Gerrit 6074 None None None 2018-04-17 07:17:49 UTC

Description Roman Joost 2018-04-17 03:12:56 UTC
Description of problem:

On beaker-server I've seen a TypeError which seems to be in the similar series of regressions for Bug 911515

Version-Release number of selected component (if applicable):
25.1

How reproducible:
not sure

Steps to Reproduce:
not sure

Actual results:
Traceback:


Apr 17 02:56:08 beaker-server beaker-server[111453]: bkr.server.xmlrpccontroller ERROR Error handling XML-RPC method                                                                                                                          Apr 17 02:56:08 beaker-server beaker-server[111453]:  Traceback (most recent call last):                                                                                                                                                      Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py", line 59, in RPC2                                                                                              Apr 17 02:56:08 beaker-server beaker-server[111453]:      response = self.process_rpc(method,params)                                                                                                                                          Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py", line 44, in process_rpc                                                                                       Apr 17 02:56:08 beaker-server beaker-server[111453]:      response = obj(*params)                                                                                                                                                             Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/task_actions.py", line 87, in to_xml                                                                                                Apr 17 02:56:08 beaker-server beaker-server[111453]:      include_logs=include_logs),                                                                                                                                                         Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/model/scheduler.py", line 1200, in to_xml                                                                                           Apr 17 02:56:08 beaker-server beaker-server[111453]:      job.append(rs.to_xml(clone=clone, include_enclosing_job=False, **kwargs))                                                                                                           Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/model/scheduler.py", line 1692, in to_xml                                                                                           Apr 17 02:56:08 beaker-server beaker-server[111453]:      recipeSet.append(r.to_xml(clone, include_enclosing_job=False, **kwargs))                                                                                                            Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/model/scheduler.py", line 3049, in to_xml                                                                                           Apr 17 02:56:08 beaker-server beaker-server[111453]:      for guest in self.guests]                                                                                                                                                           Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/model/scheduler.py", line 2980, in to_xml                                                                                           Apr 17 02:56:08 beaker-server beaker-server[111453]:      method = self.reduced_install_options().ks_meta.get('method', None)                                                                                                                 Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/model/scheduler.py", line 2537, in reduced_install_options                                                                          Apr 17 02:56:08 beaker-server beaker-server[111453]:      self.installation.arch))                                                                                                                                                            Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/model/distrolibrary.py", line 171, in install_options_for_distro                                                                    Apr 17 02:56:08 beaker-server beaker-server[111453]:      osmajor_name, osminor, variant, arch))                                                                                                                                              Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/model/distrolibrary.py", line 43, in default_install_options_for_distro                                                             Apr 17 02:56:08 beaker-server beaker-server[111453]:      name, version = split_osmajor_name_version(osmajor_name)                                                                                                                            Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib/python2.6/site-packages/bkr/server/model/distrolibrary.py", line 33, in split_osmajor_name_version                                                                     Apr 17 02:56:08 beaker-server beaker-server[111453]:      return re.match(r'(.*?)(rawhide|\d*)$', osmajor).groups()                                                                                                                           Apr 17 02:56:08 beaker-server beaker-server[111453]:    File "/usr/lib64/python2.6/re.py", line 137, in match                                                                                                                                 Apr 17 02:56:08 beaker-server beaker-server[111453]:      return _compile(pattern, flags).match(string)                                                                                                                                       Apr 17 02:56:08 beaker-server beaker-server[111453]:  TypeError: expected string or buffer  

Expected results:
No traceback

Additional info:

Comment 1 Dan Callaghan 2018-04-17 03:23:03 UTC
The line after this in the logs shows which XMLRPC method + args were being executed:

Apr 17 03:17:39 beaker-server beaker-server[122624]: bkr.server.xmlrpccontroller DEBUG Time: 0:00:02.251979 taskactions.to_xml ('J:2132598', False, True, True)

In this case, clone is the second arg, here False. The fourth arg is include_logs, here True. I think that means it's a user running bkr job-results.

Which is not great, but I was worried it was from beah trying to fetch its recipe to run. Those calls instead look like this (and they aren't affected by this bug):

Apr 17 03:21:24 beaker-server beaker-server[122523]: bkr.server.xmlrpccontroller DEBUG Time: 0:00:00.232315 taskactions.to_xml ('J:2328254',)

Comment 2 Dan Callaghan 2018-04-17 06:28:38 UTC
I suspect the best fix for this will be the same as for bug 1568217, namely that we should be populating the new installation columns on already-provisioned recipes from before the upgrade.

Comment 3 Dan Callaghan 2018-04-17 06:35:25 UTC
Actually that's not true at all... this recipe was 5 months old. It is simply the exact same problem I already found and pointed out here:

https://bugzilla.redhat.com/show_bug.cgi?id=911515#c33

The fix should have been:

https://gerrit.beaker-project.org/c/5973/

but that only fixed one part of the problem. This exception is specific to guest recipes, which was not covered in that patch.

Comment 4 Dan Callaghan 2018-04-17 07:18:05 UTC
https://gerrit.beaker-project.org/6074

Comment 5 Dan Callaghan 2018-04-18 06:12:01 UTC
*** Bug 1568684 has been marked as a duplicate of this bug. ***

Comment 6 Roman Joost 2018-04-19 03:51:03 UTC
Released with 25.2: https://beaker-project.org/docs/whats-new/release-25.html#beaker-25-2

Due to their importance and impact on systems in use, we've decided to skip an expensive self test, rely on our automated tests and get them deployed ASAP.


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