Apt-get update on Ubuntu get default InRelease' doesn't support architecture '0'

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:

Other relevant data:

@Bernhard_Suttner Do you have any idea where subscription-manager might be getting “architecture ‘0’” from?

Which subscription version do you have?

Hi. I have one composite view (SoftBase_Ubuntu_2004) with the three single content view:

  • PuppetLabs-Ubuntu_2004
  • Subscription_Manager-Ubuntu_2004
  • Ubuntu_2004
    The error is:
    Ign:1 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default InRelease
    Ign:2 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default InRelease
    Ign:3 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default InRelease
    Ign:4 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default InRelease
    Get:5 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default Release [1,658 B]
    Get:6 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default Release [1,668 B]
    Get:7 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default Release [1,648 B]
    Get:8 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default Release [1,650 B]
    Ign:9 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default Release.gpg
    Ign:10 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default Release.gpg
    Ign:11 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default Release.gpg
    Ign:12 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default Release.gpg
    Get:13 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default/all all Packages [3,956 B]
    Get:14 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default/all all Packages [1,993 B]
    Get:15 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default/all all Packages [569 kB]
    Get:16 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default/all all Packages [339 kB]
    Reading package lists… Done
    N: Skipping acquire of configured file ‘all/binary-0/Packages’ as repository ‘katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default InRelease’ doesn’t support architecture ‘0’
    N: Skipping acquire of configured file ‘all/binary-0/Packages’ as repository ‘katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default InRelease’ doesn’t support architecture ‘0’
    N: Skipping acquire of configured file ‘all/binary-0/Packages’ as repository ‘katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default InRelease’ doesn’t support architecture ‘0’
    N: Skipping acquire of configured file ‘all/binary-0/Packages’ as repository ‘katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default InRelease’ doesn’t support architecture ‘0’

Hi.
I have installed last version from https://apt.atix.de for Ubuntu2004.

subscription-manager:
Installed: (none)
Candidate: 1.28.21-2
Version table:
1.28.21-2 500

Hi. I have one composite view (SoftBase_Ubuntu_2004) with the three single content view:

PuppetLabs-Ubuntu_2004
Subscription_Manager-Ubuntu_2004
Ubuntu_2004
The error is:
Ign:1 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default InRelease
Ign:2 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default InRelease
Ign:3 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default InRelease
Ign:4 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default InRelease
Get:5 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default Release [1,658 B]
Get:6 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default Release [1,668 B]
Get:7 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default Release [1,648 B]
Get:8 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default Release [1,650 B]
Ign:9 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default Release.gpg
Ign:10 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default Release.gpg
Ign:11 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default Release.gpg
Ign:12 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default Release.gpg
Get:13 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default/all all Packages [3,956 B]
Get:14 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default/all all Packages [1,993 B]
Get:15 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default/all all Packages [569 kB]
Get:16 katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default/all all Packages [339 kB]
Reading package lists… Done
N: Skipping acquire of configured file ‘all/binary-0/Packages’ as repository ‘katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/PuppetLabs-Ubuntu_2004/PuppetLabs-Ubuntu_2004 default InRelease’ doesn’t support architecture ‘0’
N: Skipping acquire of configured file ‘all/binary-0/Packages’ as repository ‘katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Subscription_Manager-Ubuntu_2004/Subscription_Manager-Ubuntu_2004 default InRelease’ doesn’t support architecture ‘0’
N: Skipping acquire of configured file ‘all/binary-0/Packages’ as repository ‘katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Updates default InRelease’ doesn’t support architecture ‘0’
N: Skipping acquire of configured file ‘all/binary-0/Packages’ as repository ‘katello://ges08lv.teide.int/pulp/deb/STIC/PreProduction/SoftBase_Ubuntu_2004/custom/Ubuntu-2004/Focal-Security default InRelease’ doesn’t support architecture ‘0’

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…)

We get the same issue on our debian 10 hosts.

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.