Bug 675753

Summary: virt-install tries to process empty arguments and errors on them
Product: Red Hat Enterprise Linux 6 Reporter: Gurhan Ozen <gozen>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: bpeck, dallan, dyuan, jburke, pbunyan, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-08 16:09:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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