pkg/domain/infra/abi/containers.go: Remove Cgroups v1

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2025-11-05 09:29:14 -05:00
parent a994aef330
commit 30d07aa0c8

View File

@@ -34,7 +34,6 @@ import (
"github.com/containers/podman/v6/pkg/util" "github.com/containers/podman/v6/pkg/util"
"github.com/hashicorp/go-multierror" "github.com/hashicorp/go-multierror"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"go.podman.io/common/pkg/cgroups"
"go.podman.io/common/pkg/config" "go.podman.io/common/pkg/config"
"go.podman.io/image/v5/manifest" "go.podman.io/image/v5/manifest"
"go.podman.io/storage" "go.podman.io/storage"
@@ -1620,15 +1619,6 @@ func (ic *ContainerEngine) ContainerStats(ctx context.Context, namesOrIds []stri
if options.Interval < 1 { if options.Interval < 1 {
return nil, errors.New("invalid interval, must be a positive number greater zero") return nil, errors.New("invalid interval, must be a positive number greater zero")
} }
if rootless.IsRootless() {
unified, err := cgroups.IsCgroup2UnifiedMode()
if err != nil {
return nil, err
}
if !unified {
return nil, errors.New("stats is not supported in rootless mode without cgroups v2")
}
}
statsChan = make(chan entities.ContainerStatsReport, 1) statsChan = make(chan entities.ContainerStatsReport, 1)
var containerFunc func() ([]*libpod.Container, error) var containerFunc func() ([]*libpod.Container, error)