Bug 517293 - virt-manager storage browser ISO/disk callback mixup
virt-manager storage browser ISO/disk callback mixup
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
rawhide
All Linux
high Severity medium
: ---
: ---
Assigned To: Cole Robinson
Fedora Extras Quality Assurance
: Reopened
: 521672 (view as bug list)
Depends On:
Blocks: F12VirtBlocker
  Show dependency treegraph
 
Reported: 2009-08-13 08:19 EDT by Tim Waugh
Modified: 2009-09-18 12:23 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-18 12:23:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Tim Waugh 2009-08-13 08:19:42 EDT
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 14:54:48 EDT
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 02:35:49 EDT
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 07:47:14 EDT
(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 11:27:40 EDT
*** Bug 521672 has been marked as a duplicate of this bug. ***
Comment 5 Cole Robinson 2009-09-14 12:05:27 EDT
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 02:45:31 EDT
> 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 12:23:20 EDT
(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.