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

error trying to get filesystem Device for dir /var/lib/kubelet #44059

Closed
Calpicow opened this issue Apr 4, 2017 · 7 comments
Closed

error trying to get filesystem Device for dir /var/lib/kubelet #44059

Calpicow opened this issue Apr 4, 2017 · 7 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@Calpicow
Copy link
Contributor

Calpicow commented Apr 4, 2017

Looks like cadvisor is having trouble getting metrics for /var/lib/kubelet when it is mounted as tmpfs.

Using CentOS 3.10.0-514.6.1.el7.x86_64

kubelet

E0404 21:03:53.256303   17149 kubelet.go:1642] Failed to check if disk space is available on the root partition: failed to get fs info for "root": error trying to get filesystem Device for dir /var/lib/kubelet: err: could not find device with major: 0, minor: 40 in cached partitions map

/proc/self/mountinfo

122 62 0:40 / /var/lib/kubelet rw,noatime,nodiratime shared:71 - tmpfs tmpfs rw,seclabel

Doesn't appear to be related to #38337 since major/minor numbers match up.

@dims
Copy link
Member

dims commented Apr 5, 2017

Hmm, looks like its coming from here:
https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/google/cadvisor/fs/fs.go#L429

So it's possible that the process needs to be restarted after the directory was mounted? Can you try that? (Since the partitions is cached there)

@Calpicow
Copy link
Contributor Author

Calpicow commented Apr 5, 2017

Restarting kubelet gives the same result.

@mcluseau
Copy link
Contributor

mcluseau commented Apr 8, 2017

I have the same issue under CoreOS Container Linux:

E0407 05:28:05.147388       1 summary.go:97] error while getting metrics summary from Kubelet 10.109.1.4(10.109.1.4:10255): request failed - "500 Internal Server Error", response: "Internal Error: failed RootFsInfo: error trying to get filesystem Device for dir /var/lib/kubelet: err: could not find device with major: 0, minor: 35 in cached partitions map"
# grep 0:35.*kubelet /proc/self/mountinfo 
462 199 0:35 /var/lib/kubelet /var/lib/kubelet rw,relatime shared:1 - tmpfs tmpfs rw,seclabel

In my case, I use CoreOS's kubelet-wrapper (rkt with the "fly" stage0) and /var/lib/kubelet is bind-mounted rshared before starting rkt.

@mcluseau
Copy link
Contributor

mcluseau commented Apr 8, 2017

Which seems to be because tmpfs is not in the list here: https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/google/cadvisor/fs/fs.go#L125

@jdalberg
Copy link

Any chance of a release supporting tmpfs? I see the same on my rktnetes nodes on Ubuntu.

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label May 31, 2017
@0xmichalis
Copy link
Contributor

@kubernetes/sig-node-bugs

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. kind/bug Categorizes issue or PR as related to a bug. labels Jun 4, 2017
@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jun 4, 2017
@Calpicow
Copy link
Contributor Author

Fix has been merged to cadvisor, so closing. Thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

No branches or pull requests

7 participants