Hosts match "has upgradable_rpms" but have no upgradable rpms

Problem:
For a while now I have observed that when searching the host list for “has upgradable_rpms” it lists a lot of hosts which actually don’t have any upgradable rpms for installation.

The column “Installable updates” also shows four “0” (zero).

When I click on any link on the fourth “0” for any of those hosts, it takes me to the “Content/packages?status=Upgradable” page which also says “No matching packages found”.

On the hosts “dnf check-update” also has no updates to list.

So there are really no updates available for that host at the moment.

For all it matters: On some of them there is an applicable errata which hasn’t been promoted to the lifecycle environment of those hosts, yet. So, once promoted there will be upgradable rpms. But not at this time.

I haven’t checked all hosts if they all have some applicable errata, so I cannot tell if this is related or not.

Expected outcome:
Do not list a host for “has upgradable_rpms” when it really has 0 upgradable rpms.

Foreman and Proxy versions:
Foreman 3.15.0, Katello 4.17.1

Distribution and version:
AlmaLinux 9.6

1 Like

Hello, have you tried dnf uploadprofile --force-upload on the hosts? It started I think with katello 4.15 that I have to run this command manually especially on RHEL9 after every dnf update otherwise the list of packages of the server won’t get updated in katello.

No. That doesn’t help. The list of packages of the server in katello is correct and up-to-date. The count “0” is correct. It’s just that “has upgradable” is true.

Also if I search for specific rpms like upgradable_rpms = kernel-core-5.14.0-570.41.1.el9_6.x86_64 which will be available after the next promote, it shows nothing.

If I search for random numbers or letters like upgradable_rpms ~ x it shows me only hosts which have a count larger 0 in the list.

So I wouldn’t know which upgradable_rpms would match the “has upgradable_rpms”.

If a host is properly registered (using global registration command), it should have its package_profile_on_trans = 1 set in rhsm.conf, meaning that dnf will upload a package profile on every dnf transaction.

I have that set everywhere. Katello knows correctly what has been installed/updated. It correctly calculates the count of “0”. Yet, has upgradable_rpms evaluates to true, for most but not all.

I have 290 hosts registered, has upgradable_rpms lists me 240, 56 of them have an upgradable rpm count of more than zero. As far as I can tell, the upgradable rpm count is correct.

As far as I can tell, the hosts not has upgradable_rpms are those which really don’t have any updates in the repositories, in particular the Library hosts which get the updates immediately once synced into the server.

To me it seems as if there is some confusion somewhere between applicable and upgradable rpms, with “has upgradable_rpms” considering applicable ones…

Well, I have `package_profile_on_trans = 1 set in rhsm.conf. I do not blame katello as much as I would blame the subscription manager or dnf in RHEL9. I think this odd behaviour started in RHEL9.6. RHEL8 is working fine. I had even opened an issue on RedHat support but they refused to solve it because I use foreman and not satellite. Anyway it is not a big deal for me because it could be mitigated simply by adding one line with profile force upload in our update playbook. I am only curious if I am the one and only who ran into this problem. I do not want to burden this thread with it either

@JendaVodka I understand your frustration but it is frustrating to me if you are trying to hijack my thread on a different issue. If you want to discuss your problem, please open a new thread. Thank you.

As I have pointed out before, the only issue I see is that has upgradable_rpms evaluates to true even though there are no installable updates in the assigned content view and environment.

The package lists of the hosts get properly updated. Katello has the accurate list of packages installed. I don’t have to force-upload anything. It works just fine with standard dnf transactions. My problem is that Katello lists hosts with zero upgradable rpms when searching for has upgradable_rpms.

@jeremylenz On another note: searching for has upgradable_rpms results in the same list as has applicable_rpms.

At the same time searching for applicable_rpms = kernel-core-5.14.0-570.41.1.el9_6.x86_64 lists 160 hosts (which are all in a different lifecycle environment and don’t yet see the rpm).

Searching for upgradable_rpms = kernel-core-5.14.0-570.41.1.el9_6.x86_64 lists no (zero) hosts, which is correct, because all hosts in environments which include the rpm already have been updated.

This looks like you may have found a bug. I’m guessing the problem is somewhere around here:

From first look it seems like that may need some sort of .where clause added (my first thought was changing ContentFacetApplicableRpm to ContentFacetInstallableRpm, but that’s apparently not a thing.) I’ve opened an issue for it.

1 Like