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

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.

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.

you mean with Fixes #31173 - no deb repo in sub-man by sbernhard · Pull Request #9010 · Katello/katello · GitHub 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 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

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

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 use 2 scripts - one fixes the default issue and one creates the InRelease and release.gpg
I have a 1.24 foreman that the deb subscription works perfectly. Its a bit frustrating that this doesn’t. I’ll find the links I used and post them

finally all working Thanks everyone.

You need to install the apt-transport-katello-package on the host, otherwise apt will not know what to do with the katello://-URLs.

Please also make sure that katello-upload-profile is installed, so the installed deb-packages are reported back to katello.

Yes, this is an issue with Ubuntu we are still working on. amd64-packages should work, though.
So you should be fine ignoring these messages for now :slight_smile: .

The problem here is that Ubuntu automatically expects to find amd64 as well as i386 packages in a repository, if no architecture is explicitly specified. Unfortunately, the subscription-manager and katello do not exchange the available architectures within the repository right now.

Ah ok, now I loook beter it is just a warning.
Then I think I’m up and running

Thank you all for your help.

If I need any assistant I know where to find it :slight_smile:

regards
Jurgen

This is a section from our preseed that fixes this
dpkg --remove-architecture i386
subscription-manager repos > /dev/null
subscription-manager refresh >/dev/null

yes I looked into this problem in our lab about 6 months ago and passing the available architecture in katello is quite a complex change. I like the “publish_default_release” in deb_distributor.json it stops having to fix the rhsm.sources by script.

As I said, we are working on this to get the full story done:

  • host tells candlepin via sub-man which archs are supported
  • katello tells candlepin which archs are supported for a repo
  • candlepin only provides repos a host does support
  • sub-man writes debian repository file including supported arch

See https://github.com/candlepin/subscription-manager/pull/2213