Bug 1971747

Summary: "Registered Content Hosts" Report is Showing the Wrong Available Kernel Version for RHEL 7.7 Client
Product: Red Hat Satellite Reporter: myoder
Component: Hosts - ContentAssignee: Ian Ballou <iballou>
Status: CLOSED ERRATA QA Contact: Shweta Singh <shwsingh>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: addubey, iballou, mhulan, swadeley
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:32:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description myoder 2021-06-14 17:21:49 UTC
Description of problem:

The "Host - Registered Content Hosts" is not showing the correct latest kernel available.  Host is on 7.7 and currently using kernel 3.10.0-1062.18.1.el7.  The host has access to kernel 3.10.0-1062.49.1.el7, yet the "Registered Content Hosts" report is showing the latest available kernel to be 3.10.0-1062.40.1.el7.

From the command line with yum, the host is showing it has access to 3.10.0-1062.49.1.el7 kernel.

Also, from the Satellite UI, navigating to the content host and selecting the Errata tab, the latest errata for the kernel that this host has access to, also shows 3.10.0-1062.49.1.el7.  

Version-Release number of selected component (if applicable):
Red Hat Satellite 6.8
Red Hat Enterprise Linux Server 7.7 with EUS 

How reproducible:

Steps to Reproduce:

Actual results:
Report shows 1062.40.1.el7 as latest kernel.

Expected results:
Report shows 1062.49.1.el7 as the latest kernel.

Additional info:

Comment 1 Marek Hulan 2021-06-17 10:21:39 UTC
The report information is based on Satellite DB, more specifically we look at applicable RPMs with the name "kernel", order it by version and pick one. There could be 2 causes, either Satellite DB does not have the newest package availability information or more version are available and we report the wrong one. Could you please ask customer to perform the following

foreman-rake console
puts Host.find_by_name('$fqdn').applicable_rpms.where(name: 'kernel').order(:version_sortable).map(&:nvra)

Please substitute $fqdn with the FQDN of the host that is affected. My assumption is we'll see the list in a wrong order (the first one of the list is used in the report). If that's the case, it's a bug in the ordering.

Comment 2 myoder 2021-06-24 22:21:54 UTC
Hi Marek,

Thanks for the quick response.  Your assumption was correct.  Here is the output from that command:

[root@satellite ~]# foreman-rake console
Loading production environment (Rails
irb(main):001:0> puts Host.find_by_name('host.example.com').applicable_rpms.where(name: 'kernel').order(:version_sortable).map(&:nvra)
=> nil

Kind regards,

Comment 3 Marek Hulan 2021-07-07 12:49:34 UTC
I'm moving this to another component, this is not specific to the reporting. The ordering by "version_sortable" does not work. Given this is done on applicable rpms, moving to Host - Content, please reassing if there's a better one.

Comment 10 Ian Ballou 2022-06-08 20:25:57 UTC
Created redmine issue https://projects.theforeman.org/issues/35040 from this bug

Comment 11 Bryan Kearney 2022-06-09 00:03:43 UTC
Upstream bug assigned to iballou

Comment 12 Bryan Kearney 2022-06-09 00:03:45 UTC
Upstream bug assigned to iballou

Comment 13 Bryan Kearney 2022-06-13 20:03:32 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35040 has been resolved.

Comment 15 Silas Pusateri 2022-10-06 13:27:52 UTC
Version Tested: 6.12.0 snap 13

Results: The latest kernel version is correctly displayed in the UI and CLI as well as in the "Registered Content Hosts" report.

Comment 22 errata-xmlrpc 2022-11-16 13:32:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.