Bug 517293 - virt-manager storage browser ISO/disk callback mixup
Summary: virt-manager storage browser ISO/disk callback mixup
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: rawhide
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 521672 (view as bug list)
Depends On:
Blocks: F12VirtBlocker
TreeView+ depends on / blocked
 
Reported: 2009-08-13 12:19 UTC by Tim Waugh
Modified: 2009-09-18 16:23 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-09-18 16:23:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
This patch fixes it for me. (1.18 KB, patch)
2009-08-13 12:19 UTC, Tim Waugh
no flags Details | Diff

Description Tim Waugh 2009-08-13 12:19:42 UTC
Created attachment 357309 [details]
This patch fixes it for me.

Description of problem:
When creating a new guest, using the local file browser to select an ISO image and then a local file browser to select storage for the guest, the pathname is not filled into the widget. (From debugging, I can see that the iso browser callback gets called again instead.)

Version-Release number of selected component (if applicable):
virt-manager-0.8.0-1.fc12

How reproducible:
100%

Steps to Reproduce:
1.New, choose a name, install from local media
2.Use ISO image, click Browse, then Browse Local, select an ISO file
3.Choose OS type and version
4.Accept defaults for RAM and CPU
5.Select managed or other existing storage, click Browse, then Browse Local
6.Select a file.
  
Actual results:
Text entry box remains empty, clicking Forward gives error "A storage path must be specified".

Expected results:
Entry box contains selected pathname.

Comment 1 Mark McLoughlin 2009-08-14 18:54:48 UTC
Good catch Tim

Problem is obvious from the code:

    def browse_iso(self, ignore1=None, ignore2=None):
        self._browse_file(_("Locate ISO Image"),
	                  self.set_iso_storage_path,
                          is_media=True)
	self.window.get_widget("install-local-box").activate()

    def browse_storage(self, ignore1):
        self._browse_file(_("Locate existing storage"),
                          self.set_disk_storage_path,
                          is_media=False)

    def _browse_file(self, dialog_name, callback, folder=None, is_media=False):
        if self.storage_browser == None:
            self.storage_browser = vmmStorageBrowser(self.config, self.conn,
                                                     is_media)
            self.storage_browser.connect("storage-browse-finish",
                                         callback)

browse_iso() gets called first, creating the storage browser and setting the ISO callback, then browse_storage() gets called re-using the storage browser with the wrong callback

Comment 2 Jens Petersen 2009-09-11 06:35:49 UTC
With virt-manager-0.8.0-2.fc12 "browse" iso image pops up
"Choose Storage Volume".  Sounds like the same thing?

Comment 3 Mark McLoughlin 2009-09-11 11:47:14 UTC
(In reply to comment #2)
> With virt-manager-0.8.0-2.fc12 "browse" iso image pops up
> "Choose Storage Volume".  Sounds like the same thing?  

No, that's as designed - the problem we're talking about here is if you then use the Browse Local button in that dialog

Comment 4 Cole Robinson 2009-09-14 15:27:40 UTC
*** Bug 521672 has been marked as a duplicate of this bug. ***

Comment 5 Cole Robinson 2009-09-14 16:05:27 UTC
Thanks for the patch, I've pushed a similar fix upstream now:

http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virt-manager--devel/rev/486cd6791c39

Fixed in virt-manager-0.8.0-3.fc12

Comment 6 Jens Petersen 2009-09-18 06:45:31 UTC
> Fixed in virt-manager-0.8.0-3.fc12  

Unfortunately not - I still see the volume dialog
when I try to browse for a local iso image.

Comment 7 Cole Robinson 2009-09-18 16:23:20 UTC
(In reply to comment #6)
> > Fixed in virt-manager-0.8.0-3.fc12  
> 
> Unfortunately not - I still see the volume dialog
> when I try to browse for a local iso image.  

That is intentional, and not what this bug is tracking. You can still launch a local file browser from the 'volume' dialog with the 'Browse Local' button.

The 'volume' dialog is needed if users want to install a remote VM, or access media that is shared via a libvirt storage pool, but not directly accessible by the regular user.


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