CentOS 8 Provisioning (how does @additional_media get populated)?

Hi, I’m running foreman 1.24.1/Katello 3.14 and I’m running into the AppStream repo isue while trying to kickstart CentOS 8. I’ve read all the bug reports, and the template changes that are needed, but I can’t for the life of me figure out what I need to do to get @additional_media populated with the url of the AppStream repo. Can anyone provide some insight ?



we have run into the exact same issue yesterday.
We have yet to actually try this today, but looking at the tests from the PR that I was able to find, it looks like that needs to be an array of hashes in the form of [{name: 'EPEL', url: 'http://yum.example.com/epel'}].
I will report back once we got it working.


1 Like

Hi all,

I found the solution. You need to add the “additional_media” parameter as a string to your operating system.
It should looks like this:


Thank you

You’re welcome.
These are the available parameters for additional_media (took this from the infos from the PR):

  • name: Repo name, no spaces
  • comment: Repo comment
  • url: Repo URL
  • gpgkey: GPG key URL
  • install: Install repo on system for after boot

Just for completeness:

  1. Parameter-Types were added pretty recently, so most pre-existing stuff receiving structured data from parameters is likely to expect the data as string type.

  2. The documentation on how the additional_media-parameter has to be formatted is (unfortunately) hidden in the source-code (as @phils3r correctly mentioned):

Actually, I believe this is a bug. What adds this “magically” is the Katello plugin in app/services/katello/managed_content_medium_provider.rb. When it sees a repository with AppStream variant in the name, it automatically adds it to the additional_media. Probably it does not work correctly. Can you investigate the database table

host = Host.find_by_name("host.in.question")
product_id = host.try(:content_facet).try(:kickstart_repository).try(:product_id) || host.try(:kickstart_repository).try(:product_id)
distro = distribution_repositories(host)
              distribution_variant: variant,
              "#{Katello::Product.table_name}.id": product_id

Foreman core does not have this behavior at all, also this can be considered as a bug that needs to be fixed.

But it’s good to know in general and is useful for every (other) OS (fedora, debian based and SUSE based).
Are there plans to integrate this parameter in a more official way to the operating system GUI?

F.e. create another/more installation media(s) and add it to the operating system below the first media as “additional installation media”.

Another question. I want to documentate this parameter somehow. Where is the right place for this. Is it here?:

I’m not meaning to be persnickety… but take a look at Make additional repositories available during kickstart (RH operating systems) I thought that additional_media was something I could/should be using, but at the time, it was an internal use only construct.

I’ll be following this thread.

Not at the moment. Only RHEL/CentOS currently actually require additional medium to be present to be able to complete OS installation process. In the past, our users always have been adding additional media by changing templates or via post scripts.

This smells like M:N relation between host/hostgroup and installation media. We already have that, for provisioning templates and it’s such a pain for users to set provisioning up. You need to go to os and select which templates you want to associate, then templates, associate valid templates and finally go back to os to pick default templates. The very same story for IM.

But if theres enough demand, we can consider putting this onto scrum.