File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ package libpod
44
55import (
66 "encoding/json"
7- "errors"
87 "fmt"
98 "net/http"
109
@@ -13,25 +12,14 @@ import (
1312 api "github.com/containers/podman/v6/pkg/api/types"
1413 "github.com/containers/podman/v6/pkg/domain/entities"
1514 "github.com/containers/podman/v6/pkg/domain/infra/abi"
16- "github.com/containers/podman/v6/pkg/rootless"
1715 "github.com/gorilla/schema"
1816 "github.com/sirupsen/logrus"
19- "go.podman.io/common/pkg/cgroups"
2017)
2118
2219func StatsContainer (w http.ResponseWriter , r * http.Request ) {
2320 runtime := r .Context ().Value (api .RuntimeKey ).(* libpod.Runtime )
2421 decoder := r .Context ().Value (api .DecoderKey ).(* schema.Decoder )
2522
26- // Check if service is running rootless (cheap check)
27- if rootless .IsRootless () {
28- // if so, then verify cgroup v2 available (more expensive check)
29- if isV2 , _ := cgroups .IsCgroup2UnifiedMode (); ! isV2 {
30- utils .Error (w , http .StatusConflict , errors .New ("container stats resource only available for cgroup v2" ))
31- return
32- }
33- }
34-
3523 query := struct {
3624 Containers []string `schema:"containers"`
3725 Stream bool `schema:"stream"`
You can’t perform that action at this time.
0 commit comments