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

kubelet: Unable to fetch container log stats: failed to get fsstats when container restart #453

Open
novahe opened this issue Mar 30, 2025 · 0 comments

Comments

@novahe
Copy link

novahe commented Mar 30, 2025

What happened?

Kebelet continues to display "Unable to fetch container log stats" errors trying to access missing logs of docker containers.
I'm not sure what is the mechanism here, while it seems that if somehow the container is not recycled by kebelet, the dangling link to the deleted container is not handled, triggering the file not found error.

cri_stats_provider.go:694] "Unable to fetch container log stats" err="failed to get fsstats for \"/var/log/pods/kube-system_kube-scheduler-xxx_4xxxe/kube-scheduler/15.log\": no such file or directory" containerName="kube-scheduler"
cri_stats_provider.go:694] "Unable to fetch container log stats" err="failed to get fsstats for \"/var/log/pods/kube-system_kube-apiserver-xxx_xxx/kube-apiserver/29.log\": no such file or directory" containerName="kube-apiserver"
cri_stats_provider.go:694] "Unable to fetch container log stats" err="failed to get fsstats for \"/var/log/pods/kube-system_etcd-xxx_0x9/etcd/18.log\": no such file or directory" containerName="etcd"

What did you expect to happen?

automatically remove missing logs

How can we reproduce it (as minimally and precisely as possible)?

Started with kubeadm init --cri-socket unix:///var/run/cri-dockerd.sock.
Remove any exited container from docker
Then "Unable to fetch container log stats" error will be triggered

xref: kubernetes/kubernetes#123231

version:
cri-dockerd v0.3.16
k8s v1.31.1
docker 1.27.x

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

No branches or pull requests

1 participant