Bug 747545 - virt-clone display wrong error messages with --prompt
Summary: virt-clone display wrong error messages with --prompt
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virtinst
Version: unspecified
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-20 08:46 UTC by Daisy Wu
Modified: 2014-07-06 19:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-31 22:23:49 UTC


Attachments (Terms of Use)

Description Daisy Wu 2011-10-20 08:46:45 UTC
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 23:17:12 UTC
Not urgent, and given reduced capacity for virt-manager/virtinst, just moving
this to the upstream tracker.

Comment 3 Cole Robinson 2012-01-31 22:23:49 UTC
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.