Problem:
I have followed the procedure indicated in Managing deb content in Foreman | Opensource.com but for Ubuntu 2004 operating system
I have registered the machines but when executing apt-get update I get default InRelease’ doesn’t support architecture '0’ Expected outcome:
Foreman and Proxy versions:
2.5.3 Foreman and Proxy plugin versions:
Katello 4.13 Distribution and version:
Are there any further news or insights on this issue? I have a fresh Foreman 3.0 and Katello 4.2 installation and configured all Debian respositories explicit for Architecture amd64. On a Debian 10 client I installed the latest python-subscription-manager package (1.28.21-1) and was able to join the Foreman server.
In the file /etc/apt/sources.list.d/rhsm.sources I see now “Architectures: 0” for every repository. apt update gives now the error (Sry, its german):
N: Das Laden der konfigurierten Datei »all/binary-0/Packages« wird übersprungen, da das Depot »katello://foreman-01.********/pulp/deb/CDC/Library/Composite_Debian_10/custom/Debian_10/Debian_10_main default InRelease« die Architektur »0« nicht unterstützt.
N: Das Laden der konfigurierten Datei »all/binary-0/Packages« wird übersprungen, da das Depot »katello://foreman-01.********/pulp/deb/CDC/Library/Composite_Debian_10/custom/Debian_10_subscription-manager/Debian_10_subscription-manager default InRelease« die Architektur »0« nicht unterstützt.
N: Das Laden der konfigurierten Datei »all/binary-0/Packages« wird übersprungen, da das Depot »katello://foreman-01.********/pulp/deb/CDC/Library/Composite_Debian_10/custom/Debian_10/Debian_10_updates default InRelease« die Architektur »0« nicht unterstützt.
N: Das Laden der konfigurierten Datei »all/binary-0/Packages« wird übersprungen, da das Depot »katello://foreman-01.********/pulp/deb/CDC/Library/Composite_Debian_10/custom/Debian_10/Debian_10_security default InRelease« die Architektur »0« nicht unterstützt.
After removeing all Architectures: 0 entries manually, I see:
N: Das Laden der konfigurierten Datei »all/binary-amd64/Packages« wird übersprungen, da das Depot »katello://foreman-01.********/pulp/deb/CDC/Library/Composite_Debian_10/custom/Debian_10/Debian_10_main default InRelease« die Architektur »amd64« nicht unterstützt.
N: Das Laden der konfigurierten Datei »all/binary-amd64/Packages« wird übersprungen, da das Depot »katello://foreman-01.********/pulp/deb/CDC/Library/Composite_Debian_10/custom/Debian_10/Debian_10_security default InRelease« die Architektur »amd64« nicht unterstützt.
I am not sure if those problems correlate. Maybe those have to be treated separately.
@mambo For the second problem (once you have removed the Architectures: 0 entry): Can you verify if the file all/binary-amd64/Packages exists for the repo on your server. (Also check if it contains at least one package entry)? If it does not exist or is empty that might explain things somewhat.
The fact that the subscription-manager writes Architectures: 0 into the rhsm.sources file is almost certainly a bug. I think it might be resulting from an “incomplete” feature. The latest versions of subscription-manager expect the server to tell it what Architectures the repo has. However, on the server this requires changes to both Katello and Candlepin (if I recall) correctly, and I think not all of those changes have made it to a Katello release. I think there is nothing to be done, but to work around the problem by removing those entries. (subscription-manager might re-add them each time it adjusts the repo config, so some kind of automation would be needed for an effective workaround…)
I’m not really sure, but I think I found the problem.
It seems to be related to the package by ATIX, in the candlepin sources the issue seems to be solved.
Details:
in the /usr/lib/python2.7/dist-packages/rhsm/repofile.py in line 98 0 is defined for arches (which is turned into the Architectures statement in fix_content function).
But in the from_ent_cert_content the arches that is part of the certificate is not copied to
to the returned repo var so the 0 is returned.
For Debian 11 there is a 1.28.24 package available that does not show this problem on my bullseye host. The version for Debian 10 is at 1.28.21. Can you provide an updated version for buster, @Bernhard_Suttner?
Thanks in Advance
In case anyone is encountering this issue using subscription-manager from https://apt.atix.de/Debian10/ you can just apply this patch after installing/updating subscription-manager:
patch /usr/lib/python2.7/dist-packages/rhsm/repofile.py <<EOF
--- a/usr/lib/python2.7/dist-packages/rhsm/repofile.py
+++ b/usr/lib/python2.7/dist-packages/rhsm/repofile.py
@@ -498,6 +498,9 @@
apt_cont['Components'] = 'all'
apt_cont['Trusted'] = 'yes'
+ if apt_cont.get('arches') == '0':
+ apt_cont.pop('arches')
+
if 'arches' in apt_cont and apt_cont['arches'][0] != 'ALL':
apt_cont['Architectures'] = " ".join(apt_cont['arches'])
EOF