Merged by openshift-bot
OpenShift Bot authored on 2015/04/10 23:14:58... | ... |
@@ -126,8 +126,12 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name} |
126 | 126 |
|
127 | 127 |
ln -s %{_bindir}/openshift %{buildroot}%{_bindir}/osc |
128 | 128 |
|
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 |
+ |
|
131 | 135 |
|
132 | 136 |
%files |
133 | 137 |
%defattr(-,root,root,-) |
... | ... |
@@ -168,10 +172,17 @@ install -m 0644 -t %{buildroot}%{_libdir}/tuned/openshift-node tuned/openshift-n |
168 | 168 |
|
169 | 169 |
%files -n tuned-profiles-openshift-node |
170 | 170 |
%defattr(-,root,root,-) |
171 |
-%{_libdir}/tuned/openshift-node |
|
171 |
+%{_prefix}/lib/tuned/openshift-node-host |
|
172 |
+%{_prefix}/lib/tuned/openshift-node-guest |
|
173 |
+%{_mandir}/man7/tuned-profiles-openshift-node.7* |
|
172 | 174 |
|
173 | 175 |
%post -n tuned-profiles-openshift-node |
174 |
-/usr/sbin/tuned-adm profile openshift-node > /dev/null 2>&1 |
|
176 |
+recommended=`/usr/sbin/tuned-adm recommend` |
|
177 |
+if [[ "${recommended}" =~ guest ]] ; then |
|
178 |
+ /usr/sbin/tuned-adm profile openshift-node-guest > /dev/null 2>&1 |
|
179 |
+else |
|
180 |
+ /usr/sbin/tuned-adm profile openshift-node-host > /dev/null 2>&1 |
|
181 |
+fi |
|
175 | 182 |
|
176 | 183 |
%preun -n tuned-profiles-openshift-node |
177 | 184 |
# reset the tuned profile to the recommended profile |
178 | 185 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,59 @@ |
0 |
+.\"/* |
|
1 |
+.\" * All rights reserved |
|
2 |
+.\" * Copyright (C) 2015 Red Hat, Inc. |
|
3 |
+.\" * Authors: Jaroslav Škarvada, Scott Dodson |
|
4 |
+.\" * |
|
5 |
+.\" * This program is free software; you can redistribute it and/or |
|
6 |
+.\" * modify it under the terms of the GNU General Public License |
|
7 |
+.\" * as published by the Free Software Foundation; either version 2 |
|
8 |
+.\" * of the License, or (at your option) any later version. |
|
9 |
+.\" * |
|
10 |
+.\" * This program is distributed in the hope that it will be useful, |
|
11 |
+.\" * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+.\" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+.\" * GNU General Public License for more details. |
|
14 |
+.\" * |
|
15 |
+.\" * You should have received a copy of the GNU General Public License |
|
16 |
+.\" * along with this program; if not, write to the Free Software |
|
17 |
+.\" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
18 |
+.\" */ |
|
19 |
+.\" |
|
20 |
+.TH TUNED_PROFILES_OPENSHIFT_NODE "7" "12 Feb 2015" "OpenShift" "tuned" |
|
21 |
+.SH NAME |
|
22 |
+tuned\-profiles\-openshift-node - description of profiles provided for OpenShift |
|
23 |
+ |
|
24 |
+.SH DESCRIPTION |
|
25 |
+These profiles are provided for OpenShift nodes. They provide performance |
|
26 |
+optimizations for OpenShift Nodes running on either bare metal |
|
27 |
+(openshift-node-host) or virtual machines (openshift-node-guest). |
|
28 |
+ |
|
29 |
+.SH PROFILES |
|
30 |
+The following profiles are provided: |
|
31 |
+ |
|
32 |
+.TP |
|
33 |
+.BI "openshift-node\-host" |
|
34 |
+Profile optimized for OpenShift hosts (bare metal). It is based on throughput\-performance |
|
35 |
+profile. It additionally increases SELinux AVC cache, PID limit and tunes |
|
36 |
+netfilter connections tracking. |
|
37 |
+ |
|
38 |
+.TP |
|
39 |
+.BI "openshift-node\-guest" |
|
40 |
+Profile optimized for virtual OpenShift guests. It is based on virtual\-guest |
|
41 |
+profile. It additionally increases SELinux AVC cache, PID limit and tunes |
|
42 |
+netfilter connections tracking. |
|
43 |
+ |
|
44 |
+.SH "FILES" |
|
45 |
+.NF |
|
46 |
+.I /etc/tuned/* |
|
47 |
+.I /usr/lib/tuned/* |
|
48 |
+ |
|
49 |
+.SH "SEE ALSO" |
|
50 |
+.BR tuned (8) |
|
51 |
+.BR tuned\-adm (8) |
|
52 |
+.BR tuned\-profiles (7) |
|
53 |
+.BR tuned\-profiles\-sap (7) |
|
54 |
+.BR tuned\-profiles\-sap\-hana (7) |
|
55 |
+.BR tuned\-profiles\-compat (7) |
|
56 |
+.SH AUTHOR |
|
57 |
+.NF |
|
58 |
+Scott Dodson <sdodson@redhat.com> |
0 | 59 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,16 @@ |
0 |
+# |
|
1 |
+# tuned configuration |
|
2 |
+# |
|
3 |
+ |
|
4 |
+[main] |
|
5 |
+include=virtual-guest |
|
6 |
+ |
|
7 |
+[selinux] |
|
8 |
+avc_cache_threshold=65536 |
|
9 |
+ |
|
10 |
+[net] |
|
11 |
+nf_conntrack_hashsize=131072 |
|
12 |
+ |
|
13 |
+[sysctl] |
|
14 |
+kernel.pid_max=131072 |
|
15 |
+net.netfilter.nf_conntrack_max=1048576 |
0 | 16 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,16 @@ |
0 |
+# |
|
1 |
+# tuned configuration |
|
2 |
+# |
|
3 |
+ |
|
4 |
+[main] |
|
5 |
+include=throughput-performance |
|
6 |
+ |
|
7 |
+[selinux] |
|
8 |
+avc_cache_threshold=65536 |
|
9 |
+ |
|
10 |
+[net] |
|
11 |
+nf_conntrack_hashsize=131072 |
|
12 |
+ |
|
13 |
+[sysctl] |
|
14 |
+kernel.pid_max=131072 |
|
15 |
+net.netfilter.nf_conntrack_max=1048576 |
0 | 16 |
deleted file mode 100644 |
... | ... |
@@ -1,16 +0,0 @@ |
1 |
-# |
|
2 |
-# tuned configuration |
|
3 |
-# |
|
4 |
- |
|
5 |
-[main] |
|
6 |
-include=throughput-performance |
|
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 |