Red Hat Bugzilla – Bug 916875
Incorrect error messages showed when --disk parameter contains special characters
Last modified: 2013-11-21 05:37:00 EST
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:
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
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.
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.
(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?
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
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.
(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
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