Bug 499718

Summary: virtinst incorrectly guesses os variant from F11Preview .treeinfo
Product: [Fedora] Fedora Reporter: Aron Griffis <aron.griffis>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 11CC: berrange, crobinso, markmc, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.400.3-10.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-07 03:10:56 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:
Bug Depends On:    
Bug Blocks: 480594    

Description Aron Griffis 2009-05-07 19:05:57 UTC
Description of problem:

$ virt-install --name=f11p-vm1 --ram=256 --hvm --location=http://md2020.nashua/install/x86_64/fedora11preview/ --file=/dev/VolGroup00/f11p-vm1 --vnc --vncport=5902 --noautoconsole
Starting install...
Retrieving file .treeinfo...                                                                                                                         | 1.2 kB     00:00     
Retrieving file vmlinuz...                                                                                                                           | 3.0 MB     00:00     
Retrieving file initrd.img...                                                                                                                        |  19 MB     00:00     
OS variant 'fedora11-preview; does not exist in our dictionary for OS type 'linux'
Domain installation may not have been
 successful.  If it was, you can restart your domain
 by running 'virsh start f11p-vm1'; otherwise, please
 restart your installation.
ERROR    OS variant 'fedora11-preview; does not exist in our dictionary for OS type 'linux'
Traceback (most recent call last):
  File "/usr/bin/virt-install", line 780, in <module>
    main()
  File "/usr/bin/virt-install", line 678, in main
    start_time, guest.start_install)
  File "/usr/bin/virt-install", line 733, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 539, in start_install
    self._prepare_install(meter)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 594, in _prepare_install
    meter = meter)
  File "/usr/lib/python2.6/site-packages/virtinst/DistroInstaller.py", line 233, in prepare
    self._prepare_kernel_and_initrd(guest, distro, meter)
  File "/usr/lib/python2.6/site-packages/virtinst/DistroInstaller.py", line 192, in _prepare_kernel_and_initrd
    guest.os_variant = os_variant
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 240, in set_os_variant
    {'var' : val, 'ty' : self._os_type}
ValueError: OS variant 'fedora11-preview; does not exist in our dictionary for OS type 'linux'

Version-Release number of selected component (if applicable):
python-virtinst-0.400.3-7.fc11.noarch on Fedora11 Preview

How reproducible:
every time

Steps to Reproduce:
1. mount -o loop Fedora-11-Preview-x86_64-DVD.iso on webserver
2. run virt-install on F11 Preview test machine with --location pointing to webserver

Comment 1 Aron Griffis 2009-05-07 19:14:40 UTC
Appears I can work around the bug with --os-type=linux --os-variant=fedora10

Comment 2 Aron Griffis 2009-05-07 19:15:28 UTC
but then I run into bug 499711

Comment 3 Mark McLoughlin 2009-05-07 19:19:59 UTC
.treeinfo:

[general]
family = Fedora
timestamp = 1240506055.63
variant = Fedora
totaldiscs = 1
version = 11-Preview
discnum = 1
packagedir = 
arch = x86_64


Here's the code in question:

            if ret:
                ver = self.treeinfo.get("general", "version")
                if ver == "development":
                    self.os_variant = self._latestFedoraVariant()
		elif ver:
                    self.os_variant = "fedora" + str(ver)

i.e. we're doing "fedora" + "11-Preview"

Comment 4 Cole Robinson 2009-05-07 21:06:44 UTC
Fixed here:

http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virtinst--devel/rev/9768e52d4d62

Hopefully future proofing it:

http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virtinst--devel/rev/db997572bdc8

Also, Aron, you can just use --os-variant fedora11 to work around it.

Comment 5 Bug Zapper 2009-06-09 15:23:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Cole Robinson 2009-06-18 15:06:07 UTC
This is fixed upstream, moving to POST.

Comment 7 Fedora Update System 2009-10-05 18:10:28 UTC
python-virtinst-0.400.3-10.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/python-virtinst-0.400.3-10.fc11

Comment 8 Fedora Update System 2009-10-05 18:25:13 UTC
python-virtinst-0.400.3-4.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/python-virtinst-0.400.3-4.fc10

Comment 9 Fedora Update System 2009-10-07 03:10:45 UTC
python-virtinst-0.400.3-4.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2009-10-07 03:14:04 UTC
python-virtinst-0.400.3-10.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.