AlmaLinux 8 with Foreman 2.5.2 (Satellite 6.10)

Problem: After upgrading to Foreman, the almalinux baseos repo no longer sync the images and breaks booting and proxy sync’ing. I believe the issue is related to how the os is being identified. In the Distribution Information section of the repository, it shows the variant for the BaseOS as extras and that is isn’t bootable. The .treeinfo for the BaseOS repository, it shows only BaseOS as the variant and AppStream,BaseOS for the variants.

Distribution Information

Version 8
Architecture x86_64
Family AlmaLinux
Variant extras
Bootable false

Whereas with both Centos8-Stream and RockyLinux, it’s setting them both correctly as:

Distribution Information

Version 8
Architecture x86_64
Family CentOS Stream
Variant AppStream,BaseOS
Bootable true

Distribution Information

Version 8
Architecture x86_64
Family Rocky Linux
Variant AppStream,BaseOS
Bootable true

I’ve checked the .treeinfo for both and formulated the same. I’ve rsync’d the almalinux repos locally to try and “fix” things prior to mirroring into foreman. I was able to ingest almalinux8 in correctly when I edited the .treeinfo and change the family/name fields to say CentOS Stream instead of AlmaLinux. Ultimately, I got it to work by creating an almalinux boot media. The issue then became updating the content views. When new content was released, it was fine on foreman, but when trying to sync to the foreman-proxy(capsule), it gave the following error:

404, message='Not Found', url=URL('[https://<foremanservername>/pulp/content/USA/EI-Infrastructure/AlmaLinux-8/custom/AlmaLinux-8/BaseOS/images/boot.iso')Could](https://<foremanservername>/pulp/content/USA/EI-Infrastructure/AlmaLinux-8/custom/AlmaLinux-8/BaseOS/images/boot.iso%27)Could) not lookup a publication_href for repo 5420404, message='Not Found', url=URL('[https://<foremanservername>/pulp/content/USA/EI-Development/AlmaLinux-8/custom/AlmaLinux-8/BaseOS/images/boot.iso')Could](https://<foremanservername>/pulp/content/USA/EI-Development/AlmaLinux-8/custom/AlmaLinux-8/BaseOS/images/boot.iso%27)Could) not lookup a publication_href for repo 5405

Since it’s not identifying the repo correctly anymore, it’s no longer sync’ing down the images directory from the repository and there’s no way to force it.

This worked prior to the upgrade with some hacks. Under the previous version (Satellite 6.9), I mirrored it locally, modified the path of AppStream to …/AppStream in the .treeinfo of the BaseOS repo, so the builds would follow the relative path and everything worked great.

Has anyone found this as well? Any fixes that you know of? Any other logs needed?

Foreman and Proxy versions:

Distribution and version:

I can confirm this behavior on Foreman 3.1.0 / Katello 4.3.0 also

As a work-a-round, my “fix” was to spoof it as Rocky in the .treeinfo file on my local mirror before consuming into foreman. It seems that foreman at least doesn’t rely on the .treeinfo for OS information. It hasn’t had any issues (so far).

In case someone wants my bash junk:

#!/bin/bash -x

#I should loop this to not load a single mirror



while [[ $TRY -ne 0 ]] ; do
  rsync -pavSH -f 'R .~tmp~' --delete-delay --delay-updates ${URL} ${DEST} > $LOGFILE 2>&1
  if [[ $RET -eq 0 ]] ; then
    echo "fixing permissions"
    chown -R alma. $BASEDEST
    # stupid hack
    sed -i 's/AlmaLinux/Rocky Linux/g' ${DEST}BaseOS/x86_64/os/.treeinfo
    sed -i 's/AlmaLinux/Rocky Linux/g' ${DEST}BaseOS/x86_64/kickstart/.treeinfo
    #chmod 644 $DEST/BaseOS/x86_64/os/.treeinfo
    exit 0
    echo "try num: $TRY"
  TRY=$(expr $TRY - 1)

cat $LOGFILE | mailx -s "AlmaLinux Sync Failed for Version = ${VERSION}" $NOTIFY_ADDR

This appears to be related to this: Katello 3.18.1 Content Migration to Pulp 3 fails with "No declared artifact" message

and this: Pulp 2 to Pulp 3 content migration in Red Hat Satellite 6 fails with error Katello::Errors::Pulp3Error: No declared artifact with relative path "images/boot.iso" for content "<DistributionTree - Red Hat Customer Portal

Resolved in Foreman 3.2 / Katello 4.4