Bug 747545

Summary: virt-clone display wrong error messages with --prompt
Product: [Community] Virtualization Tools Reporter: Daisy Wu <jwu>
Component: virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: berrange, jwu, mzhan, rwu, zhpeng
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
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: ---

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.