summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-20 14:03:13 +0000
committerGitHub <noreply@github.com>2021-10-20 14:03:13 +0000
commit09aade7816e096550e805869f1300d7198aa8f91 (patch)
tree77ad099aae7e8189eb22bdf2afa40b4651f2384b /pkg/domain
parentc15c1540837b25305729bc72d61372098e204151 (diff)
parent46f7d2af189530a1f81d5e0aab5244667846e181 (diff)
downloadpodman-09aade7816e096550e805869f1300d7198aa8f91.tar.gz
podman-09aade7816e096550e805869f1300d7198aa8f91.tar.bz2
podman-09aade7816e096550e805869f1300d7198aa8f91.zip
Merge pull request #12040 from mheon/341_release
Bump to v3.4.1
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/containers.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index 774362d03..d1e430f3b 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -1316,6 +1316,15 @@ func (ic *ContainerEngine) ContainerStats(ctx context.Context, namesOrIds []stri
if options.Interval < 1 {
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)
containerFunc := ic.Libpod.GetRunningContainers