Bug 675753 - virt-install tries to process empty arguments and errors on them
Summary: virt-install tries to process empty arguments and errors on them
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-07 16:13 UTC by Gurhan Ozen
Modified: 2011-06-10 02:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-08 16:09:18 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Gurhan Ozen 2011-02-07 16:13:59 UTC
Description of problem:

# /usr/sbin/virt-install --name x86_64_hvm_guest --cdrom /var/lib/libvirt/images/x86_64_hvm_guest.iso --nonsparse --hvm --file /var/lib/libvirt/images/x86_64_hvm_guest -s 5 --debug   --prompt --accelerate --os-variant=virtio26 --network bridge:br0 --noreboot --vnc ""
Mon, 07 Feb 2011 11:05:40 DEBUG    Launched with command line:
/usr/sbin/virt-install --name x86_64_hvm_guest --cdrom /var/lib/libvirt/images/x86_64_hvm_guest.iso --nonsparse --hvm --file /var/lib/libvirt/images/x86_64_hvm_guest -s 5 --debug --prompt --accelerate --os-variant=virtio26 --network bridge:br0 --noreboot --vnc 
Mon, 07 Feb 2011 11:05:40 ERROR    Unknown argument ''

Notice the "" at the end of the virt-install command line 

Version-Release number of selected component (if applicable):
# rpm -qf /usr/sbin/virt-install
python-virtinst-0.500.5-1.el6.noarch

How reproducible:
Very. 

Steps to Reproduce:
1. Try to launch virt-install with empty strings in the command line. 
2.
3.
  
Actual results:
Fails

Expected results:
Succeed

Additional info:
This might not sound like a big deal but the beaker/rhts automated virtualization tests are relying on this because of the way Expect works. We'll try to find a remedy in the meantime but if this could be looked at it would be great. This is a regression if accepted as a bug since we didn't run into this issue before.

Comment 2 Brock Organ 2011-03-01 14:42:57 UTC
Reporter,

Could I please ask you to provide a priority assessment (set the priority field to one of urgent/high/medium/low) for the impact of this issue?  This will help us prioritize this issue with our other outstanding bugs for the current release cycle ...

Regards,

Brock

Comment 3 Cole Robinson 2011-03-08 16:09:18 UTC
virt-install was patched to print an explicit error for spurious commandline parameters. Main motivation was so that cli like

virt-install ... --extra-args console=tty0 console=ttyS0

would now error with

Unknown argument 'console=ttyS0'

since the user forgot to quote the whole string.

I could alter virt-install to ignore empty string arguments, but that's kind of a hack, and it sounds like you've found a workaround anyways.

Granted this could cause 'regressions' for people who have been using incorrect virt-install commands up to this point, but I think it's better to be strict in this case for the sake of users building new virt-install commands that want to be warned about an incorrectly crafted option.

Closing as WONTFIX. Please reopen if this isn't satisfactory


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