Bug 1029287

Summary: better error message when server cannot handle request because it is too old
Product: [Retired] Beaker Reporter: Raymond Mancy <rmancy>
Component: generalAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.15CC: dcallagh, dowang, ebaak, qwan, rjoost, tools-bugs
Target Milestone: 24.0Keywords: FutureFeature, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-21 18:50:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Raymond Mancy 2013-11-12 05:09:40 UTC
Description of problem:

In future releases of Beaker we will endevaour to keep a degree of forwards and
backwards compatibility between clients and servers.

It will be quite expected for a server to attempt to process methods that it
does not expose (due to perhaps the client being a later version).

I imagine there is currently some vague error message that is returned to the client. We should return something that indicates that the version of the server does not support that command.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

Something not altogether helpful I imagine

Expected results:

Something like: '<command> is not implemented on version <version> of beaker server'

Additional info:

Comment 2 Dan Callaghan 2013-11-12 21:16:52 UTC
(In reply to Raymond Mancy from comment #0)
> Actual results:
> 
> Something not altogether helpful I imagine

The actual result is an XML-RPC fault like this:

xmlrpclib.Fault: <Fault 1: "<type 'exceptions.AssertionError'>:method some_new_method does not exist">

How is that not sufficient? Also, the server by definition cannot know whether a method is from the future, or just a typo, so it would have to always respond with "this is not implemented in Beaker yet". I don't see how that's any more helpful or sensible than the current error message.

Comment 3 Raymond Mancy 2014-01-22 23:29:19 UTC
(In reply to Dan Callaghan from comment #2)
> (In reply to Raymond Mancy from comment #0)
> > Actual results:
> > 
> > Something not altogether helpful I imagine
> 
> The actual result is an XML-RPC fault like this:
> 
> xmlrpclib.Fault: <Fault 1: "<type 'exceptions.AssertionError'>:method
> some_new_method does not exist">
> 
> How is that not sufficient? Also, the server by definition cannot know
> whether a method is from the future, or just a typo, so it would have to
> always respond with "this is not implemented in Beaker yet". I don't see how
> that's any more helpful or sensible than the current error message.

Because it looks like the client and/or the server is broken, when they are both functioning normally. The likelihood of that error being real is pretty much zero, as there is no way it would pass our test suite.

Comparing server/client versions would go some way to giving us further confirmation that it was a version incompatibility issue.

Comment 4 Dan Callaghan 2014-03-26 01:06:31 UTC
We can add an X-Beaker-Server-Version header in XML-RPC responses (or all HTTP responses) and then the client can examine that and warn the user if the request fails and the server is older than the client is expecting.

We can also adjust the exception type and message for a non-existent XML-RPC method to look a bit less scary and "everything is broken" and more suggestive of the possibility that the server is too old.

Comment 6 Dan Callaghan 2016-06-14 08:19:48 UTC
(In reply to Dan Callaghan from comment #4)
> We can add an X-Beaker-Server-Version header in XML-RPC responses (or all
> HTTP responses) and then the client can examine that and warn the user if
> the request fails and the server is older than the client is expecting.

http://gerrit.beaker-project.org/4986
http://gerrit.beaker-project.org/4987

but note that won't apply to any commands using XMLRPC still, since the xmlrpclib.Fault instances don't give us access to the underlying HTTP response object.

We are gradually phasing out XMLRPC in the client though so no big deal I think. For those...

> We can also adjust the exception type and message for a non-existent XML-RPC
> method to look a bit less scary and "everything is broken" and more
> suggestive of the possibility that the server is too old.

http://gerrit.beaker-project.org/4988

New error message looks like:

XML-RPC fault: XML-RPC method auth.who_am_you not implemented by this server

Comment 10 Dan Callaghan 2017-02-21 18:50:26 UTC
Beaker 24.0 has been released.