From 5628825aa97bb91940c3dcf305d28fbea1f5d1a7 Mon Sep 17 00:00:00 2001 From: Odin Ugedal Date: Wed, 3 Jul 2019 16:59:08 +0200 Subject: [PATCH] shimv2: Add missing page size to Hugetlb Stat Fixes: #1856 Signed-off-by: Odin Ugedal --- containerd-shim-v2/metrics.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/containerd-shim-v2/metrics.go b/containerd-shim-v2/metrics.go index 43633d1f64..cb13f14a36 100644 --- a/containerd-shim-v2/metrics.go +++ b/containerd-shim-v2/metrics.go @@ -31,13 +31,14 @@ func marshalMetrics(s *service, containerID string) (*google_protobuf.Any, error func statsToMetrics(cgStats *vc.CgroupStats) *cgroups.Metrics { var hugetlb []*cgroups.HugetlbStat - for _, v := range cgStats.HugetlbStats { + for pageSize, v := range cgStats.HugetlbStats { hugetlb = append( hugetlb, &cgroups.HugetlbStat{ - Usage: v.Usage, - Max: v.MaxUsage, - Failcnt: v.Failcnt, + Usage: v.Usage, + Max: v.MaxUsage, + Failcnt: v.Failcnt, + Pagesize: pageSize, }) }