If using a remote access, sometimes an RPC entry point is not
available, and currently we just end up with a raw:
error: unknown procedure: xxx
error, while this should be more cleanly reported as an unsupported
entry point like for local access, e.g when calling an older RHEL-5.3
without patch
paphio:~/libvirt -> tools/virsh --connect xen+ssh://root@test3 dominfo
test5
Id: 1
Name: test5
UUID: 62cd4e2e-5117-e4ba-2dbf-68a37031c3e4
OS Type: linux
State: idle
CPU(s): 1
CPU time: 254.5s
Max memory: 524288 kB
Used memory: 524108 kB
error: unknown procedure: 122
with patch
paphio:~/libvirt -> tools/virsh --connect xen+ssh://root@test3 dominfo
test5
Id: 1
Name: test5
UUID: 62cd4e2e-5117-e4ba-2dbf-68a37031c3e4
OS Type: linux
State: idle
CPU(s): 1
CPU time: 254.6s
Max memory: 524288 kB
Used memory: 524080 kB
paphio:~/libvirt ->
the application knows that some feature may not be avilable but expects
the VIR_ERR_NO_SUPPORT to be reported, not an internal RPC problem,
I also noticed that we do
"%s", thiscall->err.message ? *thiscall->err.message : NULL);
for passing the error message, which is a sure way to crash if there is
no error message and changing this to
"%s", thiscall->err.message ? *thiscall->err.message :
"unknown");
I expect the server to always return an error message in practice, but
this need fixing.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/