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 #1

Updated by Ian Ballou almost 4 years ago

  • Target version set to Katello 4.0.0
  • Triaged changed from No to Yes
Actions #2

Updated by Justin Sherrill almost 4 years ago

  • Target version changed from Katello 4.0.0 to Katello 4.0.1
Actions #3

Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ian Ballou
  • Pull request https://github.com/Katello/katello/pull/9307 added
Actions #4

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases Katello 4.2.0 added
Actions #5

Updated by Anonymous over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Ian Ballou over 3 years ago

  • Has duplicate Bug #32485: CentOS 8 Stream provisioning does not work on 4.0 added
Actions

Also available in: Atom PDF