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 1374168 - Files isolated and nohz_full contain values from realtime profile when realtime-virtual-host profile is active
Summary: Files isolated and nohz_full contain values from realtime profile when realti...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: Tereza Cerna
URL:
Whiteboard:
Depends On:
Blocks: 1400961
TreeView+ depends on / blocked
 
Reported: 2016-09-08 07:30 UTC by Tereza Cerna
Modified: 2017-08-01 12:32 UTC (History)
2 users (show)

Fixed In Version: tuned-2.8.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 12:32:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2102 0 normal SHIPPED_LIVE tuned bug fix and enhancement update 2017-08-01 16:07:33 UTC

Description Tereza Cerna 2016-09-08 07:30:56 UTC
Description of problem:
=======================

Bad values were set into files isolated and nohz_full in directory /sys/devices/system/cpu if both configuration files /etc/tuned/realtime-variables.conf and /etc/tuned/realtime-virtual-host-variables.conf are filled, user select profile realtime-virtual-host and reboot system. In isolated and nohz_full files are values of isolated_cores from realtime profile, not from realtime-virtual-host profile. The same problem is also for profile realtime-virtual-guest.

Version:
========

tuned-2.7.1-2.el7.noarch
tuned-profiles-realtime-2.7.1-2.el7.noarch
tuned-profiles-nfv-2.7.1-2.el7.noarch


Steps to Reproduce:
===================

User should have machine with at least 8 cpus.

# cat /etc/tuned/realtime-variables.conf
isolated_cores=1-5
# cat /etc/tuned/realtime-virtual-host-variables.conf
isolated_cores=2-4

# tuned-adm active
Current active profile: balanced
# tuned-adm profile realtime-virtual-host

# reboot

# cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-3.10.0-327.el7.x86_64 root=/dev/mapper/rhel_intel--wildcatpass--05-root ro crashkernel=auto rd.lvm.lv=rhel_intel-wildcatpass-05/root rd.lvm.lv=rhel_intel-wildcatpass-05/swap net.ifnames=0 console=ttyS0,115200n81 isolcpus=1-5 nohz=on nohz_full=1-5 rcu_nocbs=1-5 intel_pstate=disable nosoftlockup
# cat /sys/devices/system/cpu/nohz_full 
1-5
# cat /sys/devices/system/cpu/isolated 
1-5


Actual results:
===============

Files nohz_full and isolated in directory /sys/devices/system/cpu contain values '1-5'. But this is setting from profile realtime, not from realtime-virtual-host.


Expected results:
=================

There should be value '2-4', setting from profile realtime-virtual-host.

# cat /sys/devices/system/cpu/nohz_full 
2-4
# cat /sys/devices/system/cpu/isolated 
2-4

Comment 3 Jaroslav Škarvada 2017-04-03 15:11:29 UTC
Fixed by following upstream commit:
https://github.com/redhat-performance/tuned/commit/0e7933ff0b3a575acd66791611792d6294df7348

Comment 5 Tereza Cerna 2017-04-26 13:02:16 UTC
============================
Verified in:
    tuned-2.8.0-2.el7.noarch
    tuned-profiles-nfv-guest-2.8.0-2.el7.noarch
    tuned-profiles-nfv-host-2.8.0-2.el7.noarch
PASS
============================

# cat /etc/tuned/realtime-variables.conf
isolated_cores=1-4
# cat /etc/tuned/realtime-virtual-guest-variables.conf
isolated_cores=3-6

# tuned-adm profile realtime-virtual-guest
# tuned-adm active
Current active profile: realtime-virtual-guest

# reboot

# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-514.el7.x86_64 root=/dev/mapper/rhel_intel--wildcatpass--02-root ro crashkernel=auto rd.lvm.lv=rhel_intel-wildcatpass-02/root rd.lvm.lv=rhel_intel-wildcatpass-02/swap console=ttyS0,115200n81 isolcpus=3-6 nohz=on nohz_full=3-6 rcu_nocbs=3-6 intel_pstate=disable nosoftlockup

>> There we can see isolcpus=3-6 nohz=on nohz_full=3-6 rcu_nocbs=3-6

# cat /sys/devices/system/cpu/nohz_full 
3-6

# cat /sys/devices/system/cpu/isolated
3-6

--------------------------------------------------

Tested also by automated test case /CoreOS/tuned/Regression/nfv--error-when-try-to-use-nonexisting-cpu

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Checking for the presence of tuned rpm 
:: [   PASS   ] :: Checking for the presence of tuned-profiles-realtime rpm 
:: [   PASS   ] :: Checking for the presence of tuned-profiles-nfv rpm 
:: [   PASS   ] :: This test need machine with at least 8 CPUs (Assert: "56" should be >= "8")
:: [   PASS   ] :: Command 'tuned-adm profile balanced' (Expected 0, got 0)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test REALTIME profile - before reboot
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'echo 'isolated_cores=201-203' > /etc/tuned/realtime-variables.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'tuned-adm active | grep -v realtime' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep "Assertion 'isolated_cores contains present CPU(s)' failed" output' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep "assertion 'isolated_cores contains present CPU(s)' failed" /var/log/tuned/tuned.log' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'isolated_cores=1-3' > /etc/tuned/realtime-variables.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'tuned-adm active | grep realtime' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep "Assertion 'isolated_cores contains present CPU(s)' failed" output' (Expected 1, got 1)
:: [   PASS   ] :: Command 'grep "assertion 'isolated_cores contains present CPU(s)' failed" /var/log/tuned/tuned.log' (Expected 1, got 1)
:: [   PASS   ] :: Command 'touch /var/tmp/tuned.flag1.reboot' (Expected 0, got 0)


### REBOOT ###


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test REALTIME profile - after reboot
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'cat /sys/devices/system/cpu/isolated' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep '1-3' /sys/devices/system/cpu/isolated' (Expected 0, got 0)
:: [   PASS   ] :: Command 'cat /sys/devices/system/cpu/nohz_full' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep -v '1-3' /sys/devices/system/cpu/nohz_full' (Expected 0, got 0)
:: [   PASS   ] :: Command 'cat /proc/cmdline' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep 'isolcpus=1-3' /proc/cmdline' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep -v 'nohz_full=1-3' /proc/cmdline' (Expected 0, got 0)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test REALTIME-VIRTUAL-HOST profile - before reboot
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'echo 'isolated_cores=202-204' > /etc/tuned/realtime-virtual-host-variables.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'tuned-adm active | grep -v realtime-virtual-host' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep "Assertion 'isolated_cores contains present CPU(s)' failed" output' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep "assertion 'isolated_cores contains present CPU(s)' failed" /var/log/tuned/tuned.log' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'isolated_cores=2-4' > /etc/tuned/realtime-virtual-host-variables.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'tuned-adm active | grep realtime-virtual-host' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep "Assertion 'isolated_cores contains present CPU(s)' failed" output' (Expected 1, got 1)
:: [   PASS   ] :: Command 'grep "assertion 'isolated_cores contains present CPU(s)' failed" /var/log/tuned/tuned.log' (Expected 1, got 1)
:: [   PASS   ] :: Command 'touch /var/tmp/tuned.flag2.reboot' (Expected 0, got 0)


### REBOOT ###


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test REALTIME-VIRTUAL-HOST profile - after reboot
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'cat /sys/devices/system/cpu/isolated' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep '2-4' /sys/devices/system/cpu/isolated' (Expected 0, got 0)
:: [   PASS   ] :: Command 'cat /sys/devices/system/cpu/nohz_full' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep '2-4' /sys/devices/system/cpu/nohz_full' (Expected 0, got 0)
:: [   PASS   ] :: Command 'cat /proc/cmdline' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep 'isolcpus=2-4' /proc/cmdline' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep 'nohz_full=2-4' /proc/cmdline' (Expected 0, got 0)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test REALTIME-VIRTUAL-GUEST profile - before reboot
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'echo 'isolated_cores=203-205' > /etc/tuned/realtime-virtual-guest-variables.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'tuned-adm active | grep -v realtime-virtual-guest' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep "Assertion 'isolated_cores contains present CPU(s)' failed" output' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep "assertion 'isolated_cores contains present CPU(s)' failed" /var/log/tuned/tuned.log' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'isolated_cores=3-5' > /etc/tuned/realtime-virtual-guest-variables.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'tuned-adm active | grep realtime-virtual-guest' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep "Assertion 'isolated_cores contains present CPU(s)' failed" output' (Expected 1, got 1)
:: [   PASS   ] :: Command 'grep "assertion 'isolated_cores contains present CPU(s)' failed" /var/log/tuned/tuned.log' (Expected 1, got 1)
:: [   PASS   ] :: Command 'touch /var/tmp/tuned.flag3.reboot' (Expected 0, got 0)


### REBOOT ###


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test REALTIME-VIRTUAL-GUEST profile - after reboot
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'cat /sys/devices/system/cpu/isolated' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep '3-5' /sys/devices/system/cpu/isolated' (Expected 0, got 0)
:: [   PASS   ] :: Command 'cat /sys/devices/system/cpu/nohz_full' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep '3-5' /sys/devices/system/cpu/nohz_full' (Expected 0, got 0)
:: [   PASS   ] :: Command 'cat /proc/cmdline' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep 'isolcpus=3-5' /proc/cmdline' (Expected 0, got 0)
:: [   PASS   ] :: Command 'grep 'nohz_full=3-5' /proc/cmdline' (Expected 0, got 0)
:: [   PASS   ] :: RESULT: Test REALTIME-VIRTUAL-GUEST profile - after reboot

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'rm output' (Expected 0, got 0)
:: [   PASS   ] :: Command 'rm /var/tmp/tuned.flag1.reboot' (Expected 0, got 0)
:: [   PASS   ] :: Command 'rm /var/tmp/tuned.flag2.reboot' (Expected 0, got 0)
:: [   PASS   ] :: Command 'rm /var/tmp/tuned.flag3.reboot' (Expected 0, got 0)
:: [   PASS   ] :: RESULT: Cleanup

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: /CoreOS/tuned/Regression/nfv--error-when-try-to-use-nonexisting-cpu
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: RESULT: /CoreOS/tuned/Regression/nfv--error-when-try-to-use-nonexisting-cpu

Comment 6 errata-xmlrpc 2017-08-01 12:32:51 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, 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-2017:2102


Note You need to log in before you can comment on or make changes to this bug.