| Summary: | missing functions on remote libvirt give wrong error | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Min Zhan <mzhan> |
| Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
| Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.3 | CC: | acathrow, dallan, dyuan, eblake, mzhan, rwu, weizhan, whuang, yupzhang, zhpeng |
| Target Milestone: | rc | Keywords: | Regression, Reopened |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 738439 | Environment: | |
| Last Closed: | 2012-02-24 22:25:57 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | 738439 | ||
| Bug Blocks: | 743047 | ||
|
Comment 2
Huang Wenlong
2012-01-16 06:57:41 UTC
Test this bug with : Client : libvirt-0.9.8-1.el6.x86_64 Server: libvirt-0.9.3-2.el6.x86_64 Client : # gcc -o foo foo.c -lvirt # ./foo qemu+ssh://10.66.5.12/system /tmp/ root.5.12's password: libvir: RPC error : unknown procedure: 235 success it is fine too. (In reply to comment #3) > Test this bug with : > Client : libvirt-0.9.8-1.el6.x86_64 > Server: libvirt-0.9.3-2.el6.x86_64 > > > Client : > > # gcc -o foo foo.c -lvirt > > > # ./foo qemu+ssh://10.66.5.12/system /tmp/ > root.5.12's password: > libvir: RPC error : unknown procedure: 235 > success > The fact that the error message states "unknown procedure" instead of "this function is not supported by the connection driver" may mean that we have a regression in error reporting quality. The code in virterror.c for VIR_ERR_NO_SUPPORT should prefer the latter message, although I haven't tested whether older versions of libvirt (preferably both server and client older than 0.9.2, before our RPC rewrite) actually used this message on encountering an unknown RPC call. I'm reopening this, so that we can investigate whether there really is an issue in poor error message quality. Eric & all, what you are describing is not a bug IMHO. This API from the example was introduced in 0.9.4; So if we are talking to any previous daemon we have to receive "unknown procedure" as the procedure really not known. The VIR_ERR_NO_SUPPORT is used in cases where the procedure is known, however not implemented in driver yet. E.g. virDomainSaveImageGetXMLDesc is implemented only for qemu, so issuing this api against say virtual box or xen driver (and 0.9.4+ daemon of course) will gain VIR_ERR_NO_SUPPORT. Server version: v0.9.1 - success v0.9.2 - success v0.9.3 - success v0.9.4 - error: libvir: QEMU error : operation failed: cannot read domain image However, trying different driver (LXC): libvir: error : this function is not supported by the connection driver: virDomainSaveImageGetXMLDesc success Michal, what's the result of an 0.9.2 client calling an unknown procedure in a server <= 0.9.2 ? The question is not whether the error is tagged VIR_ERR_NO_SUPPORT, but whether the error message has regressed in quality. That is, if 0.8.0 talking to 0.7.0 and calling an unknown function reported "this function is not supported by the connection driver", while 0.9.4 talking to 0.9.2 gets "unknown procedure: NNN", we've made the reporting worse over time. I still don't think this is a bug. We've fixed the error code; But even for older version we've always reported "unknown procedure: NNN". (In reply to comment #9) > I still don't think this is a bug. We've fixed the error code; But even for > older version we've always reported "unknown procedure: NNN". Given that, I think we've confirmed that the behavior is unchanged, so I'm closing as NOTABUG. |