Bug 959732

Summary: tuned ignores /etc/sysctl.d
Product: Red Hat Enterprise Linux 6 Reporter: Axel Thimm <axel.thimm>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Branislav Blaškovič <bblaskov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: azelinka, bblaskov, jeder, jskarvad
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Previously ktune didn't handle the /etc/sysctl.d directory nor it didn't support more multiple files with sysctl settings. Consequence: The /etc/sysctl.d settings whis is installed by several packages like libvirt was ignored. Fix: The ktune code and profiles were modified. Result: Now all the sysctl settings under the /etc/sysctl.d directory is loaded and then the /etc/sysctl.conf is loaded. Also the user can now specify multiple sysctl files (wildcards are also supported) to load in the tuned profiles.
Story Points: ---
Clone Of:
: 1103691 (view as bug list) Environment:
Last Closed: 2013-11-21 11:34:47 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: 1103691    
Attachments:
Description Flags
Proposed fix none

Description Axel Thimm 2013-05-05 06:52:36 UTC
Description of problem:
sysctl configuration under /etc/sysctl.d is ignored when tuned applies SYSCTL_POST (usually just /etc/sysctl.conf)

Version-Release number of selected component (if applicable):
tuned-0.2.19-11.el6.1.noarch

How reproducible:
Always

Steps to Reproduce:
1.Installed tuned
2.Pick a profile
3.
 
Actual results:
/etc/sysctl.d entries are ignored

Expected results:
/etc/sysctl.d entries should be respected

Additional info:
/etc/sysctl.d is already used by libvirt and vdsm

A crude fix is the following hack into the initscript:
--- /etc/rc.d/init.d/ktune.org	2013-02-05 14:59:01.000000000 +0100
+++ /etc/rc.d/init.d/ktune	2013-05-04 20:19:57.709291163 +0200
@@ -125,8 +125,12 @@
 
         # Apply general sysctl settings afterwards
 	if [ -r "$SYSCTL_POST" ]; then
-	    echo $"Applying sysctl settings from $SYSCTL_POST"
-	    sysctl -e -p "$SYSCTL_POST" >/dev/null 2>&1
+	    if [ "$SYSCTL_POST" = /etc/sysctl.conf ]; then
+		apply_sysctl
+	    else
+		echo $"Applying sysctl settings from $SYSCTL_POST"
+		sysctl -e -p "$SYSCTL_POST" >/dev/null 2>&1
+	    fi
 	fi
     fi
 }

Comment 3 Jaroslav Škarvada 2013-07-23 19:04:20 UTC
Created attachment 777433 [details]
Proposed fix

Comment 6 errata-xmlrpc 2013-11-21 11:34:47 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.

http://rhn.redhat.com/errata/RHBA-2013-1623.html