Bug 434786

Summary: virt-install is now interactive
Product: Red Hat Enterprise Linux 5 Reporter: Alexander Todorov <atodorov>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: crobinso, jlaska, xen-maint
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHEA-2008-0371 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 16:45:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Remove check for file existence
none
add --force option
none
add --force option to cli utilities (the actual patch this time)
none
Add --force option to cli utils.
none
Remove check for file existence in cli tools. none

Description Alexander Todorov 2008-02-25 14:32:45 UTC
Description of problem:
New feature in virt-install that will check for disk file existence makes it
interactive and breaks automated instllations of virtual guests.

Version-Release number of selected component (if applicable):
python-virtinst-0.300.2-3.el5

How reproducible:
100%

Steps to Reproduce:
1. virt-install -n test -r 512 -f /tmp/test.img -s 5 --vnc -p -l
http://server/path. The /tmp/test.img file is created
2. Shutdown the domain "test" and delete it
3. Run 1) again. The file /tmp/test.img exists and user is prompted to verify of
they wish to overwrite.
  
Actual results:
virt-install prompt:
Do you really want to use the file (yes or no)? 

Expected results:
virt-install proceeds unattended.


Additional info:
The problem has been discussed upstream:
https://www.redhat.com/archives/et-mgmt-tools/2008-February/msg00140.html

Comment 2 James Laska 2008-02-26 14:13:31 UTC
This is impacted our automated cd|dvd installation tests that use xen.  We can
change our test scripts to adjust, but the mailing thread seems to indicate this
is a common workflow (scripting around virt-install).

Let's use this bug to track adding a new cmdline option to virt-install.

  -y|--yes      or
  -f|--force 

I'd like to request this for inclusion post-beta.  Thoughts?

Comment 3 Daniel Berrangé 2008-02-26 14:26:31 UTC
This check is frankly a complete waste of time & should never have been added
upstream - using an existing pre-allocated file is very common use case.
Checking if the file is used in a existing VM is fine, but complaining merely
because the file exists is wrong. The check in question needs to be removed
completely, and there is no need for  a '--force' flag.

Comment 4 James Laska 2008-02-26 14:36:25 UTC
Thanks for your thoughts Daniel, here here! :)

Comment 6 Cole Robinson 2008-03-05 21:48:31 UTC
Removing the file check is definitely a plus, but I think a --force option is a
good path to avoid any of these issues in the future.

Comment 7 Cole Robinson 2008-03-05 21:49:37 UTC
Created attachment 296947 [details]
Remove check for file existence

Comment 8 Cole Robinson 2008-03-05 21:58:26 UTC
Created attachment 296949 [details]
add --force option

Posted upstream, if no one objects I'll commit by end of the day tomorrow. At
the very least for 5.2 we should take in the first patch (remove file existence
check) but my vote is for the --force option as well to provide users with a
way to avoid any prompting issues in the future.

Comment 9 Bill Burns 2008-03-05 22:03:04 UTC
dev ack for dan...


Comment 10 Alexander Todorov 2008-03-06 09:39:17 UTC
(In reply to comment #8)
> Created an attachment (id=296949) [edit]
> add --force option

That patch is the same as in comment #7. Can you attach the correct one please.

Comment 11 Cole Robinson 2008-03-06 14:58:15 UTC
Created attachment 297055 [details]
add --force option to cli utilities (the actual patch this time)

Whoops, sorry about that! Here's the actual patch. This was ack'd for upstream
so I'll pull both of these patches in for 5.2.

Comment 12 Cole Robinson 2008-03-07 16:22:47 UTC
Created attachment 297203 [details]
Add --force option to cli utils.

This version actually applies to cvs. Its made up of upstream csets 350, 351,
352, and 374 (the actual force option change). The 35* csets were some not too
intrusive cli reworks that the force change depends on, otherwise it would be a
pretty ugly patch and needless fork.

Comment 13 Cole Robinson 2008-03-07 16:23:56 UTC
Created attachment 297204 [details]
Remove check for file existence in cli tools.

This applies after the force option patch. Upstream cset 365.

Comment 14 Cole Robinson 2008-03-07 17:39:30 UTC
Committed and built:

$ brew latest-pkg dist-5E-qu-candidate python-virtinst
Build                                     Tag                   Built by
----------------------------------------  --------------------  ----------------
python-virtinst-0.300.2-6.el5             dist-5E-qu-candidate  crobinso


Comment 17 errata-xmlrpc 2008-05-21 16:45:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2008-0371.html