You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying runtime (cri-o) and supporting subsystems are now ready for
46
-
customers to begin their own testing with it. Not all workloads will be
47
-
compatible with cgroup v2, so it will *not* be enabled by default within
48
-
OpenShift at this time.
48
+
cgroup v2 is enabled by default in all the freshly installed Openshift clusters >= 4.14.
49
+
Control Group v1 is a deprecated feature from OCP 4.16 and the support is intended to be removed from OCP >= 4.19
49
50
50
51
Note: This enhancement is focusing on `pure` mode cgroup v2. Mixed mode environments
51
52
may behave differently (metrics, vpa, hpa, etc) since cgroup v1 is not
@@ -70,6 +71,9 @@ Some features of cgroup v2 include:
70
71
71
72
-[ ] Enable cgroup v2 within the Openshift API
72
73
-[ ] Add kernel flags to MCO to enable cgroup v2 on nodes
74
+
-[ ] Add a [CEL validation](https://kubernetes.io/docs/reference/using-api/cel/) to deny updating `CgroupMode` of the `nodes.config.openshift.io` object to `CgroupMode_V1`
75
+
-[ ] Block the upgrades of the OCP clusters that are using cgroup v1 until migrated to cgroup v2
76
+
-[ ] Backport the changes to OCP 4.18, add an upgrade edge in the [cincinnati-graph-data](https://github.com/openshift/cincinnati-graph-data) repository so that all the clusters update to a certain version of 4.18 i.e. 4.18.z before upgrading to 4.19
73
77
74
78
### Non-Goals
75
79
@@ -81,12 +85,10 @@ to gather data from.
81
85
82
86
## Proposal
83
87
84
-
The option to enable cgroup v2 will have to reside in a centralized location.
- Set the upgrade ability of the MCO cluster operator to `false` if a cluster is on cgroup v1
91
+
- A [CEL validation](https://kubernetes.io/docs/reference/using-api/cel/) is introduced to reject the setting of `CgroupModeV1` in the `nodes.config.openshift.io` object's `CgroupMode` spec field.
90
92
91
93
### API Extensions
92
94
@@ -121,19 +123,19 @@ type NodeSpec struct {
121
123
122
124
### Operational Aspects of API Extensions
123
125
124
-
Once the previous API is defined, the MCO will read the configured object and
125
-
set the appropriate kernel options (on bootstrap). The MCO will report an error
126
+
- MCO reads the configured object and
127
+
sets the appropriate kernel options (on bootstrap).
128
+
- The MCO will report an error
126
129
if a user tries to modify/add cgroup related kargs within a MachineConfig.
127
-
128
-
129
-
The following kernel command line arguments would be set when `CgroupMode_v2` is enabled:
130
+
- A CEL validation is introduced to deny the setting of `CgroupMode` field of `nodes.config.openshift.io` object to `CgroupModeV1`
131
+
- MCO also reports error if a user tries to set the `CgroupMode` to `CgroupMode_V1` and sets the cluster operator's status condition of `Upgradeble=False`
132
+
-The following kernel command line arguments would be observed on the machine config pools by default and also when `CgroupMode_v2` is enabled:
130
133
```yaml
131
134
kernelArguments:
132
135
- systemd.unified_cgroup_hierarchy=1
133
136
- cgroup_no_v1="all"
134
137
- psi=1
135
138
```
136
-
137
139
#### Failure Modes
138
140
139
141
N/A
@@ -201,19 +203,40 @@ The following jobs will be run against cgroup v2 periodically and with a minimum
201
203
202
204
### Upgrade / Downgrade Strategy
203
205
204
-
Downgrading a cluster to an OpenShift version not containing cgroup v2 support
206
+
- Downgrading a cluster to an OpenShift version not containing cgroup v2 support
205
207
is unsupported.
206
-
208
+
- Upgrading a cluster which is on cgroup v1 to a version >= 4.19 is blocked until it is migrated to cgroup v2.
209
+
In such case, the MCO cluster operator's status condition is set to `Upgradeable=False` blocking the upgrade.
210
+
- A user/admin has to manually set the `CgroupMode` from `v1` to `v2` as follows to make it `Upgradeable=True` again.
211
+
- A user/admin has to upgrade to a certain minimum version of 4.18.z according to the [cincinnati-graph-data](https://github.com/openshift/cincinnati-graph-data) before upgrading to 4.19 so that there is a seamless upgrade.
212
+
```shell
213
+
# fetch the nodes.config.openshift.io object
214
+
oc edit nodes.config.openshift.io cluster
215
+
# Update the `CgroupMode` field inside the spec to "v2"
216
+
# Wait for the MCO to rollout cgroup v2 related kernel arguments on all the machine config pools
217
+
```
207
218
### Version Skew Strategy
208
219
209
220
A cluster installed with cgroup v2 will abide by the usual skew upgrade path.
210
221
211
222
#### Removing a deprecated feature
223
+
cgroup v1 support would be removed from the future versions of RHEL and hence the setting of `CgroupMode_V1` would be denied by [CEL validation](https://kubernetes.io/docs/reference/using-api/cel/) from OCP clusters(>= 4.19)
212
224
213
-
N/A
225
+
Note: Even after removing the support to configure cgroup v1 from OCP, the `CgroupMode_V1` is not deleted as one of the enum values for the `CgroupMode` in the interest of non-breaking API changes.
214
226
215
227
## Implementation History
216
-
228
+
Following code change inside the MCO [operator](https://github.com/openshift/machine-config-operator/blob/master/pkg/operator/status.go#L265)'s `pkg/operator/status.go` sets the ClusterOperator's `Upgradeable` status to `False` if the cluster is found to be using `CgroupMode_V1`
coStatusCondition.Message = "Cluster is using cgroup v1 and is not upgradable. Please update the `CgroupMode` in the `nodes.config.openshift.io` object to 'v2'. Once upgraded, the cluster cannot be changed back to cgroup v1"
0 commit comments