Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid capacity 0 on image filesystem warning when starting k3s node #1857

Closed
dnoland1 opened this issue Jun 2, 2020 · 25 comments
Closed

Comments

@dnoland1
Copy link
Contributor

dnoland1 commented Jun 2, 2020

Version:

root@ip-10-100-105-140:~# k3s -v
k3s version v1.18.3+k3s1 (96653e8d)

K3s arguments:
/usr/local/bin/k3s server --cluster-cidr 172.16.0.0/16 --service-cidr 192.168.0.0/16 --cluster-dns 192.168.0.10 --no-deploy traefik --kube-apiserver-arg feature-gates=ServiceTopology=true,EndpointSlice=true

Describe the bug
When starting a node, getting the following warning in the k8s events:

24m         Warning   InvalidDiskCapacity       node/ip-10-100-105-140             invalid capacity 0 on image filesystem

To Reproduce

  1. Install k3s.
  2. Run systemctl restart k3s

Expected behavior
Should not see this warning.

Actual behavior
FYI all node events:

$ kubectl get events | grep node
24m         Normal    Starting                  node/ip-10-100-105-140             Starting kube-proxy.
24m         Normal    Starting                  node/ip-10-100-105-140             Starting kubelet.
24m         Warning   InvalidDiskCapacity       node/ip-10-100-105-140             invalid capacity 0 on image filesystem
24m         Normal    NodeHasSufficientMemory   node/ip-10-100-105-140             Node ip-10-100-105-140 status is now: NodeHasSufficientMemory
24m         Normal    NodeHasNoDiskPressure     node/ip-10-100-105-140             Node ip-10-100-105-140 status is now: NodeHasNoDiskPressure
24m         Normal    NodeHasSufficientPID      node/ip-10-100-105-140             Node ip-10-100-105-140 status is now: NodeHasSufficientPID
24m         Normal    NodeNotReady              node/ip-10-100-105-140             Node ip-10-100-105-140 status is now: NodeNotReady
24m         Normal    NodeAllocatableEnforced   node/ip-10-100-105-140             Updated Node Allocatable limit across pods
24m         Normal    NodeReady                 node/ip-10-100-105-140             Node ip-10-100-105-140 status is now: NodeReady

Additional context / logs
Seeing these messages in the logs:

root@ip-10-100-105-140:~# journalctl -u k3s | grep "invalid capacity"
May 27 21:09:46 ip-10-100-105-140 k3s[1444]: E0527 21:09:46.026431    1444 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: invalid capacity 0 on image filesystem
May 27 21:09:46 ip-10-100-105-140 k3s[1444]: E0527 21:09:46.027279    1444 kubelet.go:1301] Image garbage collection failed multiple times in a row: invalid capacity 0 on image filesystem
Jun 01 18:32:56 ip-10-100-105-140 k3s[5512]: E0601 18:32:56.177047    5512 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: invalid capacity 0 on image filesystem
Jun 02 05:39:29 ip-10-100-105-140 k3s[15577]: E0602 05:39:29.274658   15577 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: invalid capacity 0 on image filesystem

gz#10525

@brandond
Copy link
Contributor

brandond commented Jun 2, 2020

Yes, as the error says, it takes a minute for the stats to be collected. cri_stats_provider pulls filesystem utilization from cadvisor, which takes a bit to initialize and collect data before it can be queried. If you look at the complete logs, you'll see another error preceding it:

cri_stats_provider.go:375] Failed to get the info of the filesystem with mountpoint "/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs": unable to find data in memory cache.

This should be harmless and clear within a few seconds after the node starts. Are you seeing otherwise?

@dnoland1
Copy link
Contributor Author

dnoland1 commented Jun 2, 2020

I'd argue that if it's harmless, than it should not be logged as a node warning. If it's expected to take a minute to collect stats, then wait a minute before creating a warning event. Attempting to use node warnings to alert/notify/page our ops staff that there's a potential problem or a concerning event that has occurred that may require attention.

The invalid disk capacity warning does not get triggered when rebooting a RKE-based Kubernetes node:

> kubectl get events -n default | grep node
12m         Normal    NodeHasSufficientMemory   node/ip-10-0-2-10   Node ip-10-0-2-10 status is now: NodeHasSufficientMemory
12m         Normal    NodeHasNoDiskPressure     node/ip-10-0-2-10   Node ip-10-0-2-10 status is now: NodeHasNoDiskPressure
12m         Normal    NodeHasSufficientPID      node/ip-10-0-2-10   Node ip-10-0-2-10 status is now: NodeHasSufficientPID
12m         Normal    NodeAllocatableEnforced   node/ip-10-0-2-10   Updated Node Allocatable limit across pods
12m         Warning   Rebooted                  node/ip-10-0-2-10   Node ip-10-0-2-10 has been rebooted, boot id: 174f565e-022c-4e1f-8fed-8919fbfa3ff8
12m         Normal    NodeNotReady              node/ip-10-0-2-10   Node ip-10-0-2-10 status is now: NodeNotReady
12m         Normal    Starting                  node/ip-10-0-2-10   Starting kube-proxy.
11m         Normal    NodeReady                 node/ip-10-0-2-10   Node ip-10-0-2-10 status is now: NodeReady
11m         Normal    RegisteredNode            node/ip-10-0-2-10   Node ip-10-0-2-10 event: Registered Node ip-10-0-2-10 in Controller

@brandond
Copy link
Contributor

brandond commented Jun 2, 2020

This is unaltered upstream k8s kubelet code: https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/images/image_gc_manager.go#L297 . k3s tries not to change upstream code, just build and package it in a format that's easy to run within a single process.

You're probably not seeing it on your RKE cluster because it uses docker instead of containerd. I suspect you would see different behavior if you used k3s with docker instead of the default containerd backend.

@brandond
Copy link
Contributor

brandond commented Jun 2, 2020

FYI there's still some long-standing cruft around non-docker (CRI) backends in upstream k8s. See the code linked from kubernetes/kubernetes#51798 (comment)

@2637309949
Copy link

is there has any answer? help, i meet it also

@brandond
Copy link
Contributor

Ignore it for now. I don't think there's an open issue in k/k for this specific issue yet - feel free to open one if the warning is causing you a lot of heartburn.

@i5Js
Copy link

i5Js commented Aug 5, 2020

Hi,

I'm having this issue as well. It's super strange, because I can only add correctly one node to the cluster. The other nodes can be added but without any space available to host pod:

pi@noldork3sM2:~ $ kubectl get events -A
NAMESPACE LAST SEEN TYPE REASON OBJECT MESSAGE
default 20m Normal Starting node/noldork3sn1 Starting kubelet.
**default 20m Warning InvalidDiskCapacity node/noldork3sn1 invalid capacity 0 on image filesystem**
default 20m Normal RegisteredNode node/noldork3sn1 Node noldork3sn1 event: Registered Node noldork3sn1 in Controller
default 20m Normal NodeHasSufficientMemory node/noldork3sn1 Node noldork3sn1 status is now: NodeHasSufficientMemory
default 20m Normal NodeHasNoDiskPressure node/noldork3sn1 Node noldork3sn1 status is now: NodeHasNoDiskPressure
default 20m Normal NodeHasSufficientPID node/noldork3sn1 Node noldork3sn1 status is now: NodeHasSufficientPID
default 20m Normal NodeAllocatableEnforced node/noldork3sn1 Updated Node Allocatable limit across pods
default 20m Normal NodeReady node/noldork3sn1 Node noldork3sn1 status is now: NodeReady
default 20m Normal Starting node/noldork3sn1 Starting kube-proxy.

I've tried everything and nothing works. I've even downgraded the kernel version of my raspberry to 4.x and without success

@brandond
Copy link
Contributor

brandond commented Aug 5, 2020

@i5Js that sounds like a different problem - as described above, the warning message is caused by some information not being immediately available at startup, and is cleared several seconds later. It does not prevent anything from working. If your nodes are not working, please open a new issue and fill out the template so that we have all the relevant information from your environment.

@elipavlov
Copy link

I have same problem but with the microk8s.

To me was helpful this thread:
kubernetes/kubernetes#70324

It seems that problem is hiding somewhere behind count of simltaneous watched files, i slightly increased inotify count and it solved my problem.

But root cause is still undetected.

@ruffst
Copy link

ruffst commented May 22, 2021

sudo nano /boot/firmware/cmdline.txt
add the following @beginning of the line:
group_enable=memory cgroup_memory=1

This fixed the Error for me

@cjellick
Copy link
Contributor

Our read on this is that upstream k8s is tearing out cadvisor stats from kubelet as part of the docker-shim work. We don't want to pick up fixing this here because it will likely be fixed upstream once that work is completed.

@cjellick
Copy link
Contributor

@brandond can you find the issue where they're working cadvisor stats collection and link it here?

@selcukmeral
Copy link

Hello to everyone

I was getting the same error when I installed kubernetes cluster via kubeadm. After reading all the comments on the subject, I thought that the problem might be caused by containerd and the following two commands solved my problem, maybe it can help

systemctl restart containerd

systemctl restart kubelet

@rthamrin
Copy link

mine got the same error and has a problem.
all my worker node status Notready.

@rthamrin
Copy link

Hello to everyone

I was getting the same error when I installed kubernetes cluster via kubeadm. After reading all the comments on the subject, I thought that the problem might be caused by containerd and the following two commands solved my problem, maybe it can help

systemctl restart containerd

systemctl restart kubelet

unfortunately, these command is not working on my K3S

@b-long
Copy link

b-long commented Dec 14, 2021

Any update on this issue? I'm also getting invalid capacity 0 on image filesystem when opening k3s in Lens and I'd like to use k3s since microk8s (AFAICT) doesn't fully support Raspberry Pi.

There's no feedback on the suggestion by @ruffst , and my k3s environment does not have containerd or kubelet:

pi@raspberrypi:~ $ sudo systemctl status containerd
Unit containerd.service could not be found.
pi@raspberrypi:~ $ sudo systemctl status kubelet
Unit kubelet.service could not be found.

Other debug info:

pi@raspberrypi:~ $ k3s --version
k3s version v1.21.7+k3s1 (ac705709)
go version go1.16.10
pi@raspberrypi:~ $ sudo su -
root@raspberrypi:~# env PAGER=cat systemctl --lines 100 -l status k3s
● k3s.service - Lightweight Kubernetes
     Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-12-14 16:21:00 GMT; 8min ago
       Docs: https://k3s.io
    Process: 1149 ExecStartPre=/bin/sh -xc ! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service (code=exited, status=0/SUCCESS)
    Process: 1152 ExecStartPre=/sbin/modprobe br_netfilter (code=exited, status=0/SUCCESS)
    Process: 1153 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
   Main PID: 1154 (k3s-server)
      Tasks: 137
     Memory: 379.9M
        CPU: 5min 28.319s
     CGroup: /system.slice/k3s.service
             ├─1154 /usr/local/bin/k3s server
             ├─1283 containerd
             ├─1886 /var/lib/rancher/k3s/data/2e5ae4a7da837f6a2aae4a9144c030efd3bb4c5a870aa27b0faed28b2d55ba63/bin/containerd-shim-runc-v2 -namespace k8s.io -id 89f6ecaf2bd4b74536a5fcd0edb5ac7e5e945dfb5ac6a750ae417614624626c1 -address /run/k3s/containerd/containerd.sock
             ├─1887 /var/lib/rancher/k3s/data/2e5ae4a7da837f6a2aae4a9144c030efd3bb4c5a870aa27b0faed28b2d55ba63/bin/containerd-shim-runc-v2 -namespace k8s.io -id 931de17668fd4fccf6ec476f2086335bd42944c34c2fd515d403d4d881121061 -address /run/k3s/containerd/containerd.sock
             ├─2053 /var/lib/rancher/k3s/data/2e5ae4a7da837f6a2aae4a9144c030efd3bb4c5a870aa27b0faed28b2d55ba63/bin/containerd-shim-runc-v2 -namespace k8s.io -id 382edc7dfe30d342c0832197475d3040da8086bf4d19dfff7f75f5988e43013f -address /run/k3s/containerd/containerd.sock
             ├─2083 /var/lib/rancher/k3s/data/2e5ae4a7da837f6a2aae4a9144c030efd3bb4c5a870aa27b0faed28b2d55ba63/bin/containerd-shim-runc-v2 -namespace k8s.io -id a056d14461a4cb1731d3b92482ff185e318b0ae5797fb0f773d951cf83452213 -address /run/k3s/containerd/containerd.sock
             └─2196 /var/lib/rancher/k3s/data/2e5ae4a7da837f6a2aae4a9144c030efd3bb4c5a870aa27b0faed28b2d55ba63/bin/containerd-shim-runc-v2 -namespace k8s.io -id 63211b5f1976a422648d1058a8a60f7d308c9273bd6cea4a6f974dc62bc244f1 -address /run/k3s/containerd/containerd.sock

Dec 14 16:29:07 raspberrypi k3s[1154]: failed to fetch hugetlb info
Dec 14 16:29:07 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.statHugeTlb
Dec 14 16:29:07 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go:35
Dec 14 16:29:07 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.(*manager).GetStats
Dec 14 16:29:07 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go:123
Dec 14 16:29:07 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer.(*Handler).GetStats
Dec 14 16:29:07 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer/handler.go:83
Dec 14 16:29:07 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/raw.(*rawContainerHandler).GetStats
Dec 14 16:29:07 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/raw/handler.go:232
Dec 14 16:29:07 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).updateStats
Dec 14 16:29:07 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:637
Dec 14 16:29:07 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeepingTick
Dec 14 16:29:07 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:583
Dec 14 16:29:07 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeeping
Dec 14 16:29:07 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:531
Dec 14 16:29:07 raspberrypi k3s[1154]: runtime.goexit
Dec 14 16:29:07 raspberrypi k3s[1154]:         /usr/local/go/src/runtime/asm_arm.s:841], continuing to push stats
Dec 14 16:29:15 raspberrypi k3s[1154]: W1214 16:29:15.913991    1154 container.go:586] Failed to update stats for container "/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc": error while statting cgroup v2: [open /sys/kernel/mm/hugepages: no such file or directory
Dec 14 16:29:15 raspberrypi k3s[1154]: failed to fetch hugetlb info
Dec 14 16:29:15 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.statHugeTlb
Dec 14 16:29:15 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go:35
Dec 14 16:29:15 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.(*manager).GetStats
Dec 14 16:29:15 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go:123
Dec 14 16:29:15 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer.(*Handler).GetStats
Dec 14 16:29:15 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer/handler.go:83
Dec 14 16:29:15 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/raw.(*rawContainerHandler).GetStats
Dec 14 16:29:15 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/raw/handler.go:232
Dec 14 16:29:15 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).updateStats
Dec 14 16:29:15 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:637
Dec 14 16:29:15 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeepingTick
Dec 14 16:29:15 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:583
Dec 14 16:29:15 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeeping
Dec 14 16:29:15 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:531
Dec 14 16:29:15 raspberrypi k3s[1154]: runtime.goexit
Dec 14 16:29:15 raspberrypi k3s[1154]:         /usr/local/go/src/runtime/asm_arm.s:841], continuing to push stats
Dec 14 16:29:16 raspberrypi k3s[1154]: E1214 16:29:16.488774    1154 cadvisor_stats_provider.go:415] "Partial failure issuing cadvisor.ContainerInfoV2" err="partial failures: [\"/kubepods/besteffort/pode6f12ace-e9d7-4e8c-885d-72d0fa059ddb/0a9106b1471a34c12d9eca12eac37a6bf90588e93fa54e425342081daf675e2f\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable/pod3a77e792-537b-4960-9d42-b49871eb70bf/63211b5f1976a422648d1058a8a60f7d308c9273bd6cea4a6f974dc62bc244f1\": RecentStats: unable to find data in memory cache], [\"/kubepods\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/382edc7dfe30d342c0832197475d3040da8086bf4d19dfff7f75f5988e43013f\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a\": RecentStats: unable to find data in memory cache], [\"/system.slice/k3s.service\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/7fe03af659d39427972767aeda2097e770bb60b08564365297dd4b82a14fc315\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable/pod3a77e792-537b-4960-9d42-b49871eb70bf/7636d1bc5c4c767efd68e2c84389266e1fdc4781de8e129d2f8746d273e18698\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc/931de17668fd4fccf6ec476f2086335bd42944c34c2fd515d403d4d881121061\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pode6f12ace-e9d7-4e8c-885d-72d0fa059ddb/89f6ecaf2bd4b74536a5fcd0edb5ac7e5e945dfb5ac6a750ae417614624626c1\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5/31b323fc3473fe7fdbe31f9c20bf8e52c290bb9c918d00e7751aab5f67798e8b\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5/a056d14461a4cb1731d3b92482ff185e318b0ae5797fb0f773d951cf83452213\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable/pod3a77e792-537b-4960-9d42-b49871eb70bf\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc/6ab324717b2dafae7ff0e45e8f8786de5067154b59a69bbfc2cee3ae59f54a02\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pode6f12ace-e9d7-4e8c-885d-72d0fa059ddb\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/ef1f76e317ea2c48997175dc4e0e11ecf6a1aedadcd1f86566e2a35b5d730787\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort\": RecentStats: unable to find data in memory cache]"
Dec 14 16:29:17 raspberrypi k3s[1154]: W1214 16:29:17.946124    1154 container.go:586] Failed to update stats for container "/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5": error while statting cgroup v2: [open /sys/kernel/mm/hugepages: no such file or directory
Dec 14 16:29:17 raspberrypi k3s[1154]: failed to fetch hugetlb info
Dec 14 16:29:17 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.statHugeTlb
Dec 14 16:29:17 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go:35
Dec 14 16:29:17 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.(*manager).GetStats
Dec 14 16:29:17 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go:123
Dec 14 16:29:17 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer.(*Handler).GetStats
Dec 14 16:29:17 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer/handler.go:83
Dec 14 16:29:17 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/raw.(*rawContainerHandler).GetStats
Dec 14 16:29:17 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/raw/handler.go:232
Dec 14 16:29:17 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).updateStats
Dec 14 16:29:17 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:637
Dec 14 16:29:17 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeepingTick
Dec 14 16:29:17 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:583
Dec 14 16:29:17 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeeping
Dec 14 16:29:17 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:531
Dec 14 16:29:17 raspberrypi k3s[1154]: runtime.goexit
Dec 14 16:29:17 raspberrypi k3s[1154]:         /usr/local/go/src/runtime/asm_arm.s:841], continuing to push stats
Dec 14 16:29:18 raspberrypi k3s[1154]: E1214 16:29:18.247061    1154 cadvisor_stats_provider.go:415] "Partial failure issuing cadvisor.ContainerInfoV2" err="partial failures: [\"/kubepods/burstable/pod3a77e792-537b-4960-9d42-b49871eb70bf/7636d1bc5c4c767efd68e2c84389266e1fdc4781de8e129d2f8746d273e18698\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/ef1f76e317ea2c48997175dc4e0e11ecf6a1aedadcd1f86566e2a35b5d730787\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort\": RecentStats: unable to find data in memory cache], [\"/system.slice/k3s.service\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pode6f12ace-e9d7-4e8c-885d-72d0fa059ddb/0a9106b1471a34c12d9eca12eac37a6bf90588e93fa54e425342081daf675e2f\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable/pod3a77e792-537b-4960-9d42-b49871eb70bf\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pode6f12ace-e9d7-4e8c-885d-72d0fa059ddb\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc/6ab324717b2dafae7ff0e45e8f8786de5067154b59a69bbfc2cee3ae59f54a02\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5/a056d14461a4cb1731d3b92482ff185e318b0ae5797fb0f773d951cf83452213\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc/931de17668fd4fccf6ec476f2086335bd42944c34c2fd515d403d4d881121061\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/382edc7dfe30d342c0832197475d3040da8086bf4d19dfff7f75f5988e43013f\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable/pod3a77e792-537b-4960-9d42-b49871eb70bf/63211b5f1976a422648d1058a8a60f7d308c9273bd6cea4a6f974dc62bc244f1\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5/31b323fc3473fe7fdbe31f9c20bf8e52c290bb9c918d00e7751aab5f67798e8b\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/7fe03af659d39427972767aeda2097e770bb60b08564365297dd4b82a14fc315\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pode6f12ace-e9d7-4e8c-885d-72d0fa059ddb/89f6ecaf2bd4b74536a5fcd0edb5ac7e5e945dfb5ac6a750ae417614624626c1\": RecentStats: unable to find data in memory cache], [\"/kubepods\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a\": RecentStats: unable to find data in memory cache]"
Dec 14 16:29:18 raspberrypi k3s[1154]: E1214 16:29:18.270870    1154 summary_sys_containers.go:82] "Failed to get system container stats" err="failed to get cgroup stats for \"/kubepods\": failed to get container info for \"/kubepods\": partial failures: [\"/kubepods\": RecentStats: unable to find data in memory cache]" containerName="/kubepods"
Dec 14 16:29:18 raspberrypi k3s[1154]: E1214 16:29:18.271544    1154 summary_sys_containers.go:82] "Failed to get system container stats" err="failed to get cgroup stats for \"/system.slice/k3s.service\": failed to get container info for \"/system.slice/k3s.service\": partial failures: [\"/system.slice/k3s.service\": RecentStats: unable to find data in memory cache]" containerName="/system.slice/k3s.service"
Dec 14 16:29:18 raspberrypi k3s[1154]: E1214 16:29:18.303273    1154 summary_sys_containers.go:47] "Failed to get system container stats" err="failed to get cgroup stats for \"/kubepods\": failed to get container info for \"/kubepods\": partial failures: [\"/kubepods\": RecentStats: unable to find data in memory cache]" containerName="/kubepods"
Dec 14 16:29:18 raspberrypi k3s[1154]: E1214 16:29:18.303547    1154 summary_sys_containers.go:47] "Failed to get system container stats" err="failed to get cgroup stats for \"/system.slice/k3s.service\": failed to get container info for \"/system.slice/k3s.service\": partial failures: [\"/system.slice/k3s.service\": RecentStats: unable to find data in memory cache]" containerName="/system.slice/k3s.service"
Dec 14 16:29:18 raspberrypi k3s[1154]: E1214 16:29:18.303703    1154 helpers.go:673] "Eviction manager: failed to construct signal" err="system container \"pods\" not found in metrics" signal=allocatableMemory.available
Dec 14 16:29:18 raspberrypi k3s[1154]: W1214 16:29:18.401831    1154 container.go:586] Failed to update stats for container "/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5/31b323fc3473fe7fdbe31f9c20bf8e52c290bb9c918d00e7751aab5f67798e8b": error while statting cgroup v2: [open /sys/kernel/mm/hugepages: no such file or directory
Dec 14 16:29:18 raspberrypi k3s[1154]: failed to fetch hugetlb info
Dec 14 16:29:18 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.statHugeTlb
Dec 14 16:29:18 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go:35
Dec 14 16:29:18 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.(*manager).GetStats
Dec 14 16:29:18 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go:123
Dec 14 16:29:18 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer.(*Handler).GetStats
Dec 14 16:29:18 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer/handler.go:83
Dec 14 16:29:18 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/containerd.(*containerdContainerHandler).GetStats
Dec 14 16:29:18 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/containerd/handler.go:188
Dec 14 16:29:18 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).updateStats
Dec 14 16:29:18 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:637
Dec 14 16:29:18 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeepingTick
Dec 14 16:29:18 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:583
Dec 14 16:29:18 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeeping
Dec 14 16:29:18 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:531
Dec 14 16:29:18 raspberrypi k3s[1154]: runtime.goexit
Dec 14 16:29:18 raspberrypi k3s[1154]:         /usr/local/go/src/runtime/asm_arm.s:841], continuing to push stats
Dec 14 16:29:19 raspberrypi k3s[1154]: W1214 16:29:19.671644    1154 container.go:586] Failed to update stats for container "/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/ef1f76e317ea2c48997175dc4e0e11ecf6a1aedadcd1f86566e2a35b5d730787": error while statting cgroup v2: [open /sys/kernel/mm/hugepages: no such file or directory
Dec 14 16:29:19 raspberrypi k3s[1154]: failed to fetch hugetlb info
Dec 14 16:29:19 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.statHugeTlb
Dec 14 16:29:19 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go:35
Dec 14 16:29:19 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2.(*manager).GetStats
Dec 14 16:29:19 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go:123
Dec 14 16:29:19 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer.(*Handler).GetStats
Dec 14 16:29:19 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/libcontainer/handler.go:83
Dec 14 16:29:19 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/containerd.(*containerdContainerHandler).GetStats
Dec 14 16:29:19 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/container/containerd/handler.go:188
Dec 14 16:29:19 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).updateStats
Dec 14 16:29:19 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:637
Dec 14 16:29:19 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeepingTick
Dec 14 16:29:19 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:583
Dec 14 16:29:19 raspberrypi k3s[1154]: github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager.(*containerData).housekeeping
Dec 14 16:29:19 raspberrypi k3s[1154]:         /go/src/github.com/rancher/k3s/vendor/github.com/google/cadvisor/manager/container.go:531
Dec 14 16:29:19 raspberrypi k3s[1154]: runtime.goexit
Dec 14 16:29:19 raspberrypi k3s[1154]:         /usr/local/go/src/runtime/asm_arm.s:841], continuing to push stats
Dec 14 16:29:28 raspberrypi k3s[1154]: E1214 16:29:28.346528    1154 cadvisor_stats_provider.go:415] "Partial failure issuing cadvisor.ContainerInfoV2" err="partial failures: [\"/kubepods/burstable\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc/931de17668fd4fccf6ec476f2086335bd42944c34c2fd515d403d4d881121061\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pode6f12ace-e9d7-4e8c-885d-72d0fa059ddb\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/ef1f76e317ea2c48997175dc4e0e11ecf6a1aedadcd1f86566e2a35b5d730787\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc/6ab324717b2dafae7ff0e45e8f8786de5067154b59a69bbfc2cee3ae59f54a02\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pode6f12ace-e9d7-4e8c-885d-72d0fa059ddb/89f6ecaf2bd4b74536a5fcd0edb5ac7e5e945dfb5ac6a750ae417614624626c1\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pode6f12ace-e9d7-4e8c-885d-72d0fa059ddb/0a9106b1471a34c12d9eca12eac37a6bf90588e93fa54e425342081daf675e2f\": RecentStats: unable to find data in memory cache], [\"/kubepods\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5/31b323fc3473fe7fdbe31f9c20bf8e52c290bb9c918d00e7751aab5f67798e8b\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a\": RecentStats: unable to find data in memory cache], [\"/system.slice/k3s.service\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5/a056d14461a4cb1731d3b92482ff185e318b0ae5797fb0f773d951cf83452213\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podb5c1cbd9-aa8d-425b-9bfb-0a7c998446d5\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/7fe03af659d39427972767aeda2097e770bb60b08564365297dd4b82a14fc315\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/pod98d94b2c-6278-44c9-b9d7-b2e0ce70201a/382edc7dfe30d342c0832197475d3040da8086bf4d19dfff7f75f5988e43013f\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable/pod3a77e792-537b-4960-9d42-b49871eb70bf\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort/podd527ac7e-974f-47db-ac63-bbcdbe3befdc\": RecentStats: unable to find data in memory cache], [\"/kubepods/besteffort\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable/pod3a77e792-537b-4960-9d42-b49871eb70bf/7636d1bc5c4c767efd68e2c84389266e1fdc4781de8e129d2f8746d273e18698\": RecentStats: unable to find data in memory cache], [\"/kubepods/burstable/pod3a77e792-537b-4960-9d42-b49871eb70bf/63211b5f1976a422648d1058a8a60f7d308c9273bd6cea4a6f974dc62bc244f1\": RecentStats: unable to find data in memory cache]"
Dec 14 16:29:30 raspberrypi k3s[1154]: E1214 16:29:30.095686    1154 summary_sys_containers.go:47] "Failed to get system container stats" err="failed to get cgroup stats for \"/system.slice/k3s.service\": failed to get container info for \"/system.slice/k3s.service\": partial failures: [\"/system.slice/k3s.service\": RecentStats: unable to find data in memory cache]" containerName="/system.slice/k3s.service"
Dec 14 16:29:30 raspberrypi k3s[1154]: E1214 16:29:30.097347    1154 summary_sys_containers.go:47] "Failed to get system container stats" err="failed to get cgroup stats for \"/kubepods\": failed to get container info for \"/kubepods\": partial failures: [\"/kubepods\": RecentStats: unable to find data in memory cache]" containerName="/kubepods"
Dec 14 16:29:30 raspberrypi k3s[1154]: E1214 16:29:30.097612    1154 helpers.go:673] "Eviction manager: failed to construct signal" err="system container \"pods\" not found in metrics" signal=allocatableMemory.available

@brandond
Copy link
Contributor

No. This will need to be fixed upstream. I suspect it will be fixed when we upgrade to containerd v1.6 with the cri-api v1 changes but I haven't confirmed that yet.

The failed to fetch hugetlb info is a separate issue that will be resolved by the upgraded version of runc that we're including with our upcoming release.

@b-long
Copy link

b-long commented Dec 14, 2021

Thanks @brandond . I should have asked my question in a more helpful way. Is there anything that I (or we, the community) can do as a workaround / patch until the upstream addresses this item?

I really do not understand the root cause, nor it's effects, so I'm stumped. If I could understand a bit more, I may be able to help. If it is certain limitations in using k3s on Raspbian, Raspberry Pi, or armhf -- perhaps I can workaround my issue by changing my approach slightly?

My guess, at this stage, is that my k3s deployment is either limited and/or fragile. I'm unsure if I'm in a safe state to continue deploying resources to this installation.

@brandond
Copy link
Contributor

Are you talking about the invalid capacity 0 on image filesystem warning? As described at #1857 (comment) this is just a warning that is logged once at startup before the system collects statistics in the background. It does not indicate any sort of fault or error.

@b-long
Copy link

b-long commented Dec 14, 2021

Sorry, yes, I was referring to invalid capacity 0 on image filesystem. I'll proceed with my installation & deployments.

I came to this page initially, because I saw the error invalid capacity 0 on image filesystem. Hopefully the message failed to fetch hugetlb info in my systemctl output is safe to ignore 🤞

@brandond
Copy link
Contributor

They are both safe to ignore.

@arasic
Copy link

arasic commented Apr 24, 2022

Hello to everyone

I was getting the same error when I installed kubernetes cluster via kubeadm. After reading all the comments on the subject, I thought that the problem might be caused by containerd and the following two commands solved my problem, maybe it can help

systemctl restart containerd

systemctl restart kubelet

I had a 'NotReady' status for master/worker nodes.

This worked perfectly @selcukmeral. Thanks a lot!

andreazorzetto added a commit to aqua-ps/aqua-training-userscript that referenced this issue Sep 9, 2022
andreazorzetto added a commit to aqua-ps/aqua-training-userscript that referenced this issue Sep 9, 2022
@jadsy2107
Copy link

systemctl restart containerd

this worked for me also, after kubeadm init, then apply calico then restart containerd and kubelet is only way the node became Ready

@k3s-io k3s-io locked as resolved and limited conversation to collaborators Nov 7, 2022
@brandond
Copy link
Contributor

brandond commented Nov 7, 2022

This message will continue as long as the kubelet considers this a reportable error. The reason has been laid out in the comments above.

@brandond
Copy link
Contributor

I am going to close this. The message is irritating but not critical, and there does not seem to be any fix for it short of waiting a full stats-collection interval after starting containerd, before starting the kubelet. As that would extend K3s startup by ~20 seconds, we are not going to do that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests