Errata not updating in Katello

Hi all,

I’m having an issue with Foreman Katello. I have some Errata listed as Applicable and Installable.

After updating the machines in question, those Errata remain listed as Applicable and Installable for the same number of hosts.

On Friday last week I upgraded from Foreman 1.15.x and Katello 3.4.x to 1.16.0 and 3.5 respectively. This functionality was working previously. It doesn’t now.

What I was expecting to happen is that the number of hosts would decrease.

I have - on each content host - tried both katello-tracer-upload and puppet agent -t in an effort to prompt the server.

On the server I have tried katello-service restart and a plain old reboot.

Is this a new bug in Katello 3.5?

I’ve just discovered that by going into one of the content hosts pages, then to the Errata tab, and using the “recalculate” button, the Errata are reset successfully. I’d rather not have to do it on a per-host basis.


I guess we can try the new group support in this case… @katello is this a known issue?

I don’t think this is an issue we’ve seen yet. I will try to reproduce it. I did want to ask: did you update katello-agent on the clients?

No I did not - all the clients are somewhat behind on the updates as they are in production. That’s probably the problem. Cheers

We are facing the same issue. There is another thread with the same issue: How is errata applicability recalculated? how can I automate that the errata applicability is recalculated in a regular basis?

@akofink Is there a change in newer version of katello-agent which is necessary that errata recalculation is done?

When is the errata recalculation done?
I thought it should be done while package upload and saw that there is some code in app/lib/actions/katello/host/upload_package_profile.rb which should do it but there is never a ForemanTask started.

Thank you in advance.

I don’t know the answer, but I did a code inspection:

I think the GenerateApplicability task gets run for a number of different cases:

  1. The HostErrata#applicability API endpoint
  2. In the Host ContentFacet#update_repositories_by_paths

The update_repositories_by_paths method is used in CandlepinProxiesController#enabled_repos. API docs here say “Used by katello-agent to keep the information about enabled repositories up to date. This information is then used for computing the errata available for the system.”


I guess, Errata is recalculated when

  • you change the Repo (you 1.)
  • you press Recalculate manually (your 2.)
  • you do a package upload?

I found another section which might be called by package upload:
which will then call:

Unfortunately, I don’t see the task for the recalculation after package upload and it doesn’t recalculate after the synchronization of the repo.

OK. Found out how to force the package upload + errata recalculation:
/usr/sbin/katello-package-upload -f

Or, in case you are having a older version of the katello-agent:
rm /var/lib/rhsm/packages/packages.json