Warn if cgroups-v1

Podman v5 will not support cgroups-v1. This commit will print a warning
if it detects a cgroups-v1 system. The warning can be hidden by setting
envvar `PODMAN_CGROUPSV1_WARNING`.

This warning is patched out for RHEL 9 builds as cgroups-v1 will still
be supported on RHEL 9 systems.

Resolves: https://issues.redhat.com/browse/RUN-1957

[NO NEW TESTS NEEDED]

Co-authored-by: Ed Santiago <santiago@redhat.com>
Co-authored-by: Sascha Grunert <sgrunert@redhat.com>
Co-authored-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2024-02-06 16:14:25 +05:30
parent a2f0a44501
commit 01a8539ef0
6 changed files with 28 additions and 1 deletions

View File

@@ -88,6 +88,11 @@ verify_iid_and_name() {
skip "impossible due to pitfalls in our SSH implementation"
fi
# See https://github.com/containers/podman/pull/21431
if [[ -n "$PODMAN_IGNORE_CGROUPSV1_WARNING" ]]; then
skip "impossible to test due to pitfalls in our SSH implementation"
fi
# The testing is the same whether we're root or rootless; all that
# differs is the destination (not-me) username.
if is_rootless; then

View File

@@ -153,6 +153,11 @@ Notify=yes
LogDriver=passthrough
EOF
# FIXME: Temporary until podman fully removes cgroupsv1 support; see #21431
if [[ -n "$PODMAN_IGNORE_CGROUPSV1_WARNING" ]]; then
skip "Way too complicated to test under cgroupsv1, and not worth the effort"
fi
run_quadlet "$quadlet_file"
service_setup $QUADLET_SERVICE_NAME