| Summary: | calling get_node_cpu_stats() return errors:code: 1, message: internal error nparams too large | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Gunannan Ren <gren> |
| Component: | perl-Sys-Virt | Assignee: | Daniel Berrangé <berrange> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.3 | CC: | ajia, berrange, crobinso, dallan, dyuan, mshao, mzhan, rwu, syeghiay, xen-maint |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | perl-Sys-Virt-0.9.9-1.el6 | Doc Type: | Bug Fix |
| Doc Text: |
No technical notes required
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-06-20 12:00:45 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Gunannan Ren
2011-10-25 04:05:47 UTC
perl-Sys-Virt and libvirt version: perl-Sys-Virt-0.9.4-2.el6.x86_64 libvirt-client-0.9.4-19.el6.x86_64 libvirt-0.9.4-19.el6.x86_64 When I test get_node_memory_stats(), the error message is the same. "libvirt error code: 1, message: internal error nparams too large" So update a comment for this. It should be a libvirt issue, libvirt defines the following $macro in remote_protocol.h, and when nparams > $macro, we will meet previous errors: ./src/remote/remote_protocol.h:55:#define REMOTE_NODE_CPU_STATS_MAX 16 ./src/remote/remote_protocol.h:56:#define REMOTE_NODE_MEMORY_STATS_MAX 16 ./src/remote/remote_protocol.h:61:#define REMOTE_DOMAIN_MEMORY_STATS_MAX 1024 length '16' is too small, maybe, we should change the above '16' to '1024' like REMOTE_DOMAIN_MEMORY_STATS_MAX. Alex I just saw libvirt and perl-sys-virt codes again, as the value of @nparams is dynamic, call the API setting @nparams to 0 and @params as NULL, in other words, $con->get_node_cpu_stats() should give a default @nparams as 0 and @params as NULL like funciton cmdNodeCpuStats in tools/virsh.c. Mybe, libvirt should do these work rather than pushing them to upper layer application such as virsh command, perl or python binding, otherwise, each application both need to add some check function or pass some default values. Alex I can't reproduce this problem. Can you confirm that you still see an error when testing this with libvirt 0.9.9 ? perl-Sys-Virt-0.9.9-1 is okay for me. It's ok, The bug has been verified on libvirt-0.9.9-1.el6.x86_64 libvirt-devel-0.9.9-1.el6.x86_64 libvirt-client-0.9.9-1.el6.x86_64 perl-Sys-Virt-0.9.9-1.el6.x86_64
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
No technical notes required
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0754.html |