Can't Kickstart CentOS 8

Looks bad, we need someone from @katello team to take a look and analyze what we can do with this.

We installed the CentOS 8 ISO as a stopgap measure and were able to create systems. There are still too many other problems for production. Maybe all will be resolved by the time Foreman/Katello is fixed. For now, we’ll stick with 7.

This issue can be fixed by syncing the AppStream repo, which Katello will detect and send over to Anaconda. I’m updating the Katello provisioning documentation, but I’ve put the instructions in the bug here too.

2 Likes

just to note, now i’m able to kickstart with http://mirror.centos.org/centos/8/BaseOS/x86_64/os out of the box

Yeah - we saw - but that doesn’t include the updates since the release of CentOS 8.0 and isn’t guaranteed to be stable. It’s far better to use the template in note #9 here.

as said http://mirror.centos.org/centos/8/BaseOS/x86_64/os gets updates, thats why its now working out of the box and was not working when i posted where i used http://mirror.centos.org/centos/8/BaseOS/x86_64/kickstart ^^

if you setup a correct installation media // os + pxe + provision template in foreman its working out of the box (now also with /os instead of /kickstart)

just to note that the problems you are seeing are coming from using katello instead of plain yum // dnf / deb mirrors, simply katello is still not compatible out of the box with centos 8.

Can we make sure that this issue blocks @katello release compatible with Foreman 1.24? It’s really important to have a good CenttOS8 experience.

CentOS 8 provisioning quirks are documented in the Katello docs

Shall we error out in a template when things are not named correctly?

I have a solution for Foreman core: https://github.com/theforeman/foreman/pull/7123

Tell me what you think. Currently CentOS 8 installation is broken:

  1. We don’t ship a working Installation Media with foreman, the one named “CentOS mirror” will not work.
  2. If it’s set to http://mirror.centos.org/centos/$major/BaseOS/$arch/kickstart/ it still does not work due to regression discussed there
  3. Only after additional media http://mirror.centos.org/centos/$major/AppStream/$arch/kickstart/ is added (as a host parameter) it will work.

My patch aims to solve this:

  1. New installation media called “CentOS 8 mirror” is shipped (alternatively we can put some logic into Redhat operatingsystem family to change it automatically but I believe this is less confusing)
  2. AppStream is automatically added if redhat major is 8 or higher, URL contains “BaseOS” and AppStream repo is missing

maybe path: http://mirror.centos.org/centos/8/BaseOS/x86_64/os/ should be used there (this we use as installation mirror for centos 8, there was no need for AppStream

Is it possible to deploy a CentOS 8 machine like a CentOS 7 machine, with the workaround from

Templates
?

I tried it out with Katello 3.14 but I get still the package missing error. I am confused how to setup the repositories, content views and installation media stuff for CentOS 8.

@mcorr CentOS8 (RHEL8) dramatically changed setting up repositories, it’s now BaseOS and AppStream separate repos instead of one. Do you remember if we have already covered this in Satellite docs? Maybe we should upstreamize this ASAP because this is repeating problem for our users.

1 Like

It is mentioned here:

https://docs.theforeman.org/current/doc-Provisioning_Guide/index-foreman.html#Configuring_Provisioning_Resources-Using_Kickstart_Repository_as_Installation_Medium

And also the prerequisites for every type of provisioning in the docs mentions setting up repositories if Katello plugin is installed.

It directs to the Content Management guide, which we have yet to upstreamize:

Synchronising repositories has always been handled in the Content Management sections and is listed as a prereq to provisioning.

1 Like

I deployed my first CentOS8 machine with foreman. :slight_smile:
katello-3.14.1-1.el7.noarch
foreman-1.24.1-1.el7.noarch

But I have “hard coded” the AppStream Repo in my provision template:

###################################
# AppStream 
repo --name AppStream --baseurl http://xxxxxxx/pulp/repos/acp_main/PROD/CentOS_8_x86_64/custom/CentOS_8/AppStream_x86_64_os/
###################################

I tried the code blocks from the manuals:

<% @additional_media.each do |medium| -%>
repo --name <%= medium[:name] %> --baseurl <%= medium[:url] %> <%= medium[:install] ? ' --install' : '' %>
<% end -%>

or

<% @additional_media.each do |medium| -%>
<% if (medium[:url].include?("AppStream") and @host.operatingsystem.name == 'Centos' and os_major >= 8) -%>
repo --name AppStream --baseurl <%= medium[:url] %>
<% else -%>
repo --name <%= medium[:name] %> --baseurl <%= medium[:url] %> <%= medium[:install] ? ' --install' : '' %>
<% end -%>
<% end %>

but with both code blocks the AppStream Repo is missing in my provision template.

Is your operatingsystem in Foreman database really “Centos” and major 8 or higher? That’s what the code does, probably it needs some fine tuning, it should also match “CentOS” I think.

Realized there is a relevant patch: Feature #28116: Automatically add AppStream repo next to BaseOS as additional media - Foreman

If you’re here, this may be relevant to your woes. This thread is where google sent me when I first searched for a solution to the “…/…/…/AppStream/” problem.

https://community.theforeman.org/t/satellite-cannot-provisioning-centos-8-server/18091/16?u=oarie

1 Like

For the record, there are two solution to the problem.

  1. When not using Katello (Foreman Core). Foreman 2.1 (and maybe 2.0) will ship two Installation Media, one named “CentOS 8.x mirror” that must be used for CentOS 8 and likely older versions. And one named “CentOS 7.x mirror” which should be used for older releases. Just pick the correct media and you should be good to go as Anaconda installer automatically adds AppStream. We might rename these in the future, we have decided for these names as these are the least confusing for newcomers.

  2. When using Katello, a template change was previously required for older Foreman releases but from Foreman 2.1 this is part of the standard template and no changes are needed.

I am marking this as a solution for googlers.

3 Likes

I decided I didn’t want to add a specific AppStream repo so I replaced the extra medium section in my kickstart template file.

replace

repo --name <%= medium[:name] %> --baseurl <%= medium[:url] %> <%= medium[:install] ? ’ --install’ : ‘’ %><%= proxy_string %>

with

if medium[:name].match(/^AppStream/)
medium_name = “AppStream”
else
medium_name = medium[:name]
end
%>
repo --name <%= medium_name %> --baseurl <%= medium[:url] %> <%= medium[:install] ? ’ --install’ : ‘’ %><%= proxy_string %>