Project

General

Profile

Bug #31801

Katello not able to handle kickstarts with multiple variants effectively

Added by Partha Aji 12 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
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

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

Associated revisions

Revision 397f6a2a (diff)
Added by Ian Ballou 9 months ago

Fixes #31801 - Katello not handling multiple kickstart variants (#9307)

History

#1 Updated by Ian Ballou 12 months ago

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

#2 Updated by Justin Sherrill 12 months ago

  • Target version changed from Katello 4.0.0 to Katello 4.0.1

#3 Updated by The Foreman Bot 9 months ago

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

#4 Updated by The Foreman Bot 9 months ago

  • Fixed in Releases Katello 4.2.0 added

#5 Updated by Anonymous 9 months ago

  • Status changed from Ready For Testing to Closed

#6 Updated by Ian Ballou 9 months ago

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

Also available in: Atom PDF