Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1845717

Summary: realtime-virtual-host profile's script.sh execution is terminated if kernel-rt-kvm is missing
Product: Red Hat Enterprise Linux 8 Reporter: Nitesh Narayan Lal <nilal>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: bhu, broskos, jeder, jskarvad, lcapitulino, marjones, mtosatti, peterx, psklenar, rhack
Target Milestone: rcKeywords: TestCaseNotNeeded, ZStream
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tuned-2.14.0-4.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1884544 1884545 (view as bug list) Environment:
Last Closed: 2021-05-18 15:05:25 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:
Bug Depends On:    
Bug Blocks: 1852253, 1867936, 1867937, 1883636, 1884544, 1884545, 1894575    

Description Nitesh Narayan Lal 2020-06-09 21:18:59 UTC
Description of problem:
The tuned realtime-virtual-host profile doesn't complete the configuration as per script.sh when kernel-rt-kvm is missing or kvm module is not loaded.

Version-Release number of selected component (if applicable):
tuned-2.13.0-6.el8.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Setup an RT host without kernel-rt-kvm package
2. Apply tuned realtime-virtual-host profile & reboot
3. Verify the error in tuned.log and by manually executing:

- cat /sys/kernel/ktimer_lockless_check
- systemctl status rt-entsk

Actual results:
[root@virtlab500 ~]# cat /proc/cmdline 
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-4.18.0-193.7.1.rt13.58.el8_2.x86_64 root=/dev/mapper/rhel_virtlab500-root ro crashkernel=auto resume=/dev/mapper/rhel_virtlab500-swap rd.lvm.lv=rhel_virtlab500/root rd.lvm.lv=rhel_virtlab500/swap console=ttyS1,115200 skew_tick=1 isolcpus=managed_irq,domain,1,3,5,7,9,11,13,15 intel_pstate=disable nosoftlockup tsc=nowatchdog nohz=on nohz_full=1,3,5,7,9,11,13,15 rcu_nocbs=1,3,5,7,9,11,13,15
[root@virtlab500 ~]# rpm -qa tuned
tuned-2.13.0-6.el8.noarch
[root@virtlab500 ~]# tuned-adm active
Current active profile: realtime-virtual-host
[root@virtlab500 ~]# 
[root@virtlab500 ~]# cat /sys/kernel/ktimer_lockless_check
0
[root@virtlab500 ~]# systemctl status rt-entsk
● rt-entsk.service - RT Enable Netsocket Timestap Static Key daemon
   Loaded: loaded (/usr/lib/systemd/system/rt-entsk.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

Expected results:
I think that the realtime-virtual-host profile should enable rt-entsk and set ktimer_lockless_check even if kernel-rt-kvm is missing or kvm module is not loaded. This is because realtime-virtual host consist of tuning that could impact not just guest latency but RT host latency as well.

Additional info:
2020-06-09 16:36:40,275 INFO     tuned.plugins.plugin_cpu: energy_perf_bias successfully set to 'performance' on cpu 'cpu6'
2020-06-09 16:36:40,275 INFO     tuned.plugins.plugin_cpu: setting new cpu latency 3
2020-06-09 16:36:40,277 ERROR    tuned.plugins.plugin_sysctl: Failed to read sysctl parameter 'net.core.busy_read', the parameter does not exist
2020-06-09 16:36:40,277 ERROR    tuned.plugins.plugin_sysctl: sysctl option net.core.busy_read will not be set, failed to read the original value.
2020-06-09 16:36:40,277 ERROR    tuned.plugins.plugin_sysctl: Failed to read sysctl parameter 'net.core.busy_poll', the parameter does not exist
2020-06-09 16:36:40,277 ERROR    tuned.plugins.plugin_sysctl: sysctl option net.core.busy_poll will not be set, failed to read the original value.
2020-06-09 16:36:40,277 ERROR    tuned.plugins.plugin_sysctl: Failed to read sysctl parameter 'kernel.numa_balancing', the parameter does not exist
2020-06-09 16:36:40,277 ERROR    tuned.plugins.plugin_sysctl: sysctl option kernel.numa_balancing will not be set, failed to read the original value.
2020-06-09 16:36:40,279 INFO     tuned.plugins.plugin_sysctl: reapplying system sysctl
2020-06-09 16:36:40,280 WARNING  tuned.plugins.plugin_vm: Option 'transparent_hugepages' is not supported on current hardware.
2020-06-09 16:36:40,281 INFO     tuned.plugins.plugin_bootloader: installing additional boot command line parameters to grub2
2020-06-09 16:36:40,415 INFO     tuned.plugins.plugin_script: calling script '/usr/lib/tuned/realtime/script.sh' with arguments '['start']'
2020-06-09 16:36:40,467 INFO     tuned.plugins.plugin_script: calling script '/usr/lib/tuned/realtime-virtual-host/script.sh' with arguments '['start']'
2020-06-09 16:36:40,520 ERROR    tuned.plugins.plugin_script: script '/usr/lib/tuned/realtime-virtual-host/script.sh' error output: 'modinfo: ERROR: Module kvm not found.
modinfo: ERROR: Module kvm_intel not found.
/sys/module/kvm/parameters/lapic_timer_advance_ns not found'
2020-06-09 16:36:40,520 ERROR    tuned.plugins.plugin_script: script '/usr/lib/tuned/realtime-virtual-host/script.sh' returned error code: 1
2020-06-09 16:36:40,706 INFO     tuned.daemon.daemon: static tuning from profile 'realtime-virtual-host' applied

Comment 35 errata-xmlrpc 2021-05-18 15:05:25 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 (tuned 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-2021:1671