Project

General

Profile

Actions

Bug #31801

closed

Katello not able to handle kickstarts with multiple variants effectively

Added by Partha Aji almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Referenced from this thread https://community.theforeman.org/t/centos-8-baseos-thinks-it-is-appstream/22206/4

Kickstart repos related to Centos 8 tend to have multiple variants. For example http://mirror.centos.org/centos/8/BaseOS/x86_64/kickstart/.treeinfo has 2 variants while http://mirror.centos.org/centos/8/AppStream/x86_64/kickstart/.treeinfo has only one.

If I synced baseos first Katello seems to arbitrarily pick the first variant and assign it to the repository

Check out https://github.com/Katello/katello/blob/master/app/services/katello/pulp3/repository/yum.rb#L53 with the following code.

        def import_distribution_data
          distribution = ::Katello::Pulp3::Distribution.fetch_content_list(repository_version: repo.version_href)
          if distribution.results.present?
            repo.update!(
              :distribution_version => distribution.results.first.release_version,
              :distribution_arch => distribution.results.first.arch,
              :distribution_family => distribution.results.first.release_name,
              :distribution_bootable => self.class.distribution_bootable?(distribution)
            )
            unless distribution.results.first.variants.empty?
              unless distribution.results.first.variants.first.name.nil?
                repo.update!(:distribution_variant => distribution.results.first.variants.first.name)
              end
            end
          end
        end

Notice that it picks only the first variant.


Related issues 1 (0 open1 closed)

Has duplicate Katello - Bug #32485: CentOS 8 Stream provisioning does not work on 4.0DuplicateActions
Actions

Also available in: Atom PDF