Bug 1367885

Summary: Installation of tuned profiles remove settings in /usr/lib/tuned/realtime-virtual-guest/tuned.conf
Product: Red Hat Enterprise Linux 7 Reporter: Greeshma Gopinath <ggopinat>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: bhu, jeder, jskarvad, lcapitulino
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-17 18:31: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:

Description Greeshma Gopinath 2016-08-17 17:28:22 UTC
Description of problem:
When a realtime system is updated with the tuned packages:
tuned-profiles-nfv-2.5.1-4.el7_2.4.noarch
tuned-profiles-realtime-2.5.1-4.el7_2.4.noarch
tuned-2.5.1-4.el7_2.4.noarch
The settings in /usr/lib/tuned/realtime-virtual-guest/tuned.conf are over-written.

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


How reproducible:
100%

Steps to Reproduce:
1.Install tuned-profiles-nfv-2.5.1-4.el7_2.3.noarch,tuned-profiles-realtime-2.5.1-4.el7_2.3.noarch,tuned-2.5.1-4.el7_2.3.noarch packages.


2.Edit  /usr/lib/tuned/realtime-virtual-guest/tuned.conf so that the bootloader section reads as follows:
[bootloader]
cmdline=isolcpus=${isolated_cores} intel_pstate=disable nosoftlockup

3.reboot

4) Install the newer version of tuned: tuned-profiles-nfv-2.5.1-4.el7_2.4.noarch
tuned-profiles-realtime-2.5.1-4.el7_2.4.noarch
tuned-2.5.1-4.el7_2.4.noarch

5) reboot

Actual results:
"nohz=on nohz_full=${isolated_cpus}" appear in the kernel command line and in /usr/lib/tuned/realtime-virtual-guest/tuned.conf in the bootloader section.

Expected results:
The /usr/lib/tuned/realtime-virtual-guest/tuned.conf should have the settings made in Step 2. The kernel command line should not have nohz set.

Additional info:

Comment 2 Luiz Capitulino 2016-08-17 18:31:42 UTC
I was wrong to ask you to open this BZ. Replacing tuned.conf is
the correct behavior: it's where tuned stores all its tunings.
The file that should not be replaced is /etc/tuned/realtime-virtual-host-variables.conf.

We edit tuned.conf to disable nohz in the guest when running
cyclcitest. This is because cyclictest is able to trig some
worse case scenarios in nohz (which polling apps like DPDK
won't trig). We should open a BZ for this issue instead.

Comment 3 Jaroslav Škarvada 2016-08-18 09:23:53 UTC
Yes, you shouldn't edit system profiles in /usr/lib/tuned. If you need to customize them beyond /etc/tuned/realtime-virtual-host-variables.conf possibilities, you can:

a) copy the profile to /etc/tuned and customize it there, i.e.:
 # cp /usr/lib/tuned/realtime-virtual-guest /etc/tuned

In case there profiles with the same name in /etc/tuned and /usr/lib/tuned, the /etc/tuned takes precedence.

pros: you can easily customize the profile
cons: if system profile is updated, your profile in /etc/tuned will not be updated, you will need to merge the changes by hand

b) create new profile /etc/tuned and include the system profile, then override only what you need, e.g:

 # mkdir -p /etc/tuned/realtime-virtual-guest-custom
 # cat << :EOF > /etc/tuned/realtime-virtual-guest-custom/tuned.conf
 [main]
 include=realtime-virtual-guest

 YOUR_OVERRIDES_HERE
 :EOF

 # tuned-adm profile realtime-virtual-guest-custom

pros: easy to maintain and updates of system profiles will be reflected in your custom profile
cons: overrides could be sometime less clear than full text edits

Comment 4 Luiz Capitulino 2016-08-18 17:10:58 UTC
Option b seems better, but I have to give it a try to be sure. Thanks for the feedback.