Bug 916875 - Incorrect error messages showed when --disk parameter contains special characters
Summary: Incorrect error messages showed when --disk parameter contains special charac...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 916878
TreeView+ depends on / blocked
 
Reported: 2013-03-01 07:54 UTC by tingting zheng
Modified: 2013-11-21 10:37 UTC (History)
8 users (show)

Fixed In Version: python-virtinst-0.600.0-18.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 916878 (view as bug list)
Environment:
Last Closed: 2013-11-21 10:37:00 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1604 normal SHIPPED_LIVE python-virtinst bug fix and enhancement update 2013-11-20 21:39:12 UTC

Description tingting zheng 2013-03-01 07:54:55 UTC
Description of problem:
Incorrect error messages showed when --disk parameter contains special characters

Version-Release number of selected component (if applicable):
python-virtinst-0.600.0-15.el6.noarch
libvirt-0.10.2-18.el6.x86_64
virt-manager-0.9.0-18.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Add special characters to --disk paramter,eg:"#","%","!"
# virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test#test.img,size=3G --ram 512 --graphics vnc
ERROR    Error with storage parameters: Size must be specified for non existent volume path '/var/lib/libvirt/images/test'

# virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test\#test.img,size=3G --ram 512 --graphics vnc
ERROR    Error with storage parameters: Size must be specified for non existent volume path '/var/lib/libvirt/images/test'


# virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test%test.img,size=3G --ram 512 --graphics vnc
ERROR    Improper value for 'size': invalid literal for float(): 3G


# virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test!test.img,size=3G --ram 512 --graphics vnc
-bash: !test.img,size=3G: event not found

Actual results:
Incorrect error messages showed when --disk parameter contains special characters

Expected results:
Correct error messages showed,if can not add these special characters on --disk,right prompt showed.

Additional info:

Comment 3 Martin Kletzander 2013-03-11 15:09:20 UTC
Moving to POST:

commit 7a18271ff3d2680f6ac7dc0eca1bc7d7fac8cee7
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Mon Mar 11 15:38:55 2013 +0100

    Don't support comments in parsed parameters

Comment 5 tingting zheng 2013-07-19 07:40:12 UTC
Tested with:
python-virtinst-0.600.0-17.el6.noarch

# virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22#test.img,size=6 --ram 512 --graphics vnc 
ERROR    Error with storage parameters: Size must be specified for non existent volume path '/var/lib/libvirt/images/test22'

# virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22\#test.img,size=6 --ram 512 --graphics vnc 
ERROR    Error with storage parameters: Size must be specified for non existent volume path '/var/lib/libvirt/images/test22'

# virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22%test.img,size=6 --ram 512 --graphics vnc 
ERROR    Error with storage parameters: Storage object name can only contain alphanumeric, '_', '.', or '-' characters

# virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22!test.img,size=6 --ram 512 --graphics vnc 
-bash: !test.img,size=6: event not found

Seems only the third one is fixed,other three issues are not fixed,so move back to ASSIGNED.

Comment 6 Martin Kletzander 2013-07-22 08:39:03 UTC
What is the output if you prepend 'echo' before the first and second command?

Output of the third command hadn't changed, the 'size=3G' was invalid in the description, virt-install only supports numbers without suffixes to specify the size of the volume.

There is no error in fourth command as the error message comes from your shell (hence the 'bash:'), exclamation mark is an operator (and a great one actually), see "HISTORY EXPANSION" section of bash(1) manual.

Comment 7 tingting zheng 2013-07-22 08:58:57 UTC
(In reply to Martin Kletzander from comment #6)
> What is the output if you prepend 'echo' before the first and second command?
>

# echo virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22#test.img,size=6 --ram 512 --graphics vnc 
virt-install -n test1 -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22#test.img,size=6 --ram 512 --graphics vnc

# echo virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22\#test.img,size=6 --ram 512 --graphics vnc 
virt-install -n test1 -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22#test.img,size=6 --ram 512 --graphics vnc


> Output of the third command hadn't changed, the 'size=3G' was invalid in the
> description, virt-install only supports numbers without suffixes to specify
> the size of the volume.

Yes,the third command has fixed if I use size=3,refer to comment 5 error.

> There is no error in fourth command as the error message comes from your
> shell (hence the 'bash:'), exclamation mark is an operator (and a great one
> actually), see "HISTORY EXPANSION" section of bash(1) manual.

So does it mean no need to fix the fourth command from python-virtinst?

Comment 8 Martin Kletzander 2013-07-22 11:37:55 UTC
I've found out the problem for those first two, I forgot to backport one missing patch, thanks for helping out.  The fix will be in next package.  Nothing to fix in the fourth command, if you want to add an exclamation mark you must escape it, either as:

virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22\!test.img,size=6 --ram 512 --graphics vnc

or:

virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk '/var/lib/libvirt/images/test22!test.img,size=6' --ram 512 --graphics vnc

Comment 11 zhengqin 2013-08-19 07:42:24 UTC
Tested with:
python-virtinst-0.600.0-18.el6.noarch
virt-manager-0.9.0-19.el6.x86_64


# virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22#test.img,size=6 --ram 512 --graphics vnc 
ERROR    Error with storage parameters: Storage object name can only contain alphanumeric, '_', '.', or '-' characters


# virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22\#test.img,size=6 --ram 512 --graphics vnc 
ERROR    Error with storage parameters: Storage object name can only contain alphanumeric, '_', '.', or '-' characters

virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22%test.img,size=6 --ram 512 --graphics vnc 

So move the bug to VERIFIED.

Comment 12 zhengqin 2013-08-19 07:58:15 UTC
(In reply to zhengqin from comment #11)
> Tested with:
> python-virtinst-0.600.0-18.el6.noarch
> virt-manager-0.9.0-19.el6.x86_64
> 
> 
> # virt-install -n test1  -l
> http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/
> Server/x86_64/os/ --disk /var/lib/libvirt/images/test22#test.img,size=6
> --ram 512 --graphics vnc 
> ERROR    Error with storage parameters: Storage object name can only contain
> alphanumeric, '_', '.', or '-' characters
> 
> 
> # virt-install -n test1  -l
> http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/
> Server/x86_64/os/ --disk /var/lib/libvirt/images/test22\#test.img,size=6
> --ram 512 --graphics vnc 
> ERROR    Error with storage parameters: Storage object name can only contain
> alphanumeric, '_', '.', or '-' characters
> 
> virt-install -n test1  -l
> http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/
> Server/x86_64/os/ --disk /var/lib/libvirt/images/test22%test.img,size=6
> --ram 512 --graphics vnc 
> 
> So move the bug to VERIFIED.

Missed the results here:
#virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22%test.img,size=6 --ram 512 --graphics vnc 
ERROR    Error with storage parameters: Storage object name can only contain
alphanumeric, '_', '.', or '-' characters


Additional Info:
I can reproduce with version: 
python-virtinst-0.600.0-15.el6.noarch
libvirt-0.10.2-18.el6.x86_64
virt-manager-0.9.0-18.el6.x86_64

Comment 13 errata-xmlrpc 2013-11-21 10:37:00 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.

http://rhn.redhat.com/errata/RHBA-2013-1604.html


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