-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Podman6: Remove cgroupsv1 #27271
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
Merged
Merged
Podman6: Remove cgroupsv1 #27271
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c134825
TMT: Exclude podman packages from podman-next repo for tests
lsm5 07e4b25
Packit: Bump podman-next repo priority for cockpit tests
lsm5 fffb1b3
Packit: move scripts to contrib/packit-tmt
lsm5 e860773
cmd/podman.persistentRunE(): Fatal linux check if no Cgroups v2
lsm5 f2c9fcd
cmd/podman/containers/unpause: Remove cgroupv1 check
lsm5 4d404f1
libpod/container_internal*.go: Remove Cgroups v1
lsm5 7c45f43
libpod/info_linux.go: Remove Cgroups v1
lsm5 5499b79
libpod/runtime_linux.go: Remove Cgroups v1
lsm5 cb91d90
libpod/runtime_pod_linux.go: Remove Cgroups v1
lsm5 2e6a923
pkg/domain/infra/runtime_libpod.go: Remove Cgroups v1
lsm5 72f8a01
pkg/specgen/generate/validate_linux.go: Remove Cgroups v1
lsm5 faa551a
libpod/runtime_ctr.go: Remove Cgroups v1
lsm5 a12b3e9
libpod/runtime.go: Remove Cgroups v1
lsm5 06bc277
libpod/util_linux.go: Remove Cgroups v1
lsm5 c98c50e
libpod/pod_api.go: Remove Cgroups v1
lsm5 850bae5
pkg/specgen/namespaces.go: Remove Cgroups v1
lsm5 a994aef
pkg/domain/infra/abi/pods_stats.go: Remove Cgroups v1
lsm5 30d07aa
pkg/domain/infra/abi/containers.go: Remove Cgroups v1
lsm5 5d7358d
pkg/api/handlers/libpod/containers_stats.go: Remove Cgroups v1
lsm5 6f43a66
cmd/podman/system/service_abi_linux.go: Remove Cgroups v1
lsm5 5e02967
pkg/api/handlers/compat/containers_create.go: Remove Cgroups v1
lsm5 4970fd2
test/e2e: delete CgV1 skips, delete tests skipped on Cgv2
lsm5 036bf7b
test/system: delete CgV1 skips and skipped CgV2 tests
lsm5 bb3c8b9
docs: Remove Cgroups v1
lsm5 145540f
Remove ContainerStats.PerCPU: CGV1 only
lsm5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| //go:build linux | ||
|
|
||
| package main | ||
|
|
||
| import ( | ||
| "github.com/sirupsen/logrus" | ||
| "go.podman.io/common/pkg/cgroups" | ||
| ) | ||
|
|
||
| func checkSupportedCgroups() { | ||
| unified, err := cgroups.IsCgroup2UnifiedMode() | ||
| if err != nil { | ||
| logrus.Fatalf("Error determining cgroups mode") | ||
| } | ||
| if !unified { | ||
| logrus.Fatalf("Cgroups v1 not supported") | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| //go:build !linux | ||
|
|
||
| package main | ||
|
|
||
| func checkSupportedCgroups() { | ||
| // NOP on Non Linux | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -exo pipefail | ||
|
|
||
| COPR_REPO_FILE="/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:rhcontainerbot:podman-next.repo" | ||
| if compgen -G "$COPR_REPO_FILE" > /dev/null; then | ||
| # We want the priority bump appended to the file, we're not looking | ||
| # to use a variable. | ||
| # shellcheck disable=SC2016 | ||
| sed -i -n '/^priority=/!p;$apriority=1' "$COPR_REPO_FILE" | ||
| fi | ||
| # We want all dependencies from podman-next except podman as podman will be fetched | ||
| # from the packit copr. | ||
| dnf -y upgrade --allowerasing --exclude=podman* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will entirely prevent running Podman (not even
--version) when/sysis not available or readable. Is that OK?(OTOH if we did not abort on an error here, we might still want to abort later if cgroups are not accessible… the c/common PR had a similar iteration. I don’t know enough to have an opinion.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mheon @Luap99 wdyt ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could move it into persistentPreRunE() which should guard all commands that would care about cgroup setup but not block --version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done