Bug 1029287 - better error message when server cannot handle request because it is too old
better error message when server cannot handle request because it is too old
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: general (Show other bugs)
0.15
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 24.0
: ---
Assigned To: Dan Callaghan
tools-bugs
: FutureFeature, Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-12 00:09 EST by Raymond Mancy
Modified: 2018-02-05 19:41 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-21 13:50:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Raymond Mancy 2013-11-12 00:09:40 EST
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 16:16:52 EST
(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 18:29:19 EST
(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-25 21:06:31 EDT
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 04:19:48 EDT
(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 13:50:26 EST
Beaker 24.0 has been released.

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