mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
podman-remote: do not check for cgroupv2
With the remote client on linux we should not check for cgroups and hard fail if it is not v2. Only the server side matters not the client. The problem can be reproduced with: unshare -rm sh -c "mount -t tmpfs none /sys/fs/cgroup && ./bin/podman --remote ps" I did not add a regression test as it does not seem to fit well into a test suite, over mounting cgroups seems like not a good idea. Fixes: #29241 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
f2ad52c492
commit
4be46f8661
2 changed files with 8 additions and 3 deletions
|
|
@ -1,13 +1,18 @@
|
|||
//go:build linux
|
||||
//go:build linux && !remote
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.podman.io/common/pkg/cgroups"
|
||||
"go.podman.io/podman/v6/cmd/podman/registry"
|
||||
)
|
||||
|
||||
func checkSupportedCgroups() {
|
||||
if registry.IsRemote() {
|
||||
// In remote mode we should not error for missing cgroups as just the server needs it.
|
||||
return
|
||||
}
|
||||
unified, err := cgroups.IsCgroup2UnifiedMode()
|
||||
if err != nil {
|
||||
logrus.Fatalf("Error determining cgroups mode")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//go:build !linux
|
||||
//go:build !linux || remote
|
||||
|
||||
package main
|
||||
|
||||
func checkSupportedCgroups() {
|
||||
// NOP on Non Linux
|
||||
// NOP on Non Linux or Remote
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue