Skip to content

Commit cb331e3

Browse files
authored
Merge pull request #65177 from DCChadwick/osdocs6836
OSDOCS-7065: cgroup v2 is default in OCP 4.14
2 parents 197e1c2 + b567455 commit cb331e3

File tree

8 files changed

+72
-76
lines changed

8 files changed

+72
-76
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ Topics:
507507
File: installing-customizing
508508
- Name: Configuring your firewall
509509
File: configuring-firewall
510-
- Name: Enabling Linux control group version 2 (cgroup v2)
511-
File: enabling-cgroup-v2
510+
- Name: Enabling Linux control group version 1 (cgroup v1)
511+
File: enabling-cgroup-v1
512512
Distros: openshift-enterprise
513513
- Name: Validating an installation
514514
File: validating-an-installation
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
:_content-type: ASSEMBLY
2+
:context: nodes-cluster-cgroups-1
3+
[id="enabling-cgroup-v1"]
4+
= Enabling Linux control group version 1 (cgroup v1)
5+
include::_attributes/common-attributes.adoc[]
6+
7+
toc::[]
8+
9+
10+
As of {product-title} 4.14, {product-title} uses link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 2] (cgroup v2) in your cluster. If you are using cgroup v1 on {product-title} 4.13 or earlier, migrating to {product-title} 4.14 will not automatically update your cgroup configuration to version 2. A fresh installation of {product-title} 4.14 will use cgroup v2 by default. However, you can enable link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/index.html[Linux control group version 1] (cgroup v1) upon installation. Enabling cgroup v1 in {product-title} disables all cgroup v2 controllers and hierarchies in your cluster.
11+
12+
cgroup v2 is the current version of the Linux cgroup API. cgroup v2 offers several improvements over cgroup v1, including a unified hierarchy, safer sub-tree delegation, new features such as link:https://www.kernel.org/doc/html/latest/accounting/psi.html[Pressure Stall Information], and enhanced resource management and isolation.
13+
14+
ifndef::openshift-origin[]
15+
You can switch between cgroup v1 and cgroup v2, as needed, by editing the `node.config` object. For more information, see "Configuring the Linux cgroup on your nodes" in the "Additional resources" of this section.
16+
endif::openshift-origin[]
17+
18+
// The following include statements pull in the module files that comprise
19+
// the assembly. Include any combination of concept, procedure, or reference
20+
// modules required to cover the user story. You can also include other
21+
// assemblies.
22+
23+
ifndef::openshift-origin[]
24+
include::modules/nodes-clusters-cgroups-2-install.adoc[leveloffset=+1]
25+
endif::openshift-origin[]
26+
27+
ifdef::openshift-origin[]
28+
include::modules/nodes-clusters-cgroups-okd-configure.adoc[leveloffset=+1]
29+
endif::openshift-origin[]
30+
31+
.Additional resources
32+
33+
* xref:../../installing/index.adoc#ocp-installation-overview[OpenShift Container Platform installation overview]
34+
* xref:../../nodes/clusters/nodes-cluster-cgroups-2.adoc#nodes-clusters-cgroups-2_nodes-cluster-cgroups-2[Configuring the Linux cgroup on your nodes]

installing/install_config/enabling-cgroup-v2.adoc

Lines changed: 0 additions & 40 deletions
This file was deleted.

installing/installing_openstack/installing-openstack-nfv-preparing.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ include::modules/installation-openstack-ovs-dpdk-requirements.adoc[leveloffset=+
1717

1818
You must configure {rh-openstack} before you install a cluster that uses SR-IOV on it.
1919

20+
When installing a cluster using SR-IOV, you must deploy clusters using cgroup v1. For more information, xref:../../installing/install_config/enabling-cgroup-v1.adoc#enabling-cgroup-v1[Enabling Linux control group version 1 (cgroup v1)].
21+
2022
include::modules/installation-osp-configuring-sr-iov.adoc[leveloffset=+2]
2123

2224
[id="installing-openstack-nfv-preparing-tasks-ovs-dpdk"]

modules/nodes-clusters-cgroups-2-install.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44

55
:_content-type: PROCEDURE
66
[id="nodes-clusters-cgroups-2-install_{context}"]
7-
= Enabling Linux cgroup v2 during installation
7+
= Enabling Linux cgroup v1 during installation
88

9-
You can enable Linux control group version 2 (cgroup v2) when you install a cluster by creating installation manifests.
9+
You can enable Linux control group version 1 (cgroup v1) when you install a cluster by creating installation manifests.
1010

1111
.Procedure
1212

13-
. Create or edit the `node.config` object to specify the `v2` cgroup:
13+
. Create or edit the `node.config` object to specify the `v1` cgroup:
1414
+
1515
[source,yaml]
1616
----
17-
apiVersion: config.openshift.io/v1
17+
apiVersion: config.openshift.io/v2
1818
kind: Node
1919
metadata:
2020
name: cluster
2121
spec:
22-
cgroupMode: "v2"
22+
cgroupMode: "v1"
2323
----
2424

2525
. Proceed with the installation as usual.

modules/nodes-clusters-cgroups-2.adoc

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ endif::[]
1515
= Configuring Linux cgroup
1616

1717
ifdef::post[]
18-
link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 1] (cgroup v1) is enabled by default. You can enable link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 2] (cgroup v2) in your cluster by editing the `node.config` object. Enabling cgroup v2 in {product-title} disables all cgroup version 1 controllers and hierarchies in your cluster.
18+
As of {product-title} 4.14, {product-title} uses link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 2] (cgroup v2) in your cluster. If you are using cgroup v1 on {product-title} 4.13 or earlier, migrating to {product-title} 4.14 will not automatically update your cgroup configuration to version 2. A fresh installation of {product-title} 4.14 will use cgroup v2 by default. However, you can enable link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/index.html[Linux control group version 1] (cgroup v1) upon installation. Enabling cgroup v1 in {product-title} disables all cgroup v2 controllers and hierarchies in your cluster.
1919

20-
cgroup v2 is the next version of the Linux cgroup API. cgroup v2 offers several improvements over cgroup v1, including a unified hierarchy, safer sub-tree delegation, new features such as link:https://www.kernel.org/doc/html/latest/accounting/psi.html[Pressure Stall Information], and enhanced resource management and isolation.
20+
cgroup v2 is the current version of the Linux cgroup API. cgroup v2 offers several improvements over cgroup v1, including a unified hierarchy, safer sub-tree delegation, new features such as link:https://www.kernel.org/doc/html/latest/accounting/psi.html[Pressure Stall Information], and enhanced resource management and isolation.
2121

2222
You can change between cgroup v1 and cgroup v2, as needed. For more information, see "Configuring the Linux cgroup on your nodes" in the "Additional resources" of this section.
2323
endif::post[]
2424

2525
ifdef::nodes[]
26-
You can enable link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1.html[Linux control group version 1] (cgroup v1) or link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 2] (cgroup v2) by editing the `node.config` object. The default is cgroup v1.
26+
You can enable link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/index.html[Linux control group version 1] (cgroup v1) or link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 2] (cgroup v2) by editing the `node.config` object. The default is cgroup v2.
2727
endif::nodes[]
2828

2929
[NOTE]
@@ -37,7 +37,7 @@ Currently, disabling CPU load balancing is not supported by cgroup v2. As a resu
3737
3838
.Procedure
3939

40-
. Enable cgroup v2 on nodes:
40+
. Enable cgroup v1 on nodes:
4141

4242
.. Edit the `node.config` object:
4343
+
@@ -47,12 +47,12 @@ $ oc edit nodes.config/cluster
4747
----
4848

4949
ifdef::post[]
50-
.. Add `spec.cgroupMode: "v2"`:
50+
.. Add `spec.cgroupMode: "v1"`:
5151
+
5252
.Example `node.config` object
5353
[source,yaml]
5454
----
55-
apiVersion: config.openshift.io/v1
55+
apiVersion: config.openshift.io/v2
5656
kind: Node
5757
metadata:
5858
annotations:
@@ -64,17 +64,17 @@ metadata:
6464
generation: 1
6565
name: cluster
6666
ownerReferences:
67-
- apiVersion: config.openshift.io/v1
67+
- apiVersion: config.openshift.io/v2
6868
kind: ClusterVersion
6969
name: version
7070
uid: 36282574-bf9f-409e-a6cd-3032939293eb
7171
resourceVersion: "1865"
7272
uid: 0c0f7a4c-4307-4187-b591-6155695ac85b
7373
spec:
74-
cgroupMode: "v2" <1>
74+
cgroupMode: "v1" <1>
7575
...
7676
----
77-
<1> Enables cgroup v2.
77+
<1> Enables cgroup v1.
7878
endif::post[]
7979

8080
ifdef::nodes[]
@@ -83,7 +83,7 @@ ifdef::nodes[]
8383
.Example `node.config` object
8484
[source,yaml]
8585
----
86-
apiVersion: config.openshift.io/v1
86+
apiVersion: config.openshift.io/v2
8787
kind: Node
8888
metadata:
8989
annotations:
@@ -95,17 +95,17 @@ metadata:
9595
generation: 1
9696
name: cluster
9797
ownerReferences:
98-
- apiVersion: config.openshift.io/v1
98+
- apiVersion: config.openshift.io/v2
9999
kind: ClusterVersion
100100
name: version
101101
uid: 36282574-bf9f-409e-a6cd-3032939293eb
102102
resourceVersion: "1865"
103103
uid: 0c0f7a4c-4307-4187-b591-6155695ac85b
104104
spec:
105-
cgroupMode: "v2" <1>
105+
cgroupMode: "v1" <1>
106106
...
107107
----
108-
<1> Specify `v2` to enable cgroup v2 or `v1` for cgroup v1.
108+
<1> Specify `v1` to enable cgroup v1 or `v2` for cgroup v2.
109109
endif::nodes[]
110110

111111
.Verification
@@ -148,10 +148,10 @@ $ oc describe mc <name>
148148
----
149149
+
150150
ifdef::nodes[]
151-
.Example output for cgroup v1
151+
.Example output for cgroup v2
152152
[source,terminal]
153153
----
154-
apiVersion: machineconfiguration.openshift.io/v1
154+
apiVersion: machineconfiguration.openshift.io/v2
155155
kind: MachineConfig
156156
metadata:
157157
labels:
@@ -162,14 +162,14 @@ spec:
162162
systemd.unified_cgroup_hierarchy=0 <1>
163163
systemd.legacy_systemd_cgroup_controller=1 <2>
164164
----
165-
<1> Enables cgroup v1 in systemd.
166-
<2> Disables cgroup v2.
165+
<1> Enables cgroup v2 in systemd.
166+
<2> Disables cgroup v1.
167167
+
168168
endif::nodes[]
169-
.Example output for cgroup v2
169+
.Example output for cgroup v1
170170
[source,terminal]
171171
----
172-
apiVersion: machineconfiguration.openshift.io/v1
172+
apiVersion: machineconfiguration.openshift.io/v2
173173
kind: MachineConfig
174174
metadata:
175175
labels:
@@ -181,8 +181,8 @@ spec:
181181
- cgroup_no_v1="all" <2>
182182
- psi=1 <3>
183183
----
184-
<1> Enables cgroup v2 in systemd.
185-
<2> Disables cgroup v1.
184+
<1> Enables cgroup v1 in systemd.
185+
<2> Disables cgroup v2.
186186
<3> Enables the Linux Pressure Stall Information (PSI) feature.
187187

188188
. Check the nodes to see that scheduling on the nodes is disabled. This indicates that the change is being applied:
@@ -219,7 +219,7 @@ sh-4.4# chroot /host
219219
----
220220

221221
ifdef::post[]
222-
. Check that the `sys/fs/cgroup/cgroup2fs` file is present on your nodes. This file is created by cgroup v2:
222+
. Check that the `sys/fs/cgroup/cgroup2fs` file is present on your nodes. This file is created by cgroup v1:
223223
+
224224
[source,terminal]
225225
----
@@ -240,16 +240,16 @@ ifdef::nodes[]
240240
$ stat -c %T -f /sys/fs/cgroup
241241
----
242242
+
243-
.Example output for cgroup v1
243+
.Example output for cgroup v2
244244
[source,terminal]
245245
----
246246
tmp2fs
247247
----
248248
+
249-
.Example output for cgroup v2
249+
.Example output for cgroup v1
250250
[source,terminal]
251251
----
252-
cgroup2fs
252+
cgroup1fs
253253
----
254254
endif::nodes[]
255255

modules/nodes-clusters-cgroups-okd-configure.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ ifdef::post[]
1616
[id="nodes-clusters-cgroups-okd-configure_{context}"]
1717
= Configuring the Linux cgroup version on your nodes
1818

19-
By default, {product-title} uses link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 2] (cgroup v2) in your cluster. You can switch to link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1.html[Linux control group version 1] (cgroup v1), if needed, by using a machine config. Enabling cgroup v1 in {product-title} disables the cgroup v2 controllers and hierarchies in your cluster.
19+
As of {product-title} 4.14, {product-title} uses link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 2] (cgroup v2) in your cluster. If you are using cgroup v1 on {product-title} 4.13 or earlier, migrating to {product-title} 4.14 will not automatically update your cgroup configuration to version 2. A fresh installation of {product-title} 4.14 will use cgroup v2 by default. However, you can enable link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/index.html[Linux control group version 1] (cgroup v1) upon installation. Enabling cgroup v1 in {product-title} disables all cgroup v2 controllers and hierarchies in your cluster.
2020

21-
cgroup v2 is the next version of the kernel link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/resource_management_guide/ch01[control group] and offers multiple improvements. However, it can have some unwanted effects on your nodes.
21+
cgroup v2 is the current version of the Linux cgroup API. cgroup v2 offers several improvements over cgroup v1, including a unified hierarchy, safer sub-tree delegation, new features such as link:https://www.kernel.org/doc/html/latest/accounting/psi.html[Pressure Stall Information], and enhanced resource management and isolation.
2222
endif::post[]
2323

2424
ifdef::node[]

nodes/clusters/nodes-cluster-cgroups-2.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
By default, {product-title} uses link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 2] (cgroup v2) in your cluster. You can switch to link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/index.html[Linux control group version 1] (cgroup v1), if needed, by editing the `node.config` object. Enabling cgroup v1 in {product-title} disables all cgroup version 2 controllers and hierarchies in your cluster.
9+
As of {product-title} 4.14, {product-title} uses link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html[Linux control group version 2] (cgroup v2) in your cluster. If you are using cgroup v1 on {product-title} 4.13 or earlier, migrating to {product-title} 4.14 will not automatically update your cgroup configuration to version 2. A fresh installation of {product-title} 4.14 will use cgroup v2 by default. However, you can enable link:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/index.html[Linux control group version 1] (cgroup v1) upon installation. Enabling cgroup v1 in {product-title} disables all cgroup v2 controllers and hierarchies in your cluster.
1010

11-
cgroup v2 offers several improvements over cgroup v1, including a unified hierarchy, safer sub-tree delegation, new features (such as link:https://www.kernel.org/doc/html/latest/accounting/psi.html[Pressure Stall Information]), and enhanced resource management and isolation.
11+
cgroup v2 is the current version of the Linux cgroup API. cgroup v2 offers several improvements over cgroup v1, including a unified hierarchy, safer sub-tree delegation, new features such as link:https://www.kernel.org/doc/html/latest/accounting/psi.html[Pressure Stall Information], and enhanced resource management and isolation.
1212

1313
[NOTE]
1414
====

0 commit comments

Comments
 (0)