mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +08:00
cmd/podman/system/service_abi_linux.go: Remove Cgroups v1
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/containers/podman/v6/pkg/rootless"
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"go.podman.io/common/pkg/cgroups"
|
"go.podman.io/common/pkg/cgroups"
|
||||||
"go.podman.io/common/pkg/servicereaper"
|
"go.podman.io/common/pkg/servicereaper"
|
||||||
@@ -15,11 +14,6 @@ func maybeStartServiceReaper() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func maybeMoveToSubCgroup() {
|
func maybeMoveToSubCgroup() {
|
||||||
cgroupv2, _ := cgroups.IsCgroup2UnifiedMode()
|
|
||||||
if rootless.IsRootless() && !cgroupv2 {
|
|
||||||
logrus.Warnf("Running 'system service' in rootless mode without cgroup v2, containers won't survive a 'system service' restart")
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := cgroups.MaybeMoveToSubCgroup(); err != nil {
|
if err := cgroups.MaybeMoveToSubCgroup(); err != nil {
|
||||||
// it is a best effort operation, so just print the
|
// it is a best effort operation, so just print the
|
||||||
// error for debugging purposes.
|
// error for debugging purposes.
|
||||||
|
|||||||
Reference in New Issue
Block a user