Bug 1207043 - Error prompt is incorrect when set the memory statistics polling interval more than its maximum in virsh
Summary: Error prompt is incorrect when set the memory statistics polling interval mor...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: ppc64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrea Bolognani
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-30 06:39 UTC by Gu Nini
Modified: 2015-11-19 06:26 UTC (History)
11 users (show)

Fixed In Version: libvirt-1.2.16-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 06:26:12 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Gu Nini 2015-03-30 06:39:30 UTC
Description of problem:
When set the the memory statistics polling interval to a value that exceeds its maximum such as 11111111111, the prompt in virsh is incorrect:

# virsh dommemstat virtioraw-0327 --period 11111111111
error: Unable to parse integer parameter.

While that with qmp cmd in qemu is correct:
# {'execute': 'qom-set', 'arguments': {'path': '/machine/peripheral/balloon0', 'property': 'guest-stats-polling-interval', 'value':11111111111}}
{"error": {"class": "GenericError", "desc": "timer value is too big"}}



Version-Release number of selected component (if applicable):
Host kernel: 3.10.0-229.el7.ppc64
Guest kernel: 3.10.0-229.el7.pc64/3.10.0-229.ael7b.ppc64le
Qemu-kvm-rhev: qemu-kvm-rhev-2.2.0-5.el7.ppc64


qemu-kvm-rhev-debuginfo-2.2.0-5.el7.ppc64


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Gu Nini 2015-03-30 10:04:20 UTC
(In reply to Gu Nini from comment #0)
> Description of problem:
......
> 
Please note to reproduce the bug, the guest should be booted up with a memory balloon device.
> 
> Version-Release number of selected component (if applicable):
> Host kernel: 3.10.0-229.el7.ppc64
> Guest kernel: 3.10.0-229.el7.pc64/3.10.0-229.ael7b.ppc64le
> Qemu-kvm-rhev: qemu-kvm-rhev-2.2.0-5.el7.ppc64
> 
> 
The libvirt version is libvirt-1.2.8-16.el7.ppc64
> 
> 
......

Comment 3 Andrea Bolognani 2015-05-18 12:05:17 UTC
The error message reported by virsh in this and in many similar situations has been greatly improved by the following commit, which has been merged upstream and will be part of the next libvirt release:

commit 449316701b82c77c26f6fca0c28ece6a604ae238
Author: Andrea Bolognani <abologna@redhat.com>
Date:   Fri May 15 18:14:39 2015 +0200

    virsh: Improve error message on integer value parsing failure.
    
    Replace more than 30 ad-hoc error messages with a single, generic one
    that contains the name of the option being processed and some hints
    to help the user understand what could have gone wrong.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1207043

v1.2.15-100-g4493167

Comment 5 Dan Zheng 2015-07-27 08:10:26 UTC
Test on below packages:
libvirt-1.2.17-2.el7.ppc64le
kernel-3.10.0-292.el7.ppc64le
qemu-kvm-rhev-2.3.0-9.el7.ppc64le

# virsh dommemstat dzhengvm2 --period 11111111111
error: Numeric value '11111111111' for <period> option is malformed or out of range

# virsh dommemstat dzhengvm2 --period -11111111111
error: Numeric value '-11111111111' for <period> option is malformed or out of range

# virsh dommemstat dzhengvm2 --period -1
error: Invalid collection period value '-1'

# virsh dommemstat dzhengvm2 --period 0

# virsh dommemstat dzhengvm2 --period 10000.00
error: Numeric value '10000.00' for <period> option is malformed or out of range

# virsh dommemstat dzhengvm2 --period 2100000000

Comment 6 Dan Zheng 2015-07-28 05:57:58 UTC
All above are pass.

Comment 8 errata-xmlrpc 2015-11-19 06:26:12 UTC
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/RHBA-2015-2202.html


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