All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Ewan Mellor <ewan@xensource.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Re: [Xen-changelog] Added exception handler for ProtocolError.
Date: Thu, 23 Mar 2006 10:59:03 -0600	[thread overview]
Message-ID: <4422D3D7.4010009@us.ibm.com> (raw)
In-Reply-To: <20060323164703.GD14259@leeni.uk.xensource.com>

Ewan Mellor wrote:
> On Thu, Mar 23, 2006 at 10:24:42AM -0600, Anthony Liguori wrote: 
>   
>> Hi Ewan,
>>
>> ProtocolError's shouldn't happen.  The case where os.geteuid() != 0 is a 
>> possibility (although I thought we had a check earlier for that?).  
>> However, if we are getting them for another reason, something's wrong.
>>     
>
> I wasn't sure whether you'd get a ProtocolError or an IOError if you tried to
> connect to the socket as non-root, so I just threw the geteuid test in -- if
> we can confirm that it's not needed (i.e. you are guaranteed to get an
> IOError) then we can do without that.
>
> The ProtocolErrors in general were being thrown whenever an exception made it
> all the way back to the top of a function registered with the server (i.e. any
> of our message handlers).

Yeah, in xen.util.xmlrpclib2:TCPXMLRPCServer::_marshaled_dispatch() we 
should catch any exception and convert it to a proper xmlrpclib.Fault.  
If exceptions are getting past that, there's something wrong.

I'll look at it today and see if I can't figure out what's happening.

Thanks for all your effort in merging this stuff Ewan!

Regards,

Anthony Liguori

>   These exceptions would get translated to a 500
> Internal Server Error which would appear at the client as a ProtocolError.  I
> don't know whether it is any exception that causes this, or only ones that
> inherit from StandardError or something like that.  One particular trigger was
> XMLRPCServer.dispatch, which wasn't checking the return value from lookup.
> This caused it to try and call None as a function whenever the user specified
> a domain that did not exist.
>
> Ewan.
>   

      reply	other threads:[~2006-03-23 16:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1FMQAe-0001Fm-0M@xenbits.xensource.com>
2006-03-23 16:24 ` [Xen-changelog] Added exception handler for ProtocolError Anthony Liguori
2006-03-23 16:47   ` Ewan Mellor
2006-03-23 16:59     ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4422D3D7.4010009@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=ewan@xensource.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.