Bug 747545 - virt-clone display wrong error messages with --prompt
virt-clone display wrong error messages with --prompt
Status: CLOSED WORKSFORME
Product: Virtualization Tools
Classification: Community
Component: virtinst (Show other bugs)
unspecified
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Cole Robinson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-20 04:46 EDT by Daisy Wu
Modified: 2014-07-06 15:31 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-01-31 17:23:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daisy Wu 2011-10-20 04:46:45 EDT
Description of problem:
virt-clone display wrong error messages with --prompt

Version-Release number of selected component (if applicable):
python-virtinst-0.600.0-5.el6
virt-manager-0.9.0-7.el6
libvirt-0.9.4-18.el6
qemu-kvm-0.12.1.2-2.196.el6.x86_64

# uname -a
Linux wjw.nay.redhat.com 2.6.32-206.el6.x86_64 #1 SMP Tue Oct 4 11:51:32 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
always

Steps to Reproduce:
1. Assume there is a shutoff guest.
# virsh list --all
Id Name                 State
----------------------------------
- demo                 shut off

2. Make sure there is no democlone.img under /var/lib/libvirt/images/, run the commond virt-clone --prompt
# virt-clone --prompt
What is the name of the original virtual machine?
demo
What is the name for the cloned virtual machine?
democlone
What would you like to use as the cloned disk (file path) for '/var/lib/libvirt/images/demo.img'?
/var/lib/libvirt/images/democlone. img      
ERROR    Storage object name can only contain alphanumeric, '_', '.', or '-' characters
What would you like to use as the cloned disk (file path) for '/var/lib/libvirt/images/demo.img'?
/var/lib/libvirt/images/democlone.img -s 5
ERROR    Size must be specified for non existent volume path '/var/lib/libvirt/images/democlone.img -s 5'
What would you like to use as the cloned disk (file path) for '/var/lib/libvirt/images/demo.img'?
/var/lib/libvirt/images/democlone.img,size=8
ERROR    Size must be specified for non existent volume path '/var/lib/libvirt/images/democlone.img,size=8'
What would you like to use as the cloned disk (file path) for '/var/lib/libvirt/images/demo.img'?

  
Actual results:
As above.

Expected results:
when type "/var/lib/libvirt/images/democlone.img -s 5", the error message should be "ERROR    Storage object name can only contain alphanumeric, '_', '.', or '-' characters".
when type "/var/lib/libvirt/images/democlone.img,size=8", the error message should be "ERROR    Storage object name can only contain alphanumeric, '_', '.', or '-' characters".
The wrong error messages will mislead customer.

Additional info:
Only under /var/lib/libvirt/images/, virt-clone do checking storage object name. If under other dir, no error messages.
Comment 2 Cole Robinson 2011-12-09 18:17:12 EST
Not urgent, and given reduced capacity for virt-manager/virtinst, just moving
this to the upstream tracker.
Comment 3 Cole Robinson 2012-01-31 17:23:49 EST
This is actually accurate. Libvirt storage volumes have name restrictions, but local file names do not. When you quote the filenames, virtinst correctly thinks you are trying to create the file ./'thing in quotes', which is a legal file name.

The 'size must be specified' error is not something I can reproduce upstream, so closing as WORKSFORME.

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