Bug 639602 - ""virt-list-filesystems" fails to parse the command line argument if the domain name is "#".
""virt-list-filesystems" fails to parse the command line argument if the doma...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
6.1
All Linux
low Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
: Reopened
Depends On: 613593 643624
Blocks: 645519
  Show dependency treegraph
 
Reported: 2010-10-02 09:01 EDT by Humble Chirammal
Modified: 2015-09-27 22:06 EDT (History)
5 users (show)

See Also:
Fixed In Version: libguestfs-1.7.17-4.el6
Doc Type: Bug Fix
Doc Text:
libguestfs documentation did not specify that special characters should be surrounded by quotes or otherwise "escaped" when used with the virt-list-filesystems command at the command line. The following has been added to the libguestfs documentation: Libvirt guest names can contain arbitrary characters, some of which have meaning to the shell such as # and space. You may need to quote or escape these characters on the command line. See the shell manual page sh(1) for details.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 07:45:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
To check the syntax of the vm name (525 bytes, patch)
2010-10-03 02:03 EDT, Humble Chirammal
no flags Details | Diff

  None (edit)
Description Humble Chirammal 2010-10-02 09:01:41 EDT
Description of problem:

"virt-list-filesystems" failed to parse command line argument if the domain name is
"#".


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

Red Hat Enterprise Linux release 6.0 Beta (Santiago)

Kernel : 2.6.32-44.2.el6.x86_64

Package: libguestfs-tools-1.2.7-1.el6.5.x86_64

Arch   : x86_64 

How reproducible:

Always

Steps to Reproduce:

1. Start a guest which has name "#"

2. Make sure that guest is running.

[root@dhcp210-84 ~]# virsh list
 Id Name                 State
----------------------------------
  4 RHEL6-64             running
  6 #                    running


3. Verify the domain name with the below command

[root@dhcp210-84 ~]# virsh domname 6
#

[root@dhcp210-84 ~]# 

4. Run #virt-list-filesystems command as shown below

  [root@dhcp210-84 ~]# virt-list-filesystems -l # /root
virt-ls: no image, VM names or directory to list given
Usage:
     virt-ls [--options] domname directory

     virt-ls [--options] disk.img [disk.img ...] directory


Actual results:

It failed to parse domain name even-though virsh was able to start the guest
with the same name.

Expected results:

There should not be any error.

--Humble
Comment 2 Richard W.M. Jones 2010-10-02 10:19:31 EDT
Requested comments from libvirt developers:
https://www.redhat.com/archives/libvir-list/2010-October/msg00053.html
Comment 4 Humble Chirammal 2010-10-03 02:03:36 EDT
Created attachment 451243 [details]
To check the syntax of the vm name
Comment 5 Richard W.M. Jones 2010-10-04 06:47:18 EDT
This is actually not a bug.  You need to escape
the parameter on the command line, eg:

virt-list-filesystems '#'

However this lead to a very interesting thread on
the upstream mailing list, and there are undoubtedly
other bugs in this area.
Comment 7 Richard W.M. Jones 2010-10-13 08:51:43 EDT
Hugh, dev-ack+ (for 6.1) too.
Comment 8 Richard W.M. Jones 2011-01-04 09:01:55 EST
Fixed in man pages.
Comment 10 Lei Wang 2011-01-21 03:18:27 EST
Tested with libguestfs-1.7.17-10.el6:
Have checked all the virt-* tools manual pages, including:
virt-edit
virt-inspector
virt-list-filesystems
virt-list-partitions
virt-make-fs
virt-resize
virt-tar
virt-win-reg
virt-cat
virt-df
virt-filesystems
virt-inspector2
virt-ls
virt-rescue

All the manual pages have the "SHELL QUOTING" content mentioned in bug 639601 comment 7.
According to the result above, move to VERIFIED.
Comment 13 Laura Bailey 2011-04-19 22:08:06 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
libguestfs documentation did not specify that special characters should be surrounded by quotes or otherwise "escaped" when used with the virt-list-filesystems command at the command line. The following has been added to the libguestfs documentation:

Libvirt guest names can contain arbitrary characters, some of which have meaning to the shell such as # and space. You may need to quote or escape these characters on the command line. See the shell manual page sh(1) for details.
Comment 14 errata-xmlrpc 2011-05-19 07:45:46 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0586.html
Comment 15 errata-xmlrpc 2011-05-19 09:10:36 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0586.html

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