Bug 1529676

Summary: kvm_stat: option '--guest' doesn't work
Product: Red Hat Enterprise Linux 7 Reporter: Chao Yang <chayang>
Component: qemu-kvm-rhevAssignee: David Hildenbrand <dhildenb>
Status: CLOSED ERRATA QA Contact: Chao Yang <chayang>
Severity: low Docs Contact:
Priority: low    
Version: 7.5CC: juzhang, lmiksik, michen, mrezanin, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.10.0-17.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-11 00:58:52 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:

Description Chao Yang 2017-12-29 10:09:39 UTC
Description of problem:
When verifying Bug 1497137, f9ff1087354e tools/kvm_stat: add option '--guest' always fails to me. 

Commit 19e8e54f4309eaa438237aa1973fe40c331903d4 from https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git is needed to fix this bug.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
Start a guest with -name test and then:
# kvm_stat -d -g test
Usage: kvm_stat [options]

kvm_stat: error: Error while searching for guest "test", use "-p" to specify a pid instead


2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 David Hildenbrand 2018-01-02 17:45:54 UTC
Already fixed upstream in the series "[PATCH v2 00/11] tools/kvm_stat: misc fixes". Patch is currently on kvm/queue.

commit 19e8e54f4309eaa438237aa1973fe40c331903d4
Author: Stefan Raspl <stefan.raspl.com>
Date:   Mon Dec 11 12:25:19 2017 +0100

    tools/kvm_stat: fix command line option '-g'
    
    Specifying a guest via '-g foo' always results in an error:
      $ kvm_stat -g foo
      Usage: kvm_stat [options]
    
      kvm_stat: error: Error while searching for guest "foo", use "-p" to
      specify a pid instead
    
    Reason is that Tui.get_pid_from_gname() is not static, as it is supposed
    to be.
    
    Signed-off-by: Stefan Raspl <raspl.ibm.com>
    Tested-by: Christian Borntraeger <borntraeger.com>

Will backport next week, when I return from vacation.

Comment 4 Miroslav Rezanina 2018-01-16 13:46:39 UTC
Fix included in qemu-kvm-rhev-2.10.0-17.el7

Comment 6 Chao Yang 2018-01-17 05:53:34 UTC
(In reply to Chao Yang from comment #0)
> Description of problem:
> When verifying Bug 1497137, f9ff1087354e tools/kvm_stat: add option
> '--guest' always fails to me. 
> Start a guest with -name test and then:
> # kvm_stat -d -g test
> Usage: kvm_stat [options]
> 
> kvm_stat: error: Error while searching for guest "test", use "-p" to specify
> a pid instead
> 

Verified pass with qemu-kvm-rhev-2.10.0-17.el7.x86_64

Comment 8 errata-xmlrpc 2018-04-11 00:58:52 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://access.redhat.com/errata/RHSA-2018:1104