Bug 208413

Summary: No error message when image file creation fails
Product: [Fedora] Fedora Reporter: Mark McLoughlin <markmc>
Component: virt-managerAssignee: Hugh Brock <hbrock>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: hbrock, rjones, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.5.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-12 19:51:58 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:

Description Mark McLoughlin 2006-09-28 14:05:36 UTC
When creating a new domain, if you enter a path to a file in a directory which
doesn't exist, then domain creation fails with no error message.

Just this traceback on the console:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.4/threading.py", line 442, in __bootstrap
    self.run()
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 35, in run
    threading.Thread.run(self)
  File "/usr/lib64/python2.4/threading.py", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 358, in do_install
    guest.start_install(False)
  File "/usr/lib/python2.4/site-packages/xeninst/ParaVirtGuest.py", line 194, in
start_install
    return XenGuest.XenGuest.start_install(self, consolecb)
  File "/usr/lib/python2.4/site-packages/xeninst/XenGuest.py", line 278, in
start_install
    self._create_devices()
  File "/usr/lib/python2.4/site-packages/xeninst/XenGuest.py", line 192, in
_create_devices
    disk.setup()
  File "/usr/lib/python2.4/site-packages/xeninst/XenGuest.py", line 53, in setup
    fd = os.open(self.path, os.O_WRONLY | os.O_CREAT)
OSError: [Errno 2] No such file or directory: '/foo/bar.img'

Comment 1 Daniel Berrangé 2006-10-27 14:40:29 UTC
We need to prompt the user to confirm whether they want us to create the
directory, or let then choose a different directory. Also need to check the dir
is writable too, and warn them if they choose something which is not /xen when
SELinux is enabled.



Comment 2 Hugh Brock 2007-06-14 16:31:59 UTC
You know, none of this was a problem when we made the user use the file chooser
dialog to choose their file, rather than entering the path and the file by hand.
Now we are slowly re-implementing the file chooser dialog in our own code. Are
we sure we don't want to just remove the manual path entry?

Comment 3 Daniel Berrangé 2007-06-14 16:34:07 UTC
We need to have validation here. Medium term the file chooser will have to go
away because its useless when managing a remote maachine. We'll have storage
maangement APIs in libvirt to enumerate existing images in directories, and/or
allocate new ones.


Comment 4 Hugh Brock 2007-06-18 16:58:43 UTC
OK, fine, but in that case I think we ought to wait for the storage management
APIs to be finished before we start implementing validation. One hopes that that
will keep us from having to do things like "warn them if they choose something
which is not /xen when SELinux is enabled" and other horrible spaghetti...

Comment 5 Red Hat Bugzilla 2007-07-25 02:06:03 UTC
change QA contact

Comment 6 Cole Robinson 2008-03-12 19:51:58 UTC
The validation for this has been present for some time, and is definitely
present in f7 and f8. Closing as CURRENTRELEASE.