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'
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.
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?
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.
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...
change QA contact
The validation for this has been present for some time, and is definitely present in f7 and f8. Closing as CURRENTRELEASE.