Bug 2116718

Summary: tuned will upload cmdline even tuned failed
Product: Red Hat Enterprise Linux 9 Reporter: mhou <mhou>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED MIGRATED QA Contact: Robin Hack <rhack>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.1CC: bhu, jeder, jskarvad, mhou
Target Milestone: rcKeywords: MigratedToJIRA
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-21 21:07:10 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: 2091421    

Description mhou 2022-08-09 08:52:23 UTC
Description of problem:
Attempting to allocate a cpu beyond the cpu range, the tuned command fails to run. But after restarting the virtual machine cmdline takes effect

Version-Release number of selected component (if applicable):
tuned version:
tuned-2.18.0-2.el9.noarch

kernel version:
5.14.0-142.rt21.142.el9.x86_64


How reproducible: 100%


Steps to Reproduce:
1. install tuned and tuned-profiles-nfv
2. isolate cpu1 and cpu2 on realtime-virtual-guest.conf
# lscpu -p
# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting usually from zero.
# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
0,0,0,0,,0,0,0,0
1,1,1,0,,1,1,1,1
2,2,2,0,,2,2,2,2
# cat /etc/tuned/realtime-virtual-guest-variables.conf
isolated_cores=1,2
isolate_managed_irq=Y
# tuned-adm profile realtime-virtual-guest
# reboot
3. check isolation effect on cmdline
# cat /proc/cmdline
# cat /proc/cmdline 
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.14.0-142.rt21.142.el9.x86_64 root=UUID=3f98037d-1d74-4076-a661-c4e1c651ba3e ro rhgb quiet crashkernel=1G-4G:192M,4G-64G
:256M,64G-:512M resume=UUID=79143a02-217d-4970-ae71-bfceb5773fa1 console=ttyS0,115200 skew_tick=1 intel_pstate=disable nosoftlockup tsc=nowatchdog nohz=o
n irqaffinity=0 skew_tick=1 isolcpus=managed_irq,domain,1,2 intel_pstate=disable nosoftlockup tsc=reliable nohz=on nohz_full=1,2 rcu_nocbs=1,2 irqaffinit
y=0 default_hugepagesz=1G hugepagesz=1G hugepages=4 intel_iommu=on iommu=pt panic_on_warn=1
4. change isolated_core to "1,2,3,4,5,6,7,8" on realtime-virtual-guest-variables.conf
# cat /etc/tuned/realtime-virtual-guest-variables.conf
isolated_cores=1,2,3,4,5,6,7,8
#isolated_cores=1,2
isolate_managed_irq=Y
# tuned-adm profile realtime-virtual-guest
Cannot load profile(s) 'realtime-virtual-guest': Assertion 'isolated_cores contains online CPU(s)' failed.
# reboot
5. check cmdline as below

# cat /proc/cmdline 
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.14.0-142.rt21.142.el9.x86_64 root=UUID=3f98037d-1d74-4076-a661-c4e1c651ba3e ro rhgb quiet crashkernel=1G-4G:192M,4G-64G
:256M,64G-:512M resume=UUID=79143a02-217d-4970-ae71-bfceb5773fa1 console=ttyS0,115200 skew_tick=1 intel_pstate=disable nosoftlockup tsc=nowatchdog nohz=o
n irqaffinity=0 skew_tick=1 isolcpus=managed_irq,domain,1,2,3,4,5,6,7,8 intel_pstate=disable nosoftlockup tsc=reliable nohz=on nohz_full=1,2,3,4,5,6,7,8 
rcu_nocbs=1,2,3,4,5,6,7,8 irqaffinity=0 default_hugepagesz=1G hugepagesz=1G hugepages=4 intel_iommu=on iommu=pt panic_on_warn=1
# tuned-adm list
Available profiles:
- accelerator-performance     - Throughput performance based tuning with disabled higher latency STOP states
- atomic-guest                - Optimize virtual guests based on the Atomic variant
- atomic-host                 - Optimize bare metal systems running the Atomic variant
- balanced                    - General non-specialized tuned profile
- cpu-partitioning            - Optimize for CPU partitioning
- default                     - Legacy default tuned profile
- desktop                     - Optimize for the desktop use-case
- desktop-powersave           - Optmize for the desktop use-case with power saving
- enterprise-storage          - Legacy profile for RHEL6, for RHEL7, please use throughput-performance profile
- hpc-compute                 - Optimize for HPC compute workloads
- intel-sst                   - Configure for Intel Speed Select Base Frequency
- laptop-ac-powersave         - Optimize for laptop with power savings
- laptop-battery-powersave    - Optimize laptop profile with more aggressive power saving
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- mssql                       - Optimize for Microsoft SQL Server
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network perform
ance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- openshift                   - Optimize systems running OpenShift (parent profile)
- openshift-control-plane     - Optimize systems running OpenShift control plane
- openshift-node              - Optimize systems running OpenShift nodes
- optimize-serial-console     - Optimize for serial console use.
- oracle                      - Optimize for Oracle RDBMS
- postgresql                  - Optimize for PostgreSQL server
- powersave                   - Optimize for low power consumption
- realtime                    - Optimize for realtime workloads
- realtime-virtual-guest      - Optimize for realtime workloads running within a KVM guest
- realtime-virtual-host       - Optimize for KVM guests running realtime workloads
- sap-hana                    - Optimize for SAP HANA
- sap-netweaver               - Optimize for SAP NetWeaver
- server-powersave            - Optimize for server power savings
- spectrumscale-ece           - Optimized for Spectrum Scale Erasure Code Edition Servers
- spindown-disk               - Optimize for power saving by spinning-down rotational disks
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
No current active profile.

Actual results:
on step5, after guest reboot. Wrong cpu allocations appear in cmdline even though tuned profile is not running

Expected results:
if run "tuned-adm profile realtime-virtual-guest" failed, cmdline won't be changed. 

Additional info:

Comment 2 RHEL Program Management 2023-09-21 20:52:10 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 3 RHEL Program Management 2023-09-21 21:07:10 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.