Katello 3.16.1-1.el7 subscription-manager doesn't create rhsm repos for ubuntu

Have a look at the PR https://github.com/Katello/katello/pull/9010 @stephenc - it should fix the issue that there is no debian repo available in sub-man if a architecture is set.

I tried that a couple of days ago but it does not work. tried this morning again with your patch and still not working - I think the issue is still in the changes to candlepin.

Yes I did.
When I removed the architeture, the sync of the repos failed.

 "    with open(self.path, 'rb') as fh:\n" +
 "IOError: [Errno 2] No such file or directory: u'/var/cache/pulp/reserved_resource_worker-1@foreman-z01.infra.zgt.local/7c72b214-c019-43c2-be74-9c07e2f2fd60/dists/bionic/main/binary-arm64/Packages.xz'\n",
"spawned_tasks"=>[],
"progress_report"=>

It tries to look for arm64.

Indeed, when removing the architecture Iā€™m able to see the repos :slight_smile:
But as mentioned above and by stephenc, the sync does not work anymore

root@ubuntu-t03:~# subscription-manager repos --list
1 local certificate has been deleted.
Ā±---------------------------------------------------------+
Available Repositories in /etc/yum.repos.d/redhat.repo
Ā±---------------------------------------------------------+
Repo ID: ICT-ZGT_Ubuntu_Ubuntu_18_04_Security_amd64
Repo Name: Ubuntu 18.04 Security amd64
Repo URL: https://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Se
curity_amd64
Enabled: 1

Repo ID: ICT-ZGT_Ubuntu_Ubuntu_18_04_Updates_amd64
Repo Name: Ubuntu 18.04 Updates amd64
Repo URL: https://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Up
dates_amd64
Enabled: 1

Repo ID: ICT-ZGT_Ubuntu_Ubuntu_18_04_amd64
Repo Name: Ubuntu 18.04 amd64
Repo URL: https://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_am
d64
Enabled: 1

I manually applied the fix mentioned. And for me that seems to work fine, although now I see 2 of the 3 repos :expressionless:
I have to check this out.

THat is fixed now.

Other issue. Now I see the repositories with subscription-manager. but when performing a apt-get update it ends with

Reading package listsā€¦ Done
E: Failed to fetch katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Security_amd64/dists/default/all/binary-amd64/Packages 404 Not Found
E: Failed to fetch katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_amd64/dists/default/all/binary-amd64/Packages 404 Not Found
E: Failed to fetch katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Updates_amd64/dists/default/all/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

you mean with https://github.com/Katello/katello/pull/9010 is working? and before applying this fix sub-man wasnā€™t able to show the repo?

Bernard, that is correct.

1 Like

Maybe it doesnā€™t work for you @stephenc because the entry is already set in the database. Maybe change it like this:

I have to extend this log trail.

I seems like it can find the Packages from all, but not from amd64!

Ign:10 katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Security_amd64 default/all all Packages
Err:11 katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Security_amd64 default/all amd64 Packages
404 Not Found
Ign:12 katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Security_amd64 default/all Translation-en
Err:16 katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_amd64 default/all amd64 Packages
404 Not Found
Ign:17 katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_amd64 default/all all Packages
Err:22 katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Updates_amd64 default/all amd64 Packages
404 Not Found
Ign:23 katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Updates_amd64 default/all all Packages
Ign:28 katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_Subscription-manager default/all all Packages
Err:29 katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_Subscription-manager default/all amd64 Packages
404 Not Found

I did as you suggested
After 8567 and setting architecture to empty it created the repos as before
reverting using 9010, putting the arch back and restarting.
the repos that existed were not deleted this time. The 2 servers that I was testing were OK.
I then registered a new server and it failed to pull any repo so I would suggest the patch is not working as envisioned.

If you marked Publish via HTTP for the Repository in Katello, you can open the URL in your Browser by swapping out katello:// with http:// AND appending a / (the latter is important for pulp to work correctly).
E.g. http://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_Subscription-manager/

This way you can see more closer, if there is something wrong with the repository provided by pulp.
The 404 suggests that e.g. the Release file(s) are not there.
The latter can be fixed by Regenerate Metadata for the respective Content-View Versions.

1 Like

Oke, what I see is this:
http://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_Subscription-manager/dists/stable/

and it expected
katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_Subscription-manager/dists/default

for the ubuntu repos the same. It has: dists/bionic, but it expects: dists/default

Or is default a generic variable?

Jurgen

Yes, the problem is that the default-suite is missing in your repository.
The reason you need it is that subscription-manager always uses default, this avoids having to transfer the original suiteā€™s name down to the host.

Have you tried regenerating the Metadata for the ContentView Versions?

I did regenerate my content view, but no difference.

Should the ā€˜defaultā€™ be configured somewhere in the Ubuntu repository?

This is my repository configuration

this is my repository configuration

Now I remember, sorry.

Please check if the config file /etc/pulp/server/plugins.conf.d/deb_distributor.json exists and at least has the following content:

{
  "publish_default_release": true
}

If you had to create it, restart pulp afterwards and re-generate the metadata again.

1 Like

Nice, that did the trick!!!
Thank you very much for your help

regards
Jurgen

I have to come back on that.
After reinstalling a server, register the server with subscription-manager and performing a apt-get update, it misses the inRelease file.

~# apt-get update
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://archive.ubuntu.com:80/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com:80/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com:80/ubuntu bionic-backports InRelease
Reading package listsā€¦ Done
E: The method driver /usr/lib/apt/methods/katello could not be found.
N: Is the package apt-transport-katello installed?
E: The method driver /usr/lib/apt/methods/katello could not be found.
N: Is the package apt-transport-katello installed?
E: The method driver /usr/lib/apt/methods/katello could not be found.
N: Is the package apt-transport-katello installed?
E: The method driver /usr/lib/apt/methods/katello could not be found.
N: Is the package apt-transport-katello installed?
E: Failed to fetch katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_Subscription-manager/dists/default/InRelease
E: Failed to fetch katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Security_amd64/dists/default/InRelease
E: Failed to fetch katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_Updates_amd64/dists/default/InRelease
E: Failed to fetch katello://foreman-z01.infra.zgt.local/pulp/deb/ICT-ZGT/acceptatie/CV_Ubuntu-18/custom/Ubuntu/Ubuntu_18_04_amd64/dists/default/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.