<html><body>
<p><tt>>> Of course, using the xml-rpc code, we now have access to rich fault <br>
>> information.  Xend never actually returns errors for things and instead <br>
>> throws exceptions.<br>
></tt><br>
<tt>>  the new error code tries at least to extract the error message when<br>
>an HTTP POST or GEt fails with an error code, but the XML-RPC should <br>
>give a far more reliable framework for error handling.</tt><br>
<br>
Nice segway... I've been recently pinged a few times by our Xen CIM consumers about the lack of good errors coming out of our providers (which in turn are limited by what we get back from libxm today), especially in regards to conditions that might cause a create() operation to fail. Do you have a sense today of what errors we might expect to get reported back from libvirt?<br>
<br>
<br>
Not that this will constitute any sort of meaningful 'requirements' with which to write code, but the following is a list of errors that my Xen CIM consumers handle today for the likes VMWare. I am trying to get more info on under what specific circumstance(s) these are generated...<br>
<br>
<font face="Courier New">ERR_SUCCESS                               </font><br>
<font face="Courier New">ERR_UNABLE_TO_VERIFY_STATE</font><br>
<font face="Courier New">ERR_OUT_OF_DISK_SPACE</font><br>
<font face="Courier New">ERR_BAD_PARAMETER</font><br>
<font color="#0000FF" face="Courier New">ERR_VM_CONTROL_OP_FAILED</font><br>
<font face="Courier New">ERR_INVALID_PARM_NUM</font><br>
<font face="Courier New">ERR_CANNOT_ACCESS_DISK_FILE</font><br>
<font face="Courier New">ERR_UNKNOWN</font><br>
<font face="Courier New">ERR_VIRTUAL_DISK_CREATE_FAILED</font><br>
<font face="Courier New">ERR_VM_STUCK</font><br>
<font face="Courier New">ERR_CREDENTIALS_NOT_SET</font><br>
<font face="Courier New">ERR_UNACCEPTED_CREDENTIALS</font><br>
<font face="Courier New">ERR_OUT_OF_MEMORY</font><br>
<font face="Courier New">ERR_WRONG_STATE_FOR_OP</font><br>
<font face="Courier New">ERR_VM_NOT_FOUND</font><br>
<font face="Courier New">ERR_HOST_NOT_FOUND</font><br>
<font face="Courier New">ERR_ACCESS_DENIED</font><br>
<font face="Courier New">ERR_ALREADY_EXIST</font><br>
<font face="Courier New">ERR_OPERATION_FAILED</font><br>
<font face="Courier New">ERR_UNDOABLE_DISK_NOT_SUPPORTED</font><br>
<font face="Courier New">ERR_VMM_CMD_FORMAT_ERROR</font><br>
<font face="Courier New">ERR_COMMUNICATION_NOT_ESTABLISHED</font><br>
<font face="Courier New">ERR_FILE_COPY_FAILED</font><br>
<font face="Courier New">ERR_NAME_TOO_LONG</font><br>
<font face="Courier New">ERR_OS_NOT_SUPPORTED</font><br>
<font face="Courier New">ERR_MOUNT_FAILED_DIR_NOT_EMPTY</font><br>
<font face="Courier New">ERR_CANT_DISMOUNT_BOOT_OR_SYSTEM</font><br>
<font face="Courier New">ERR_FILE_IN_USE</font><br>
<br>
I think error reporting is an area where we will definitely want to drive clients' requirements down into the likes of libvirt. Thnx.<br>
<br>
- Gareth<br>
<br>
Dr. Gareth S. Bestor<br>
IBM Linux Technology Center<br>
M/S DES2-01<br>
15300 SW Koll Parkway, Beaverton, OR 97006<br>
503-578-3186, T/L 775-3186, Fax 503-578-3186 <br>
<br>
<img src="cid:10__=07BBFBBEDFEE84188f9e8a93df938@us.ibm.com" width="16" height="16" alt="Inactive hide details for Daniel Veillard <veillard@redhat.com>">Daniel Veillard <veillard@redhat.com><br>
<br>
<br>

<table V5DOTBL=true width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img src="cid:20__=07BBFBBEDFEE84188f9e8a93df938@us.ibm.com" border="0" height="1" width="72" alt=""><br>
</td><td style="background-image:url(cid:30__=07BBFBBEDFEE84188f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " width="1%"><img src="cid:20__=07BBFBBEDFEE84188f9e8a93df938@us.ibm.com" border="0" height="1" width="225" alt=""><br>

<ul>
<ul>
<ul>
<ul><b><font size="2">Daniel Veillard <veillard@redhat.com></font></b><br>
<font size="2">Sent by: libvir-list-bounces@redhat.com</font>
<p><font size="2">03/10/06 02:21 PM</font><br>
<font size="2">Please respond to veillard</font></ul>
</ul>
</ul>
</ul>
</td><td width="100%"><img src="cid:20__=07BBFBBEDFEE84188f9e8a93df938@us.ibm.com" border="0" height="1" width="1" alt=""><br>
<font size="1" face="Arial">  </font><br>
<font size="2"> To:     </font><font size="2">aliguori@us.ltcfwd.linux.ibm.com</font><br>
<font size="2"> cc:     </font><font size="2">libvir-list@redhat.com</font><br>
<font size="2"> Subject:        </font><font size="2">Re: [Libvir] XML-RPC support for libvirt</font></td></tr>
</table>
<br>
<br>
<tt>On Fri, Mar 10, 2006 at 10:57:59AM -0600, Anthony Liguori wrote:<br>
> Howdy,<br>
<br>
  Evening ;-)<br>
<br>
> I'm about to checkin some XML-RPC code into CVS.  The code I'm checking <br>
<br>
  okay got it. Please add a Changelog entry when you commit to the base :-)<br>
<br>
> in won't compile by default (for now) as there's still a little work to <br>
> do but I wanted to get something into the tree.  Here are the tasks left:<br>
> <br>
> 1) Convert from dict to s-expressions to handle config returns.  Right <br>
> now, the Xend XML-RPC code returns S-Expressions in the form of a <br>
> tuple.  We just need a little code to convert from these tuples to <br>
> struct sexpr's.<br>
> <br>
> 2) Integrate my unit tests.  I've got a number of unit tests that stress <br>
> the various bits of parsing code.  I'd like to add a make check that <br>
> runs these unit tests and a make fullcheck that runs these unit tests <br>
> under valgrind.<br>
> <br>
> 3) Support XML-RPC over a domain socket.  Right now I'm using nanohttp <br>
> which doesn't appear to allow different transports.  There is some HTTP <br>
> PUT code already in the tree so I could use that if there isn't a more <br>
> clever solution.<br>
> <br>
> 4) Plumb the xend backend functions to XML-RPC.  This is really straight <br>
> forward.  It's just a matter of converting:<br>
> <br>
> int<br>
> xend_pause(virConnectPtr xend, const char *name)<br>
> {<br>
>    return xend_op(xend, name, "op", "pause", NULL);<br>
> }<br>
> <br>
> To:<br>
> <br>
> int<br>
> xend_pause(virConnectPtr xend, const char *name)<br>
> {<br>
>    if (xend->xmlrpc)<br>
>        return xmlRpcCall(xend->xmlrpc, "xend.domain.pause", "", "s", name)<br>
>    else<br>
>        return xend_op(xend, name, "op", "pause", NULL);<br>
> }<br>
<br>
  Okay the steps needed look fairly clear, thanks :-)<br>
<br>
> Of course, using the xml-rpc code, we now have access to rich fault <br>
> information.  Xend never actually returns errors for things and instead <br>
> throws exceptions.<br>
<br>
  the new error code tries at least to extract the error message when<br>
an HTTP POST or GEt fails with an error code, but the XML-RPC should <br>
give a far more reliable framework for error handling.<br>
<br>
> For the S-Expression/HTTP protocol, you just get a <br>
> 501 and have to return a meaningless error.  With XML-RPC, those <br>
> exceptions are actually serialized and sent over the wire.  We may want <br>
> to explore how we can make that information available to the user.<br>
<br>
  I would say as a buffer at least that's no problem. But exposing <br>
the structure of the error stack on the server may be a bit too much.<br>
<br>
> My current understanding, btw, is that the basic XML-RPC support for <br>
> Xend is going into the tree sometime this week (Ewan is looking at the <br>
> code now) and will be a part of the 3.0.2 release.  This means that for <br>
<br>
  That's waht I was told too :-)<br>
<br>
> the 3.0.3 cycle, we'll be defining a standard API.  This process will be <br>
> starting soon (within the next couple of weeks hopefully).<br>
<br>
  Excellent ! Good good !<br>
Hopefully we will be able to confront that with what is present in other<br>
engines like l4 and QEmu and make sure at least for the 'common' APIs<br>
the semantic is similar.<br>
<br>
Daniel<br>
<br>
-- <br>
Daniel Veillard      | Red Hat </tt><tt><a href="http://redhat.com/">http://redhat.com/</a></tt><tt><br>
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  </tt><tt><a href="http://xmlsoft.org/">http://xmlsoft.org/</a></tt><tt><br>
</tt><tt><a href="http://veillard.com/">http://veillard.com/</a></tt><tt> | Rpmfind RPM search engine </tt><tt><a href="http://rpmfind.net/">http://rpmfind.net/</a></tt><tt><br>
<br>
--<br>
Libvir-list mailing list<br>
Libvir-list@redhat.com<br>
</tt><tt><a href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a></tt><tt><br>
</tt>

</body></html>