Bug 1761566

Summary: [RFE] Collect kernel patch version version in facts
Product: Red Hat Enterprise Linux 8 Reporter: Barnaby Court <bcourt>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: arpandey, bhu, csnyder, jhnidek, jsefler, redakkan, rhandlin
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:38:42 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:
Embargoed:

Comment 4 Archana Pandey 2020-07-02 14:45:41 UTC
I will be verifying issue on RHEL 8.1 with live kernel patching, then upgrading the subscription-manager to latest build to check facts collection for kpatch.

Version-Release number of selected component (if applicable):

[root@kvm-02-guest24 ~]# uname -r
4.18.0-147.el8.x86_64

[root@kvm-02-guest24 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.1.14-1
subscription management rules: 5.40
subscription-manager: 1.25.17-1.el8

Steps for verification:
[root@kvm-02-guest24 ~]# subscription-manager register --username=stage-ethel --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: *****************
The registered system name is: kvm-02-guest24.rhts.eng.brq.redhat.com

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status:       Subscribed

[root@kvm-02-guest24 ~]# uname -r
4.18.0-147.el8.x86_64

[root@kvm-02-guest24 ~]# kpatch list
Loaded patch modules:
kpatch_4_18_0_147_1_4 [enabled]

Installed patch modules:
kpatch_4_18_0_147_1_4 (4.18.0-147.el8.x86_64)
kpatch_4_18_0_193_1_3 (4.18.0-193.el8.x86_64)

Lets check facts on subscription-manager: 1.25.17-1.el8

[root@kvm-02-guest24 /]# subscription-manager facts | grep kpatch
[root@kvm-02-guest24 /]# 
				             ^-----kpatch not collected in facts

After installing latest version  of subscription-manager: 

[root@kvm-02-guest24 arp]# rpm -qa subscription-manager
subscription-manager-1.27.9-1.el8.x86_64

[root@kvm-02-guest24 arp]# rpm -qa subscription-manager --changelog | grep 1761566
- 1761566: include kpatch in facts; ENT-1700 (jhnidek)

[root@kvm-02-guest24 /]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.1.14-1
subscription management rules: 5.40
subscription-manager: 1.27.9-1.el8
[root@kvm-02-guest24 /]# 

[root@kvm-02-guest24 /]# subscription-manager facts | grep kpatch
kpatch.installed: 4.18.0-193.el8.x86_64 4.18.0-147.el8.x86_64
kpatch.loaded: kpatch_4_18_0_147_1_4                 <<< ^-----kpatch collected in facts
						  

[root@kvm-02-guest24 /]# subscription-manager facts
cpu.core(s)_per_socket: 1
cpu.cpu(s): 1
cpu.cpu_socket(s): 1
cpu.thread(s)_per_core: 1
cpu.topology_source: kernel /sys cpu sibling lists
distribution.id: Ootpa
distribution.name: Red Hat Enterprise Linux
distribution.version: 8.1
distribution.version.modifier: ga
dmi.bios.address: 0xe8000
dmi.bios.bios_revision: 1.0
dmi.bios.release_date: 01/01/2011
dmi.bios.rom_size: 64 KB
dmi.bios.runtime_size: 96 KB
dmi.bios.vendor: Seabios
dmi.bios.version: 0.5.1
dmi.chassis.asset_tag: Unknown
dmi.chassis.boot-up_state: Safe
dmi.chassis.lock: Not Present
dmi.chassis.manufacturer: Bochs
dmi.chassis.power_supply_state: Safe
dmi.chassis.security_status: Unknown
dmi.chassis.serial_number: Unknown
dmi.chassis.thermal_state: Safe
dmi.chassis.type: Other
dmi.chassis.version: Unknown
dmi.memory.array_handle: 0x1000
dmi.memory.bank_locator: Unknown
dmi.memory.data_width: 64 bit
dmi.memory.error_correction_type: Multi-bit ECC
dmi.memory.error_information_handle: Not Provided
dmi.memory.form_factor: DIMM
dmi.memory.location: Other
dmi.memory.locator: DIMM 0
dmi.memory.maximum_capacity: 4 GB
dmi.memory.size: 4096 MB
dmi.memory.speed:   (ns)
dmi.memory.total_width: 64 bit
dmi.memory.type: RAM
dmi.memory.use: System Memory
dmi.meta.cpu_socket_count: 1
dmi.processor.family: Other
dmi.processor.socket_designation: CPU 1
dmi.processor.status: Populated:Enabled
dmi.processor.type: Central Processor
dmi.processor.upgrade: Other
dmi.processor.version: Unknown
dmi.processor.voltage: Unknown
dmi.system.family: Red Hat Enterprise Linux
dmi.system.manufacturer: Red Hat
dmi.system.product_name: KVM
dmi.system.serial_number: Unknown
dmi.system.sku_number: Unknown
dmi.system.status: No errors detected
dmi.system.uuid: b307ff79-cbff-4dad-b25a-c31bbdb1ebaf
dmi.system.version: RHEL 7.0.0 PC (i440FX + PIIX, 1996)
dmi.system.wake-up_type: Power Switch
kpatch.installed: 4.18.0-193.el8.x86_64 4.18.0-147.el8.x86_64    <<<<<<Here it appears		
kpatch.loaded: kpatch_4_18_0_147_1_4	                         <<<<<<Here it appears				
last_boot: 2020-07-02 09:23:56
lscpu.architecture: x86_64
lscpu.bogomips: 3999.99
lscpu.byte_order: Little Endian
lscpu.core(s)_per_socket: 1
lscpu.cpu(s): 1
……………. so on 

Actual results:
kpatch.installed: 4.18.0-193.el8.x86_64 4.18.0-147.el8.x86_64
kpatch.loaded: kpatch_4_18_0_147_1_4

Expected results:
kpatch.installed: 4.18.0-193.el8.x86_64 4.18.0-147.el8.x86_64
kpatch.loaded: kpatch_4_18_0_147_1_4

Comment 7 errata-xmlrpc 2020-11-04 01:38:42 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 (subscription-manager bug fix and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2020:4460