<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-08-10 8:21 GMT+02:00 Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 08/09/2017 03:59 PM, Dominik Psenner wrote:<br>
> The error message could however give a hint what is going on. It should sax<br>
> that it is impossible to talk to libvirtd and that it might be stopped.<br>
<br>
</span>[Please don't top post on technical lists]  </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Yes and no. There can be a lot of reasons why client can't talk to<br>
daemon. They all don't demonstrate in local connection, but imagine<br>
talking to a daemon on distant host.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">And suddenly somebody cuts the<br>
cable, or inserts incorrect firewall rules, etc. Suggesting that daemon<br>
is not running would be wrong in this case.</blockquote><div><br></div><div>Actually, it would most probably be true in this case and still the most probable cause if the communication went over a wire. Yes, it could be a firewall issue but still it is more likely that the host or the service is not up.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Also, we tend to report<br>
system errors and leave mgmt application figure out how to deal with it.<br>
For instance:<br>
<br>
<a href="http://libvirt.org/git/?p=libvirt.git;a=blob;f=tools/virsh.c;h=94bb7ff6c93afa46d31d085eaa5e504f1cca7593;hb=HEAD#l90" rel="noreferrer" target="_blank">http://libvirt.org/git/?p=<wbr>libvirt.git;a=blob;f=tools/<wbr>virsh.c;h=<wbr>94bb7ff6c93afa46d31d085eaa5e50<wbr>4f1cca7593;hb=HEAD#l90</a></blockquote><div><br></div><div>Are you indicating that a user should have to read the sourcecode of libvirt and libvirtd to understand their error messages? Please bear in mind that we are humans that use a software and as such the software should be written to be used by humans. I know very well that good error handling is a tough task to achieve, but it is still worth the effort. I suggest that the error message:</div><div><br></div><div>libvirt: XML-RPC error : Cannot write data: Broken pipe<br></div><div><br></div><div>should read as:</div><div><br></div><div>libvirt: Could not connect to the libvirtd service : Cannot write data: Broken pipe</div><div><br></div><div>The first indicates that there's an XML-RPC error going on. To a user this sounds like a bad problem that he cannot solve by himself. Maybe it is an incompatible API or the connection broke while transferring data or the connection crashed, maybe trying to send something that shouldn't be sent with XML-RPC. Anyway it doesn't give a clue to a user that does not know how libvirt and libvirtd work internally. The latter is much clearer in explaining that there's a connectivity issue and that it could not even open the connection to the service. On top of that it includes the actual cause, namely a broken pipe.</div><div><br></div><div>Cheers</div></div>-- <br><div class="gmail_signature"><div dir="ltr">Dominik Psenner<br></div></div>
</div></div>