Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1331228 - No error messages for cpu-stats with --start option.
No error messages for cpu-stats with --start option.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.2
Unspecified Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Andrea Bolognani
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-27 23:53 EDT by yalzhang@redhat.com
Modified: 2016-11-03 14:43 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-1.3.4-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:43:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 08:07:06 EDT

  None (edit)
Description yalzhang@redhat.com 2016-04-27 23:53:14 EDT
Description of problem:
No error messages for cpu-stats with --start option.

Version-Release number of selected component (if applicable):
libvirt-1.3.3-2.el7.x86_64
qemu-kvm-rhev-2.5.0-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
# virsh cpu-stats R7.2
CPU0:
    cpu_time             9.798005025 seconds
    vcpu_time            9.364671581 seconds
CPU1:
    cpu_time             9.076250379 seconds
    vcpu_time            8.675238766 seconds
CPU2:
    cpu_time             7.054429959 seconds
    vcpu_time            6.625330794 seconds
CPU3:
    cpu_time             5.368119343 seconds
    vcpu_time            4.751755399 seconds
Total:
    cpu_time            31.296804706 seconds
    user_time            1.100000000 seconds
    system_time         13.560000000 seconds

2.
# virsh cpu-stats R7.2 --start 4

# echo $?
0

3.
# virsh cpu-stats R7.2 --start 5

# echo $?
1

Actual results:
There are no error messages if cpu-stats with the option --start larger than maximum cpu number.


Expected results:
step 2 the "echo $?" should be "1", and for step 2 and step 3, there should be error messages such as:
# virsh cpu-stats rhel62 --start 4
error: Failed to retrieve CPU statistics for domain 'rhel62'
error: invalid argument: start_cpu 4 larger than maximum of 3

Additional info:
N/A
Comment 2 Jaroslav Suchanek 2016-04-29 08:54:01 EDT
Fixed by:

commit 0ed35e0939c8ee2c38dbb4d67233e864499287ee
Author: Nitesh Konkar <niteshkonkar.libvirt@gmail.com>
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@linux.vnet.ibm.com>
Comment 4 yalzhang@redhat.com 2016-05-08 05:05:10 EDT
verified on libvirt-1.3.4-1.el7.x86_64, all the results is as expected.

# virsh cpu-stats rh7.2
CPU0:
	cpu_time             8.133394075 seconds
	vcpu_time            7.614799103 seconds
CPU1:
	cpu_time             8.736083836 seconds
	vcpu_time            8.023468680 seconds
CPU2:
	cpu_time             7.717729821 seconds
	vcpu_time            7.020648041 seconds
CPU3:
	cpu_time             9.465514535 seconds
	vcpu_time            8.454502046 seconds
Total:
	cpu_time            34.052722267 seconds
	user_time            1.190000000 seconds
	system_time         14.220000000 seconds

# virsh cpu-stats rh7.2 --start 4
error: Start CPU 4 is out of range (min: 0, max: 3)
# echo $?
1

# virsh cpu-stats rh7.2 --start -1
error: Invalid value for start CPU
# echo $?
1

# virsh cpu-stats rh7.2 --start 6555234
error: Start CPU 6555234 is out of range (min: 0, max: 3)
# echo $?
1
# virsh cpu-stats rh7.2 --start sdf
error: Numeric value 'sdf' for <start> option is malformed or out of range
# echo $?
1

# virsh cpu-stats rh7.2 --start ' '
error: Numeric value ' ' for <start> option is malformed or out of range
# echo $?
1

# virsh cpu-stats rh7.2 --start ''
error: Numeric value '' for <start> option is malformed or out of range
# echo $?
1

change the bug to verified.
Comment 6 errata-xmlrpc 2016-11-03 14:43:49 EDT
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

Note You need to log in before you can comment on or make changes to this bug.