Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Enable cgroup v2 support #652

Closed
wants to merge 1 commit into from
Closed

Conversation

harche
Copy link
Contributor

@harche harche commented Feb 15, 2021

Add support for cgroup v2 in OpenShift

Signed-off-by: Harshal Patil harpatil@redhat.com

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 15, 2021
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign smarterclayton after the PR has been reviewed.
You can assign the PR to them by writing /assign @smarterclayton in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Harshal Patil <harpatil@redhat.com>
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 17, 2021
@harche
Copy link
Contributor Author

harche commented May 17, 2021

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 17, 2021
@harche
Copy link
Contributor Author

harche commented May 17, 2021

/cc @giuseppe

@openshift-ci openshift-ci bot requested a review from giuseppe May 17, 2021 09:21
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 15, 2021
@m-yosefpor
Copy link

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 15, 2021
@m-yosefpor
Copy link

Any updates on this? I think k8s v1.22 is the version which officially supports cgroupv2 kubernetes/enhancements#2254 (although it was possible to make k8s work with cgroupv2 from prior versions). Also FCOS 34 and later have cgroupv2 enabled by default (however it is disabled in Openshift images)

Is there a plan for Openshift/OKD 4.9 to have an option for enabling that?

P.S. If I understand correctly, it is even possible just now to switch to cgroup v2 by providing kernel args as MC. @giuseppe Is it the only required change to make openshift work with cgroup v2?

@giuseppe
Copy link
Member

P.S. If I understand correctly, it is even possible just now to switch to cgroup v2 by providing kernel args as MC. @giuseppe Is it the only required change to make openshift work with cgroup v2?

yes, that is the only change required for Kubernetes to switch to cgroup v2

@openshift-bot
Copy link

Inactive enhancement proposals go stale after 28d of inactivity.

See https://github.com/openshift/enhancements#life-cycle for details.

Mark the proposal as fresh by commenting /remove-lifecycle stale.
Stale proposals rot after an additional 30d of inactivity and eventually close.
Exclude this proposal from closing by commenting /lifecycle frozen.

If this proposal is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 22, 2021
@m-yosefpor
Copy link

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 22, 2021

### Non-Goals

* Until we have more in-depth understanding of the impact of enabling cgroup v2 on the workloads, we won't make it default and replace it with cgroup v1.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we start considering it as default now?

#### Enable cgroup v2 on master nodes
```yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kind: KubeletConfig
kind: MachineConfig

#### Enable cgroup v2 on worker nodes
```yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kind: KubeletConfig
kind: MachineConfig

@m-yosefpor
Copy link

m-yosefpor commented Sep 22, 2021

@harche I think we need to add a ### Risks and Mitigations sections.

All apps which are deployed on OKD should be revisited to ensure they are not depending on cgroupv1 hierarchy. E.g. right now cluster logging operator has an issue with cgroup v2: see openshift/origin-aggregated-logging#2182. BTW this is not the only change needed in CLO to support cgroup v2, I see there are other dependencies on it in other places, however this is a fatal issue which causes ES to fail to start.
Right now we are running our OKD clusters with cgroup v2 enabled, and everything seems to work fine (except for CLO).

@openshift-bot
Copy link

Inactive enhancement proposals go stale after 28d of inactivity.

See https://github.com/openshift/enhancements#life-cycle for details.

Mark the proposal as fresh by commenting /remove-lifecycle stale.
Stale proposals rot after an additional 7d of inactivity and eventually close.
Exclude this proposal from closing by commenting /lifecycle frozen.

If this proposal is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 20, 2021
@m-yosefpor
Copy link

m-yosefpor commented Oct 20, 2021

In a recent OKD working groups, there is this item:

@vrutkovs :

4.9 - enable cgroupsv2 on new installs? Autoenable on 4.10?

https://hackmd.io/YJBn04R5TDi5Sm9XbOGwZA

@m-yosefpor
Copy link

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 20, 2021
@vrutkovs
Copy link
Member

@m-yosefpor this enhancement is for both OCP and OKD. In OKD we have a liberty of enabling some features before they have landed in OCP

@m-yosefpor
Copy link

@m-yosefpor this enhancement is for both OCP and OKD. In OKD we have a liberty of enabling some features before they have landed in OCP

nice😍. thanks

@harche
Copy link
Contributor Author

harche commented Oct 26, 2021

Closing this in favor of #939

@harche harche closed this Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants