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

runtime: Support for host cgroupv2 #4397

Merged
merged 2 commits into from Jul 28, 2022

Conversation

yaoyinnan
Copy link
Member

Added support for cgroups v2 to Kata Containers so that Kata Containers will work on systems that only support cgroups v2.

Fixes: #3073

Signed-off-by: yaoyinnan yaoyinnan@foxmail.com

@katacontainersbot katacontainersbot added the size/large Task of significant size label Jun 6, 2022
@snir911 snir911 added no-backport-needed Changed do not need to be applied to an older branch / repository no-forward-port-needed Changed do not need to be applied to a newer branch / repository labels Jun 7, 2022
@snir911
Copy link
Member

snir911 commented Jun 7, 2022

Nice! Thanks! were you able to run CI jobs locally (or locally, both requires some modifications)?
Also please update the host-cgroups docs (maybe it appears in other docs as well, i didn't check).

/test
(I suppose this should be followed by some new CI jobs that uses cgruoupsv2 host at some point, but meanwhile let's see how it goes with current jobs ;) )

@yaoyinnan
Copy link
Member Author

@snir911 OK I will revise the CI tests and docs later.

@liubin liubin added the soc Summer of Code related label Jun 9, 2022
@yaoyinnan
Copy link
Member Author

Currently the Manager of containerd/cgroups lacks the MoveTo method, I need to wait for the PR (containerd/cgroups#235) to be merged before I can update the mod.

@liyimeng
Copy link

liyimeng commented Jul 5, 2022

@yaoyinnan Thanks for the great work, is it finally ready? would be nice to have it in 2.5.0

Copy link
Member

@bergwolf bergwolf left a comment

Choose a reason for hiding this comment

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

lgtm! @yaoyinnan Please rebase your PR, thanks!

@bergwolf
Copy link
Member

bergwolf commented Jul 7, 2022

There are a few left-overs though:

  1. @yaoyinnan Please update docs about the change, like in docs/install/container-manager/containerd/containerd-install.md and docs/design/host-cgroups.md
  2. Let's switch one of the exiting CI jobs to run cgroups v2 host instead. @GabyCT Is it doable? Or do you prefer to add a new job for cgroupsv2?

@yaoyinnan yaoyinnan requested a review from a team as a code owner July 8, 2022 11:26
@yaoyinnan yaoyinnan force-pushed the 3073/ftr/host-cgroupv2 branch 3 times, most recently from 9a617bf to 093e6f1 Compare July 8, 2022 13:56
@fidencio
Copy link
Member

fidencio commented Jul 8, 2022

This is a very nice work, indeed!
I do believe we should add a new CI job for cgroupsv2.

@yaoyinnan
Copy link
Member Author

@liyimeng Not ready yet, still need to add a new CI job, I will do it soon.

@fidencio Yes, I will add a new CI job later.

@fidencio
Copy link
Member

fidencio commented Jul 8, 2022

@liyimeng Not ready yet, still need to add a new CI job, I will do it soon.

@fidencio Yes, I will add a new CI job later.

Gaby has already a CI setup using Ubuntu 22.04, which comes with cgroupsv2 by default.
She'll make her PR depend on this one, so we should be good to go in that front.

@fidencio
Copy link
Member

fidencio commented Jul 8, 2022

Reference: kata-containers/tests#4902

GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Jul 8, 2022
This PR adds the suppor for ubuntu 22.04 in order to have it
in our kata CI.

Fixes kata-containers#4901
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Jul 8, 2022
This PR adds the suppor for ubuntu 22.04 in order to have it
in our kata CI.

Fixes kata-containers#4901
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
@GabyCT
Copy link
Contributor

GabyCT commented Jul 8, 2022

@bergwolf and @yaoyinnan, we have a CI job that has cgroupsv2 which is Ubuntu 22.04, to trigger that CI, we just need to do /test-ubuntu22

@GabyCT
Copy link
Contributor

GabyCT commented Jul 8, 2022

I put a Depends-On on my PR (which is adding or changing packages) that will change the setup of Ubuntu to test this PR

GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Jul 8, 2022
This PR adds the suppor for ubuntu 22.04 in order to have it
in our kata CI.

Fixes kata-containers#4901
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Jul 8, 2022
This PR adds the suppor for ubuntu 22.04 in order to have it
in our kata CI.

Fixes kata-containers#4901
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Thanks @yaoyinnan.

lgtm

@@ -106,6 +108,73 @@ func TestValidCgroupPath(t *testing.T) {

}

func TestValidCgroupPathV2(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! 😄

@liubin
Copy link
Member

liubin commented Jul 13, 2022

/test

@GabyCT
Copy link
Contributor

GabyCT commented Jul 14, 2022

/test

@GabyCT
Copy link
Contributor

GabyCT commented Jul 14, 2022

/test-ubuntu22

yaoyinnan added a commit to yaoyinnan/kata-containers-tests that referenced this pull request Jul 15, 2022
Fix tests that are failing with cgroupsv2 in ubuntu 22.04.

Fixes: kata-containers#4922
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
yaoyinnan added a commit to yaoyinnan/kata-containers-tests that referenced this pull request Jul 15, 2022
Fix tests that are failing with cgroupsv2 in ubuntu 22.04.

Fixes: kata-containers#4922
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
yaoyinnan added a commit to yaoyinnan/kata-containers-tests that referenced this pull request Jul 15, 2022
Fix tests that are failing with cgroupsv2 in ubuntu 22.04.

Fixes: kata-containers#4922
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
yaoyinnan added a commit to yaoyinnan/kata-containers-tests that referenced this pull request Jul 15, 2022
Fix tests that are failing with cgroupsv2 in ubuntu 22.04.

Fixes: kata-containers#4922
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
yaoyinnan added a commit to yaoyinnan/kata-containers-tests that referenced this pull request Jul 16, 2022
Fix tests that are failing with cgroupsv2 in ubuntu 22.04.

Fixes: kata-containers#4922
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
yaoyinnan added a commit to yaoyinnan/kata-containers-tests that referenced this pull request Jul 16, 2022
Fix tests that are failing with cgroupsv2 in ubuntu 22.04.

Fixes: kata-containers#4922
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
yaoyinnan added a commit to yaoyinnan/kata-containers-tests that referenced this pull request Jul 18, 2022
Fix tests that are failing with cgroupsv2 in ubuntu 22.04.

Fixes: kata-containers#4922
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
@fidencio
Copy link
Member

@yaoyinnan, can we remove the "wip" label and have this one merged?

yaoyinnan added a commit to yaoyinnan/kata-containers-tests that referenced this pull request Jul 28, 2022
Fix tests that are failing with cgroupsv2 in ubuntu 22.04.

Fixes: kata-containers#4922
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
Currently cgroup v2 is supported. Remove the note that host cgroup v2 is not supported.

Fixes: kata-containers#3073

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
Support cgroup v2 on the host. Update vendor containerd/cgroups to add cgroup v2.

Fixes: kata-containers#3073

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
@liubin
Copy link
Member

liubin commented Jul 28, 2022

/test

@liubin liubin removed the wip Work in Progress (PR incomplete - needs more work or rework) label Jul 28, 2022
@liubin liubin merged commit a67402c into kata-containers:main Jul 28, 2022
yaoyinnan added a commit to yaoyinnan/kata-containers-tests that referenced this pull request Jul 28, 2022
Fix tests that are failing with cgroupsv2 in ubuntu 22.04.

Fixes: kata-containers#4922
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
studychao pushed a commit to studychao/tests that referenced this pull request Aug 9, 2022
This PR adds the suppor for ubuntu 22.04 in order to have it
in our kata CI.

Fixes kata-containers#4901
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
fidencio pushed a commit to fidencio/kata-tests that referenced this pull request Aug 31, 2022
This PR adds the suppor for ubuntu 22.04 in order to have it
in our kata CI.

Fixes kata-containers#4901
Depends-on: github.com/kata-containers/kata-containers#4397

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
(cherry picked from commit ba1dd85)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport-needed Changed do not need to be applied to an older branch / repository no-forward-port-needed Changed do not need to be applied to a newer branch / repository size/large Task of significant size soc Summer of Code related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for host cgroupv2
10 participants