icon-cookie
The website uses cookies to optimize your user experience. Using this website grants us the permission to collect certain information essential to the provision of our services to you, but you may change the cookie settings within your browser any time you wish. Learn more
I agree
blank_error__heading
blank_error__body
Text direction?

cgroups v2 Support #3726

Open
crosbymichael opened this issue on Oct 7, 2019 · 26 comments
Open

cgroups v2 Support #3726

crosbymichael opened this issue on Oct 7, 2019 · 26 comments

Comments

Copy link
Member

crosbymichael commented on Oct 7, 2019
edited by AkihiroSuda

Copy link
Member Author
Copy link
Member Author
Copy link
Member Author
Copy link
Member
Copy link
Member

AkihiroSuda commented on Dec 12, 2019
edited

Copy link
Member Author
Copy link
Member Author
Copy link
Member Author
Copy link
Member Author
AkihiroSuda added a commit to AkihiroSuda/containerd that referenced this issue on Dec 12, 2019
dicussed in containerd#3726

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Copy link
Member

AkihiroSuda commented on Dec 12, 2019
edited

Seems we can't remove the suffix cry

$ git diff upstream/master 
diff --git a/metrics/cgroups/v2/pids.go b/metrics/cgroups/v2/pids.go
index 6b693f65..704f87ec 100644
--- a/metrics/cgroups/v2/pids.go
+++ b/metrics/cgroups/v2/pids.go
@@ -26,7 +26,7 @@ import (

 var pidMetrics = []*metric{
        {
-               name: "pids_v2",
+               name: "pids",
                help: "The limit to the number of pids allowed",
                unit: metrics.Unit("limit"),
                vt:   prometheus.GaugeValue,
@@ -42,7 +42,7 @@ var pidMetrics = []*metric{
                },
        },
        {
-               name: "pids_v2",
+               name: "pids",
                help: "The current number of pids",
                unit: metrics.Unit("current"),
                vt:   prometheus.GaugeValue,

$ sudo containerd
INFO[2019-12-13T15:19:04.250646565+09:00] starting containerd                           revision=30c855b7ebe55e47520bfafa91d97a5e3ab8787f.m version=v1.3.0-173-g30c855b7.m
INFO[2019-12-13T15:19:04.292347976+09:00] loading plugin "io.containerd.content.v1.content"...  type=io.containerd.content.v1
INFO[2019-12-13T15:19:04.292417950+09:00] loading plugin "io.containerd.snapshotter.v1.btrfs"...  type=io.containerd.snapshotter.v1
INFO[2019-12-13T15:19:04.292619783+09:00] skip loading plugin "io.containerd.snapshotter.v1.btrfs"...  error="path /var/lib/containerd/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.sna
pshotter.v1
INFO[2019-12-13T15:19:04.292637575+09:00] loading plugin "io.containerd.snapshotter.v1.devmapper"...  type=io.containerd.snapshotter.v1
WARN[2019-12-13T15:19:04.292651194+09:00] failed to load plugin io.containerd.snapshotter.v1.devmapper  error="devmapper not configured"
INFO[2019-12-13T15:19:04.292659193+09:00] loading plugin "io.containerd.snapshotter.v1.aufs"...  type=io.containerd.snapshotter.v1
INFO[2019-12-13T15:19:04.295739560+09:00] loading plugin "io.containerd.snapshotter.v1.native"...  type=io.containerd.snapshotter.v1
INFO[2019-12-13T15:19:04.296165681+09:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"...  type=io.containerd.snapshotter.v1
INFO[2019-12-13T15:19:04.296695724+09:00] loading plugin "io.containerd.snapshotter.v1.zfs"...  type=io.containerd.snapshotter.v1
INFO[2019-12-13T15:19:04.301592785+09:00] loading plugin "io.containerd.metadata.v1.bolt"...  type=io.containerd.metadata.v1
WARN[2019-12-13T15:19:04.301739188+09:00] could not use snapshotter devmapper in metadata plugin  error="devmapper not configured"
INFO[2019-12-13T15:19:04.301763508+09:00] metadata content store policy set             policy=shared
INFO[2019-12-13T15:19:04.302004419+09:00] loading plugin "io.containerd.differ.v1.walking"...  type=io.containerd.differ.v1
INFO[2019-12-13T15:19:04.302109943+09:00] loading plugin "io.containerd.gc.v1.scheduler"...  type=io.containerd.gc.v1
INFO[2019-12-13T15:19:04.302223446+09:00] loading plugin "io.containerd.service.v1.containers-service"...  type=io.containerd.service.v1
INFO[2019-12-13T15:19:04.302248170+09:00] loading plugin "io.containerd.service.v1.content-service"...  type=io.containerd.service.v1
INFO[2019-12-13T15:19:04.302372390+09:00] loading plugin "io.containerd.service.v1.diff-service"...  type=io.containerd.service.v1
INFO[2019-12-13T15:19:04.302397652+09:00] loading plugin "io.containerd.service.v1.images-service"...  type=io.containerd.service.v1
INFO[2019-12-13T15:19:04.302495566+09:00] loading plugin "io.containerd.service.v1.leases-service"...  type=io.containerd.service.v1
INFO[2019-12-13T15:19:04.302520976+09:00] loading plugin "io.containerd.service.v1.namespaces-service"...  type=io.containerd.service.v1
INFO[2019-12-13T15:19:04.302608714+09:00] loading plugin "io.containerd.service.v1.snapshots-service"...  type=io.containerd.service.v1
INFO[2019-12-13T15:19:04.302714671+09:00] loading plugin "io.containerd.runtime.v1.linux"...  type=io.containerd.runtime.v1
INFO[2019-12-13T15:19:04.302791529+09:00] loading plugin "io.containerd.runtime.v2.task"...  type=io.containerd.runtime.v2
INFO[2019-12-13T15:19:04.303051446+09:00] loading plugin "io.containerd.monitor.v1.cgroups"...  type=io.containerd.monitor.v1
INFO[2019-12-13T15:19:04.303622805+09:00] loading plugin "io.containerd.monitor.v1.cgroups-v2"...  type=io.containerd.monitor.v1
panic: descriptor Desc{fqName: "container_pids_current", help: "The current number of pids", constLabels: {}, variableLabels: [container_id namespace]} already exists with the same fully-qualified name and const label values

goroutine 1 [running]:
github.com/containerd/containerd/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0xc000085e80, 0xc00015b5b0, 0x1, 0x1)
        /home/suda/gopath/src/github.com/containerd/containerd/vendor/github.com/prometheus/client_golang/prometheus/registry.go:362 +0xaf
github.com/containerd/containerd/vendor/github.com/prometheus/client_golang/prometheus.MustRegister(...)
        /home/suda/gopath/src/github.com/containerd/containerd/vendor/github.com/prometheus/client_golang/prometheus/registry.go:154
github.com/containerd/containerd/vendor/github.com/docker/go-metrics.Register(...)
        /home/suda/gopath/src/github.com/containerd/containerd/vendor/github.com/docker/go-metrics/register.go:8
github.com/containerd/containerd/metrics/cgroups/v2.New(0xc00031ed80, 0x0, 0x0, 0x0, 0x0)
        /home/suda/gopath/src/github.com/containerd/containerd/metrics/cgroups/v2/cgroups.go:56 +0x361
github.com/containerd/containerd/plugin.(*Registration).Init(0xc0000879e0, 0xc00031ed80, 0x562c7f7716a0)
        /home/suda/gopath/src/github.com/containerd/containerd/plugin/plugin.go:110 +0x3a
github.com/containerd/containerd/services/server.New(0x562c7fa9cd60, 0xc000042098, 0xc000318f00, 0x1, 0x1, 0xc0003078c0)
        /home/suda/gopath/src/github.com/containerd/containerd/services/server/server.go:167 +0xcaa
github.com/containerd/containerd/cmd/containerd/command.App.func1(0xc0000d2580, 0x0, 0xc0002482e0)
        /home/suda/gopath/src/github.com/containerd/containerd/cmd/containerd/command/main.go:177 +0x7fa
github.com/containerd/containerd/vendor/github.com/urfave/cli.HandleAction(0x562c7f7e2180, 0x562c7fa3cf90, 0xc0000d2580, 0xc0000d2580, 0x0)
        /home/suda/gopath/src/github.com/containerd/containerd/vendor/github.com/urfave/cli/app.go:523 +0xc0
github.com/containerd/containerd/vendor/github.com/urfave/cli.(*App).Run(0xc000316c40, 0xc00003c1d0, 0x1, 0x1, 0x0, 0x0)
        /home/suda/gopath/src/github.com/containerd/containerd/vendor/github.com/urfave/cli/app.go:285 +0x5e1
main.main()
        github.com/containerd/containerd/cmd/containerd/main.go:33 +0x51
Measure
Measure
Related Notes
Get a free MyMarkup account to save this article and view it later on any device.
Create account

End User License Agreement

Summary | 3 Annotations
he cgroups lib
2020/06/21 11:19
containerd metrics interfaces
2020/06/21 11:19
CPU/Memory/IO fields are very different from v1
2020/06/21 11:22