Skip to content

Commit 8c4910a

Browse files
author
OpenShift Bot
committed
Merge pull request #1016 from sdodson/BZ1190654
Merged by openshift-bot
2 parents 9aa4f9b + 6ee8bba commit 8c4910a

File tree

4 files changed

+90
-4
lines changed

4 files changed

+90
-4
lines changed

openshift.spec

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,12 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
126126

127127
ln -s %{_bindir}/openshift %{buildroot}%{_bindir}/osc
128128

129-
mkdir -p %{buildroot}%{_libdir}/tuned/openshift-node
130-
install -m 0644 -t %{buildroot}%{_libdir}/tuned/openshift-node tuned/openshift-node/tuned.conf
129+
install -d -m 0755 %{buildroot}%{_prefix}/lib/tuned/openshift-node-{guest,host}
130+
install -m 0644 tuned/openshift-node-guest/tuned.conf %{buildroot}%{_prefix}/lib/tuned/openshift-node-guest/
131+
install -m 0644 tuned/openshift-node-host/tuned.conf %{buildroot}%{_prefix}/lib/tuned/openshift-node-host/
132+
install -d -m 0755 %{buildroot}%{_mandir}/man7
133+
install -m 0644 tuned/man/tuned-profiles-openshift-node.7 %{buildroot}%{_mandir}/man7/tuned-profiles-openshift-node.7
134+
131135

132136
%files
133137
%defattr(-,root,root,-)
@@ -168,10 +172,17 @@ install -m 0644 -t %{buildroot}%{_libdir}/tuned/openshift-node tuned/openshift-n
168172

169173
%files -n tuned-profiles-openshift-node
170174
%defattr(-,root,root,-)
171-
%{_libdir}/tuned/openshift-node
175+
%{_prefix}/lib/tuned/openshift-node-host
176+
%{_prefix}/lib/tuned/openshift-node-guest
177+
%{_mandir}/man7/tuned-profiles-openshift-node.7*
172178

173179
%post -n tuned-profiles-openshift-node
174-
/usr/sbin/tuned-adm profile openshift-node > /dev/null 2>&1
180+
recommended=`/usr/sbin/tuned-adm recommend`
181+
if [[ "${recommended}" =~ guest ]] ; then
182+
/usr/sbin/tuned-adm profile openshift-node-guest > /dev/null 2>&1
183+
else
184+
/usr/sbin/tuned-adm profile openshift-node-host > /dev/null 2>&1
185+
fi
175186

176187
%preun -n tuned-profiles-openshift-node
177188
# reset the tuned profile to the recommended profile
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.\"/*
2+
.\" * All rights reserved
3+
.\" * Copyright (C) 2015 Red Hat, Inc.
4+
.\" * Authors: Jaroslav Škarvada, Scott Dodson
5+
.\" *
6+
.\" * This program is free software; you can redistribute it and/or
7+
.\" * modify it under the terms of the GNU General Public License
8+
.\" * as published by the Free Software Foundation; either version 2
9+
.\" * of the License, or (at your option) any later version.
10+
.\" *
11+
.\" * This program is distributed in the hope that it will be useful,
12+
.\" * but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
.\" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
.\" * GNU General Public License for more details.
15+
.\" *
16+
.\" * You should have received a copy of the GNU General Public License
17+
.\" * along with this program; if not, write to the Free Software
18+
.\" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
.\" */
20+
.\"
21+
.TH TUNED_PROFILES_OPENSHIFT_NODE "7" "12 Feb 2015" "OpenShift" "tuned"
22+
.SH NAME
23+
tuned\-profiles\-openshift-node - description of profiles provided for OpenShift
24+
25+
.SH DESCRIPTION
26+
These profiles are provided for OpenShift nodes. They provide performance
27+
optimizations for OpenShift Nodes running on either bare metal
28+
(openshift-node-host) or virtual machines (openshift-node-guest).
29+
30+
.SH PROFILES
31+
The following profiles are provided:
32+
33+
.TP
34+
.BI "openshift-node\-host"
35+
Profile optimized for OpenShift hosts (bare metal). It is based on throughput\-performance
36+
profile. It additionally increases SELinux AVC cache, PID limit and tunes
37+
netfilter connections tracking.
38+
39+
.TP
40+
.BI "openshift-node\-guest"
41+
Profile optimized for virtual OpenShift guests. It is based on virtual\-guest
42+
profile. It additionally increases SELinux AVC cache, PID limit and tunes
43+
netfilter connections tracking.
44+
45+
.SH "FILES"
46+
.NF
47+
.I /etc/tuned/*
48+
.I /usr/lib/tuned/*
49+
50+
.SH "SEE ALSO"
51+
.BR tuned (8)
52+
.BR tuned\-adm (8)
53+
.BR tuned\-profiles (7)
54+
.BR tuned\-profiles\-sap (7)
55+
.BR tuned\-profiles\-sap\-hana (7)
56+
.BR tuned\-profiles\-compat (7)
57+
.SH AUTHOR
58+
.NF
59+
Scott Dodson <[email protected]>

tuned/openshift-node-guest/tuned.conf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# tuned configuration
3+
#
4+
5+
[main]
6+
include=virtual-guest
7+
8+
[selinux]
9+
avc_cache_threshold=65536
10+
11+
[net]
12+
nf_conntrack_hashsize=131072
13+
14+
[sysctl]
15+
kernel.pid_max=131072
16+
net.netfilter.nf_conntrack_max=1048576

0 commit comments

Comments
 (0)