Bug 751256 - Fedora 16 import fails
Summary: Fedora 16 import fails
Keywords:
Status: CLOSED DUPLICATE of bug 743619
Alias: None
Product: Fedora
Classification: Fedora
Component: cobbler
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: James C.
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-04 03:52 UTC by Adam Miller
Modified: 2012-04-17 00:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-17 00:57:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
VALID_OS_VERSIONS patch (909 bytes, patch)
2011-11-04 03:52 UTC, Adam Miller
no flags Details | Diff

Description Adam Miller 2011-11-04 03:52:21 UTC
Created attachment 531690 [details]
VALID_OS_VERSIONS patch

Description of problem:

Can't import a Fedora 16 image into cobbler, version string mismatch

Version-Release number of selected component (if applicable):
cobbler-2.0.11-3.fc16.noarch

How reproducible:
Every time

Steps to Reproduce:
1.cobbler import --path=/mnt/distro/ --name=Fedora16 --arch=x86_64 --breed=redhat

  
Actual results:

received on stderr: 
adding distros
scanning /var/www/cobbler/ks_mirror/Fedora16/images/pxeboot for distro signature
scanning /var/www/cobbler/ks_mirror/Fedora16/images for distro signature
scanning /var/www/cobbler/ks_mirror/Fedora16 for distro signature
found content (breed=redhat) at /v
creating new distro: Fedora16-x86_64
creating new profile: Fedora16-x86_64
associating repos
traversing distro Fedora16-x86_64
scanning /var/www/cobbler/ks_mirror/Fedora16/images/pxeboot for distro signature
scanning /var/www/cobbler/ks_mirror/Fedora16/images for distro signature
scanning /var/www/cobbler/ks_mirror/Fedora16 for distro signature
found content (breed=redhat) at /v
descent into /var/www/cobbler/ks_mirror/Fedora16
processing repo at : /var/www/cobbler/ks_mirror/Fedora16
need to process repo/comps: /var/www/cobbler/ks_mirror/Fedora16
looking for /var/www/cobbler/ks_mirror/Fedora16/repodata/*comps*.xml
running: createrepo -c cache -s sha --groupfile /var/www/cobbler/ks_mirror/Fedora16/repodata/d7017d949b6f30725d20ee3ef45d9fa03d603464b9d411e056af2fddf5ceb608-Fedora-16-comps.xml /var/www/cobbler/ks_mirror/Fedora16
received on stdout: Spawning worker 0 with 3107 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

received on stderr: 
associating kickstarts
scanning /var/www/cobbler/ks_mirror/Fedora16/images/pxeboot for distro signature
scanning /var/www/cobbler/ks_mirror/Fedora16/images for distro signature
scanning /var/www/cobbler/ks_mirror/Fedora16 for distro signature
found content (breed=redhat) at /v
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: '--os-version for breed redhat must be one of rhel2.1, rhel3, rhel4, rhel5, rhel6, fedora5, fedora6, fedora7, fedora8, fedora9, fedora10, fedora11, fedora12, fedora13, fedora14, fedora15, generic24, generic26, virtio26, other, given was fedora16'
Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 95, in run
    rc = self._run(self)
   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 225, in runner
    self.logger
   File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 659, in import_tree
    return importer.run()
   File "/usr/lib/python2.7/site-packages/cobbler/action_import.py", line 227, in run
    self.kickstart_finder(distros_added)
   File "/usr/lib/python2.7/site-packages/cobbler/action_import.py", line 300, in kickstart_finder
    distro.set_os_version(version)
   File "/usr/lib/python2.7/site-packages/cobbler/item_distro.py", line 174, in set_os_version
    return utils.set_os_version(self,os_version)
   File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 1258, in set_os_version
    raise CX(_("--os-version for breed %s must be one of %s, given was %s") % (self.breed, nicer, os_version))

!!! TASK FAILED !!!




Turns out you just need to add fedora16 to the VALID_OS_VERSIONS dictionary in /usr/lib/python2.7/site-packages/cobbler/codes.py (line 44) ... I made a patch and attached it even though its tiny. :)

Comment 1 Ade Bradshaw 2012-01-21 13:50:05 UTC
I can confirm this bug also and that just adding fedora16 to the codes.py fixes it

Comment 2 Fedora Admin XMLRPC Client 2012-04-11 22:00:07 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 James C. 2012-04-17 00:57:10 UTC

*** This bug has been marked as a duplicate of bug 743619 ***


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