Bug 889539

Summary: [RFE] create tuned profile for openshift-enterprise nodes
Product: OpenShift Container Platform Reporter: Jeremy Eder <jeder>
Component: ContainersAssignee: Scott Dodson <sdodson>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0.0CC: anli, bleanhar, cryan, gpei, jialiu, jokerman, jskarvad, libra-onpremise-devel, lmeyer, mmccomas, sdodson
Target Milestone: ---Keywords: FutureFeature, NeedsTestCase, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tuned-profiles-openshift-node-0.1.1-2.el6op Doc Type: Enhancement
Doc Text:
Feature: A tuned profile 'openshift-node' is now available which provides baseline tuning options for an OpenShift node host. Reason: OpenShift nodes require several tuning changes in order to achieve best performance. Result: Admins can now apply baseline tuning requirements by installing 'tuned-profiles-openshift-node' on OpenShift node hosts.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-12 13:09:14 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:

Comment 18 Scott Dodson 2014-12-03 22:54:13 UTC
First pass : https://github.com/openshift/enterprise/pull/165

I could find no prior art of folks shipping tuned profiles in a unique package but I think this is a good way to do it. RHS folks ship it in their base package, 'redhat-storage-server'. We could do the same perhaps openshift-enterprise-release?

With this being a unique package I've gone ahead and added a post scriptlet to switch to the 'openshift-enterprise' profile. If we move this into a more universally installed package we may want to reconsider.

I still need to review all the disparate sources of tuning variables, I just wanted to get something working first.

Comment 19 Scott Dodson 2014-12-17 14:31:10 UTC
I've moved this work into the origin-server repository and submitted a new PR for that. Once it's merged into origin-server I'll pull it into OSE 2.2.

Changes since the first PR :
* Moved from an Enterprise specific location into Node RPM SPEC file
* Package name changed to tuned-profiles-openshift-node
* preun step added to switch the profile back to default

Pull Request: https://github.com/openshift/origin-server/pull/6024

Comment 20 openshift-github-bot 2015-01-07 16:48:36 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/2e1c1ec89ca93df2ab885cd1603eeb752db4215c
Node: create tuned-profiles-openshift-node

Bug 889539 - [RFE] create tuned profile for openshift-enterprise nodes
This adds an optional subpackage named 'tuned-profiles-openshift-node' which
contains a tuned profile suitable for OpenShift Node hosts. When installed this
RPM will enable the profile starting tuned if it's not currently running.

Comment 24 Anping Li 2015-01-26 08:26:29 UTC
tuned-profiles-openshift-node can be installed from openshift_node repo, and it 
is activated by default.

This feature is turned on in automation environment, and I will observe performance status on it.

#tuned-adm list
Available profiles:
- virtual-host
- throughput-performance
- virtual-guest
- default
- spindown-disk
- latency-performance
- laptop-battery-powersave
- desktop-powersave
- laptop-ac-powersave
- server-powersave
- openshift-node
- enterprise-storage
Current active profile: openshift-node

Comment 25 Anping Li 2015-01-26 09:25:42 UTC
Since there isn't /etc/sysctl.ktune , it is better to comment SYSCTL="/etc/sysctl.ktune by default.

Comment 26 Scott Dodson 2015-01-26 15:03:18 UTC
Anping,

Ok, I'll comment that out upstream.

I've traced the init scripts and unless a user has created /etc/sysctl.ktune on their own I don't believe this would have any adverse effects and I think it's not likely that they've created /etc/sysctl.ktune as it seems RHEL6 versions of tuned have never used that file.

--
Scott

Comment 28 Gaoyun Pei 2015-02-03 06:54:49 UTC
Verify this bug with tuned-profiles-openshift-node-0.1.1-2.el6op.x86_64

#SYSCTL="/etc/sysctl.ktune" line is commented out in file ktune.sysconfig.

[root@node2 openshift-node]# tuned-adm active
Current active profile: openshift-node
Service tuned: enabled, running
Service ktune: enabled, running

No error logs in /var/log/tuned/tuned.log, so move this bug to verified.

Comment 29 Johnny Liu 2015-02-05 09:58:13 UTC
Found a new issue when remove tuned-profiles-openshift-node package.

# yum erase tuned-profiles-openshift-node
Running Transaction
Error in PREUN scriptlet in rpm package tuned-profiles-openshift-node
/var/tmp/rpm-tmp.v89gEm: line 1: /usr/sbin/tuned-admin: No such file or directory
error: %preun(tuned-profiles-openshift-node-0.1.1-2.el6op.x86_64) scriptlet failed, exit status 127
128 packages excluded due to repository priority protections
tuned-profiles-openshift-node-0.1.1-2.el6op.x86_64 was supposed to be removed but is not!
  Verifying  : tuned-profiles-openshift-node-0.1.1-2.el6op.x86_64                                                                                                                    1/1 

Failed:
  tuned-profiles-openshift-node.x86_64 0:0.1.1-2.el6op                                                                                                                                   

Complete!


# rpm -q --scripts tuned-profiles-openshift-node.x86_64
postinstall scriptlet (using /bin/sh):
/usr/sbin/tuned-adm profile openshift-node
preuninstall scriptlet (using /bin/sh):
/usr/sbin/tuned-admin profile default

# ll /usr/sbin/tuned-admin
ls: cannot access /usr/sbin/tuned-admin: No such file or directory

Seem like a typo.

Comment 30 Johnny Liu 2015-02-06 03:17:37 UTC
The issue in comment 29 is already fixed in 2.2/2015-02-05.3, so move it ON_QA.

Comment 31 Johnny Liu 2015-02-06 03:19:23 UTC
Verified this bug with 2.2/2015-02-05.3, and PASS.


# rpm -q tuned-profiles-openshift-node.x86_64
tuned-profiles-openshift-node-0.1.2-0.el6op.x86_64

# rpm -q --scripts tuned-profiles-openshift-node.x86_64
postinstall scriptlet (using /bin/sh):
/usr/sbin/tuned-adm profile openshift-node > /dev/null 2>&1
preuninstall scriptlet (using /bin/sh):
# reset the tuned profile to the recommended profile
# $1 = 0 when we're being removed > 0 during upgrades
if [ "$1" = 0 ]; then
  /usr/sbin/tuned-adm profile default > /dev/null 2>&1
fi


# yum erase tuned-profiles-openshift-node
<--snip-->
Running Transaction
  Erasing    : tuned-profiles-openshift-node-0.1.2-0.el6op.x86_64                                                                                                                    1/1 
80 packages excluded due to repository priority protections
  Verifying  : tuned-profiles-openshift-node-0.1.2-0.el6op.x86_64                                                                                                                    1/1 

Removed:
  tuned-profiles-openshift-node.x86_64 0:0.1.2-0.el6op                                                                                                                                   

Complete!


Remove package successfully.

Comment 33 errata-xmlrpc 2015-02-12 13:09:14 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://rhn.redhat.com/errata/RHBA-2015-0220.html