Bug 751256 - Fedora 16 import fails
Fedora 16 import fails
Status: CLOSED DUPLICATE of bug 743619
Product: Fedora
Classification: Fedora
Component: cobbler (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: James C.
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-03 23:52 EDT by Adam Miller
Modified: 2012-04-16 20:57 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-16 20:57:10 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)
VALID_OS_VERSIONS patch (909 bytes, patch)
2011-11-03 23:52 EDT, Adam Miller
no flags Details | Diff

  None (edit)
Description Adam Miller 2011-11-03 23:52:21 EDT
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 08:50:05 EST
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 18:00:07 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 James C. 2012-04-16 20:57:10 EDT

*** 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.