Bug 1249441
Summary: | cpu-stats returns error messages with --start <number> (number >=32) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Dan Zheng <dzheng> |
Component: | libvirt | Assignee: | Andrea Bolognani <abologna> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.2 | CC: | abologna, bugproxy, dyuan, dzheng, gsun, hannsj_uhl, jtomko, mzhan, rbalakri |
Target Milestone: | rc | Keywords: | Patch |
Target Release: | 7.3 | ||
Hardware: | ppc64le | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.3.3-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-03 18:21:48 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1230910, 1288337, 1359843 |
Description
Dan Zheng
2015-08-03 02:02:26 UTC
------- Comment From niteshkonkar.com 2016-03-28 23:49 EDT------- Hello All, I have written a patch for it. Will confirm the approach once and then send it to community for review. #virsh cpu-stats --domain 40 --start 157 CPU157: # Thanks. (In reply to IBM Bug Proxy from comment #3) > ------- Comment From niteshkonkar.com 2016-03-28 23:49 EDT------- > Hello All, > > I have written a patch for it. Will confirm the approach once and then send > it to community for review. > > #virsh cpu-stats --domain 40 --start 157 > CPU157: > > # > > Thanks. . oops .. the above comment has to read: " --- Comment #6 from Nitesh Konkar <niteshkonkar.com> --- Hello All, I have written a patch for it. Will confirm the approach once and then send it to community for review. #virsh cpu-stats --domain 40 --start 157 CPU157: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU158: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU159: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds # Thanks. " ... Proposed upstream patch: https://www.redhat.com/archives/libvir-list/2016-April/msg00005.html Pushed as: commit d9a0a885e2b1cf3c9fc5260f9cdf4fc8a768f26c Author: Nitesh Konkar <niteshkonkar.libvirt> AuthorDate: 2016-04-01 02:05:04 -0400 Commit: Ján Tomko <jtomko> CommitDate: 2016-04-01 11:36:04 +0200 Pass the correct cpu count when calling virDomainGetCPUStats. When using the --start option, the show_count should not be set to max_id as the --start <cpu> means we dont need those many initial cpu stats. Hence, show_count should be adjusted accordingly. https://bugzilla.redhat.com/show_bug.cgi?id=1249441 Signed-off-by: Nitesh Konkar <nitkon12.ibm.com> Signed-off-by: Ján Tomko <jtomko> git describe: v1.3.3-rc2-3-gd9a0a88 test packages: libvirt-1.3.3-1.el7.ppc64le qemu-kvm-rhev-2.5.0-4.el7.ppc64le kernel-3.10.0-327.8.1.el7.ppc64le Cases: # virsh cpu-stats --domain gsun-test1 CPU0: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ... CPU157: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU158: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU159: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds Total: cpu_time 21.437286628 seconds user_time 1.540000000 seconds system_time 1.290000000 seconds ********************* Case1: PASS # virsh cpu-stats --domain gsun-test1 --start 32 CPU32: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ... CPU159: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds Case2: Fail # virsh cpu-stats --domain gsun-test1 --start 160 <no output> '159' is the maximum cpu id. When 160 is specified for --start, there should be an error message to show something like 'invalid cpu ...'. Hi Andrea, What do you think of ? ------- Comment From niteshkonkar.com 2016-04-15 03:32 EDT------- I have sent a patch for review. After the patch:- # virsh cpu-stats --domain 40 --start 159 # virsh cpu-stats --domain 40 --start 160 Start cpu 160 larger than maximum of 159. Nitesh Konkar. This has now been fixed upstream. commit 0ed35e0939c8ee2c38dbb4d67233e864499287ee Author: Nitesh Konkar <niteshkonkar.libvirt> Date: Fri Apr 15 03:28:53 2016 -0400 Return error when --start <number> in cpu-stats is invalid. Signed-off-by: Nitesh Konkar <nitkon12.ibm.com> v1.3.3-163-g0ed35e0 Test package: libvirt-1.3.4-1.el7.ppc64le qemu-kvm-rhev-2.5.0-4.el7.ppc64le kernel-3.10.0-327.13.1.el7.ppc64le # virsh list --all Id Name State ---------------------------------------------------- 2 avocado-vt-vm1 running # virsh cpu-stats 2 CPU0: cpu_time 2.470659226 seconds vcpu_time 2.389113024 seconds ... CPU79: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds Total: cpu_time 37.949896658 seconds user_time 2.100000000 seconds system_time 2.350000000 seconds # virsh cpu-stats 2 --start 160 error: Start CPU 160 is out of range (min: 0, max: 79) # virsh cpu-stats 2 --start 78 --count 3 CPU78: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU79: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds # virsh cpu-stats 2 --start 78 --count -1 error: Invalid value for number of CPUs to show [root@ibm-p8-rhevm-17 test]# virsh cpu-stats 2 --start -78 --count -1 error: Invalid value for start CPU # virsh cpu-stats 2 --start 60 --count 0 <no output> All tests above are passed, so set it verified. 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. https://rhn.redhat.com/errata/RHSA-2016-2577.html |