Bug 688795 - virsh dommemstat command failed to deal with ''
Summary: virsh dommemstat command failed to deal with ''
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-18 03:12 UTC by Vivian Bian
Modified: 2014-07-06 19:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-25 10:59:12 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 988448 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 988448

Description Vivian Bian 2011-03-18 03:12:30 UTC
Description of problem:


Version-Release number of selected component (if applicable):
libvirt-0.8.1-27.el6_0.5.x86_64
qemu-kvm-0.12.1.2-2.113.el6_0.8.x86_64
kernel-2.6.32-71.20.1.el6.x86_64


How reproducible:
always

Steps to Reproduce:
[read/write mode]
Failed to deal with '' when there is space in guest's name 
# virsh list --all
 Id Name                 State
----------------------------------
  9 local                running
  - a b                  shut off
  - ayal                 shut off


# virsh dommemstat 'local'

# virsh dommemstat 'ayal'
error: Failed to get memory statistics for domain ayal
error: Requested operation is not valid: domain is not running

# virsh dommemstat 'a b'
error: unexpected data 'b'

[readonly mode]
# virsh -r
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh > dommemstat 'a b'
error: unexpected data 'b''  ----> one more ' displayed
virsh > dommemstat 'ayal'
error: failed to get domain ''ayal''  ---> a pair more '' displayed 
error: Domain not found: no domain with matching name ''ayal'' ---> a pair more '' displayed 

virsh > dommemstat ayal
error: Failed to get memory statistics for domain ayal
error: Requested operation is not valid: domain is not running

virsh > dommemstat a b
error: unexpected data 'b'

virsh > dommemstat local



Actual results:
Failures are :
1. '' are handled differently between R/W and RO mode 
2. on R/W mode, failed to recognize the guest name if there is space in the name
3. on RO mode , failed to recognize the guest name if there is space in the name,also , messed up '''' displayed . 

Expected results:
Could deal with '' correctly . And make R/W and RO mode consistent . 

Additional info:
on RHEL6.1 , there is no such problem

Comment 2 RHEL Program Management 2011-04-04 01:56:32 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 6 Ján Tomko 2014-04-25 10:59:12 UTC
Fixed upstream:
commit 57868d121b85261888b6589ee98632483d0ada7b                                   
Author:     Lai Jiangshan <laijs.com>
AuthorDate: 2010-10-12 15:14:17 +0800
Commit:     Eric Blake <eblake>
CommitDate: 2010-10-13 07:52:33 -0600

    virsh: support single quote
    
    Some users may type command like this at the virsh shell:
    virsh # somecmd 'some arg'
    
    because they often use single quote in linux shell.
    
    Signed-off-by: Lai Jiangshan <laijs.com>

git describe: v0.8.4-97-g57868d1 contains: v0.8.5~146


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