This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 370221 - virt-install "Invalid file location given" when install RHEL guests
virt-install "Invalid file location given" when install RHEL guests
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
7
All Linux
low Severity high
: ---
: ---
Assigned To: Daniel Berrange
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-07 14:46 EST by Davidson Paulo
Modified: 2007-11-30 17:12 EST (History)
3 users (show)

See Also:
Fixed In Version: 0.200.0-4.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-28 20:38:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 325591 None None None Never

  None (edit)
Description Davidson Paulo 2007-11-07 14:46:04 EST
+++ This bug was initially created as a clone of Bug #325591 +++

Description of problem:
When attempting to install a RHEL-5 guest on F-8 Test3 (plus latest updates),
using this command-line:

# virt-install -d -n manage -r 512 -f /var/lib/xen/images/manage.dsk -s 10
--nonsparse -p --nographics -l
nfs:bigpapi:/vol/engineering/redhat/rhel5-server-x86_64

I get the following backtrace:

Tue, 09 Oct 2007 09:40:32 DEBUG    Disk path not found: Assuming file disk type.


Starting install...
libvir: Xen Daemon error : GET operation failed: 
Tue, 09 Oct 2007 09:40:32 DEBUG    Preparing mount at
/var/lib/xen/virtinstmnt.ivNS7C
Tue, 09 Oct 2007 09:40:32 DEBUG    Distro None.
Tue, 09 Oct 2007 09:40:32 DEBUG    Acquiring file from
/var/lib/xen/virtinstmnt.ivNS7C/fedora.css
Tue, 09 Oct 2007 09:40:32 DEBUG    Cleaning up mount at
/var/lib/xen/virtinstmnt.ivNS7C
Invalid file location given: No such file or directory
Domain installation may not have been
 successful.  If it was, you can restart your domain
 by running 'virsh start manage'; otherwise, please
 restart your installation.
Tue, 09 Oct 2007 09:40:32 ERROR    Invalid file location given: No such file or
directory
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 485, in <module>
    main()
  File "/usr/sbin/virt-install", line 449, in main
    dom = guest.start_install(conscb,progresscb)
  File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 722, in
start_install
    self._prepare_install(meter)
  File "/usr/lib/python2.5/site-packages/virtinst/ParaVirtGuest.py", line 48, in
_prepare_install
    self._installer.prepare(guest = self, meter = meter)
  File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py", line 683,
in prepare
    self._prepare_kernel_and_initrd(guest, distro, meter)
  File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py", line 653,
in _prepare_kernel_and_initrd
    distro = distro)
  File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py", line 583,
in acquireKernel
    progresscb=progresscb, distro=distro, scratchdir=scratchdir)
  File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py", line 566,
in _storeForDistro
    if store.isValidStore(fetcher, progresscb):
  File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py", line 213,
in isValidStore
    if fetcher.hasFile("fedora.css", progresscb):
  File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py", line 160,
in hasFile
    tmpfile = self.acquireFile(filename, progresscb)
  File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py", line 150,
in acquireFile
    raise ValueError, _("Invalid file location given: ") + msg
ValueError: Invalid file location given: No such file or directory

The problem is in virtinst/DistroManager.py; if you can't find fedora.css in the
FedoraImageStore.isValidStore() method, it stacktraces instead of trying
additional OS's.  That is, *any* PV guest that is not Fedora is going to fail,
since it will stack trace when looking in the directory structure.  In
_storeForDistro, I changed:

    for store in stores:
        if store.isValidStore(fetcher, progresscb):
            return store

to:

    for store in stores:
        try:
            if store.isValidStore(fetcher, progresscb):
                return store
        except:
            continue

which allowed me to start the RHEL-5 install.  This is with
python-virtinst-0.300.1-2.fc8, by the way.

-- Additional comment from mc-al34luc@sbcglobal.net on 2007-10-11 10:16 EST --
Could we *PLEASE* not depend on Fedora distro directory artifacts when trying to
discern if a distro is Fedora / Redhat??? I warned about exactly this problem in
273781. Just implement the solution proposed there moving forward to avoid this
problem in the future. Thanks.

Chris, could you bump up the severity to "high"?


-- Additional comment from berrange@redhat.com on 2007-10-11 11:43 EST --
Created an attachment (id=224491)
Fixed exception handling

The bug is actually in the hasFile method for MountedImageFetcher which is used
for NFS. It was catching  RuntimeError, but the method it calls raises a
ValueError, which isn't a subclass of RuntimeError. This was broken back in
changeset   209:9d8165be6060   which switched from raising RuntimeError to
ValueError, but didn't switch all the callers.

-- Additional comment from berrange@redhat.com on 2007-10-11 14:00 EST --
Fix built into rawhide.

* Thu Oct 11 2007 Daniel P. Berrange <berrange@redhat.com> - 0.300.1-3.fc8
- Fix missing file exception check with NFS installs (rhbz #325591)
Comment 1 Daniel Berrange 2007-11-20 07:52:39 EST
A fix has been submitted to updates-testing & will be available shortly...

python-virtinst-0.200.0-4.fc7
Comment 2 Fedora Update System 2007-11-20 13:04:10 EST
python-virtinst-0.200.0-4.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python-virtinst'
Comment 3 Fedora Update System 2007-11-28 20:38:48 EST
python-virtinst-0.200.0-4.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

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