Foreman 3.18 hosts Ubuntu >= 20 can't retreive package with apt update

**Problem:**retreive package KO

Expected outcome:

Foreman and Proxy versions: 3.18

Foreman and Proxy plugin versions:

Distribution and version: Alma 9

Other relevant data:

Hello,
After the upgrade of Foreman in 3.18 i can’t retreive the packages with apt update command.
Err :9 katello://******/pulp/deb/KNDS/Library/custom/Ubuntu_22_04_LTS/Ubuntu_22_04_LTS_main jammy/main amd64 Packages
404 404 Not Found
I don’t have this problem for Redhat and Alma
Best regards

Several questions that might narrow things down:

  • Are the affected hosts attached directly to the server or to a smart proxy?
  • Is it all hosts for all CVs or just specific ones?
  • Did you check manually if the content is in fact missing (on the server or proxy)?
  • Are you sure this is something the upgrade did, or have there been any (failed) syncs since the upgrade?
  • From what Foreman/Katello version did you upgrade?
  • What version of subscription-manager RPM are the affected hosts using/When was this last updated?

Hello,

  • attached to a smart proxy
  • subscription-manager (deb) : python3-subscription-manager is already the newest version (1.29.35-4)
  • Is it all hosts for all CVs or just specific ones : All Ubuntu OS (20, 22 and 24)
  • Did you check manually if the content is in fact missing (on the server or proxy)? On the proxy https://proxy-url/pulp/deb/KNDS/Library/custom/Ubuntu_22_04_LTS/Ubuntu_22_04_LTS_main/dists/default/ I see Release and all repo
  • Are you sure this is something the upgrade did : Foreman 3.13 was OK
  • From what Foreman/Katello version did you upgrade : Foreman : 3.13/Katello 4.15

Upgrade steps on the proxy :

dnf upgrade https://yum.theforeman.org/releases/3.14/el9/x86_64/foreman-release.rpm
dnf upgrade https://yum.theforeman.org/releases/3.15/el9/x86_64/foreman-release.rpm
dnf upgrade https://yum.theforeman.org/releases/3.16/el9/x86_64/foreman-release.rpm
dnf upgrade https://yum.theforeman.org/releases/3.17/el9/x86_64/foreman-release.rpm
dnf upgrade https://yum.theforeman.org/releases/3.18/el9/x86_64/foreman-release.rpm

Upgrade steps server :

dnf upgrade https://yum.theforeman.org/releases/3.14/el9/x86_64/foreman-release.rpm
dnf upgrade https://yum.theforeman.org/katello/4.16/katello/el9/x86_64/katello-repos-latest.rpm

dnf upgrade https://yum.theforeman.org/releases/3.15/el9/x86_64/foreman-release.rpm
dnf upgrade https://yum.theforeman.org/katello/4.17/katello/el9/x86_64/katello-repos-latest.rpm

dnf upgrade https://yum.theforeman.org/releases/3.16/el9/x86_64/foreman-release.rpm
dnf upgrade https://yum.theforeman.org/katello/4.18/katello/el9/x86_64/katello-repos-latest.rpm

dnf upgrade https://yum.theforeman.org/releases/3.17/el9/x86_64/foreman-release.rpm
dnf upgrade https://yum.theforeman.org/katello/4.19/katello/el9/x86_64/katello-repos-latest.rpm

dnf upgrade https://yum.theforeman.org/releases/3.18/el9/x86_64/foreman-release.rpm
dnf upgrade https://yum.theforeman.org/katello/4.20/katello/el9/x86_64/katello-repos-latest.rpm

Best regards


Very likely, you need to do a “complete sync” to your smart proxy, because of: Foreman 3.17 and Katello 4.19 release notes

Given what you are describing you are most likely only missing the “complete smart proxy sync” part of the migration, so doing so should fix your issue.

Hello i found the origin of my problem.

On Ubuntu in the rhsm.sources file i have special caracters at the end of the line : %3Fcomp%3Dmain%2Cuniverse%26rel%3Djammy

The problem is only for rhsm.sources on Ubuntu. I don’t have this problem on Redhat.

baseurl: https://proxy-server/pulp/deb/KNDS/Library/custom/Ubuntu_22_04_LTS/Ubuntu_22_04_LTS_main/%3Fcomp%3Dmain%2Cuniverse%26rel%3Djammy

Do you have an issue for this problem ?

Best regards

This is by design with the transition to structured APT with Katello 4.19. Your problem is that you did not do a complete sync to your smart proxy since the migration ran as part of your upgrade.

The host you posted is looking for metadata under jammy/main but your smart proxy is still serving the old repo format (default/all). You need to do a complete sync to your smart proxy.

1 Like