Cannot kickstart CentOS 8

Problem:
I am trying to kickstart a centos 8. However it fails. It doesn’t seem to find the AppStream repository although it’s configured in the kickstart file.

Foreman and Proxy versions:

foreman 2.3.1
katello 3.18.1

Distribution and version:
CentOS 7.9.2009

Other relevant data:

The rendered kickstart template correctly contains the urls:

url --url http://foreman.example.com/pulp/repos/ORG/Production/centos8/custom/centos8/BaseOS_x86_64/
# renamed from "http://foreman.example.com/pulp/repos/ORG/Production/centos8/custom/centos8/AppStream_x86_64/" for CentOS Anaconda to work
repo --name AppStream --baseurl http://foreman.example.com/pulp/repos/ORG/Production/centos8/custom/centos8/AppStream_x86_64/

both URLs are correct and show the corresponding content. It’s also correctly on the kickstarting server at /run/install/ks.cfg.

However the anaconda log shows

ERR payload.manager: PayloadError: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

The httpd access logs on the foreman server shows these accessed URIs:

"GET /pulp/repos/ORG/Production/centos8/custom/centos8/BaseOS_x86_64//.treeinfo HTTP/1.1" 200 1444 "-" "curl/7.61.1"
"GET /pulp/repos/ORG/Production/centos8/custom/centos8/BaseOS_x86_64//images/install.img HTTP/1.1" 200 610643968 "-" "curl/7.61.1"
"GET /pulp/repos/ORG/Production/centos8/custom/centos8/BaseOS_x86_64//images/updates.img HTTP/1.1" 404 224 "-" "curl/7.61.1"
"GET /pulp/repos/ORG/Production/centos8/custom/centos8/BaseOS_x86_64//images/product.img HTTP/1.1" 404 224 "-" "curl/7.61.1"
"GET /pulp/repos/ORG/Production/centos8/custom/centos8/BaseOS_x86_64//.treeinfo HTTP/1.1" 200 1444 "-" "CentOS Linux (anaconda)/8"
"GET /pulp/repos/ORG/Production/centos8/AppStream/x86_64/os/repodata/repomd.xml HTTP/1.1" 404 224 "-" "libdnf (CentOS Linux 8; generic; Linux.x86_64)"
"GET /pulp/repos/ORG/Production/centos8/AppStream/x86_64/os/repodata/repomd.xml HTTP/1.1" 404 224 "-" "libdnf (CentOS Linux 8; generic; Linux.x86_64)"
"GET /pulp/repos/ORG/Production/centos8/AppStream/x86_64/os/repodata/repomd.xml HTTP/1.1" 404 224 "-" "libdnf (CentOS Linux 8; generic; Linux.x86_64)"
"GET /pulp/repos/ORG/Production/centos8/AppStream/x86_64/os/repodata/repomd.xml HTTP/1.1" 404 224 "-" "libdnf (CentOS Linux 8; generic; Linux.x86_64)"

So it seems it’s not using the AppStream repo configured in the kickstart file. I just don’t understand why…

Same error here. Tried numerous url’s, on different Foreman installations, but fails.

It’s a known issue and as far as I know it’s not fixed yet. There is a workaround though. This is my file paths and it might differ on your setup. Hope it helps.

# edit .treeinfo file
/var/lib/pulp/published/yum/https/repos/Default_Organization/Library/custom/CentOS/centos-8_2-baseos-x86_64/.treeinfo

# at bottom of file change from:
[variant-AppStream]
id = AppStream
name = AppStream
packages = ../../../AppStream/x86_64/os/Packages
repository = ../../../AppStream/x86_64/os/
type = variant
uid = AppStream

# Change to
[variant-AppStream]
id = AppStream
name = AppStream
packages = ../AppStream/x86_64/os/Packages
repository = ../AppStream/x86_64/os/
type = variant
uid = AppStream
1 Like

How does this apply on Pulp 3? The paths arent there.

I also run pulp3 so that shouldn’t matter. Maybe your paths are different. Try find command.

find /var -name ".treeinfo"

Results nothing. The repos ARE there and are synced.

But kickstarting CentOS7, RHEL7, RHEL8, Ubuntu works fine. Just CentOS8 stopped working recently.

Here is the original case from where I got the workaround. Bug #27948: CentOS 8 install fails missing "../../../AppStream" repo when Installation Media is foreman repo. - Katello - Foreman The links in the case points to an issue with pulp which is apparently solved for pulp3. It’s still an issue for me and the only thing working for me is the workaround I posted above.

I tried this the other day with Katello 3.18 and the installation passed just fine. Weird, you’re right Pulp folks fixed this only for Pulp3.

I was having the same issue with provisioning from Satellite 6.8.2, but only with CentOS 8 Stream. CentOS 8 Linux worked fine. Changing the end of the .treeinfo file referenced above resolved the issue:

    [variant-AppStream]
    id = AppStream
    name = AppStream
    packages = Packages
    repository = .
    type = variant
    uid = AppStream
1 Like

Hello,

what exactly did you change? It looks the same to me:

http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/.treeinfo

I tried CentOS 8 Stream with Katello 3.18 and it was working fine, no changes or workarounds for me:

1 Like

Lukas,

After syncing the repo on my Satellite server, the relative pathname to the repository in the .treeinfo file was …/…/. Changing it to “repository = .” allowed provisioning to work.

Thanks for posting your video. I’ll watch it when I get a chance.

-Lee

So it looks like CentOS guys changed it, it looks the same there. Okay. Thanks!