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. :)
I can confirm this bug also and that just adding fedora16 to the codes.py fixes it
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
*** This bug has been marked as a duplicate of bug 743619 ***