-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Upstep v0.15.0 breaks kubernetes deployments due to user nobody switch #703
Comments
So you can get around this by ignoring these mountpoints. There is just something wrong with your regex. I've got it working here with this regex:
We might want to consider ignoring unreadable mountpoints but not sure about this. @SuperQ Thoughts? |
@discordianfish for me neither your regexp worked completely - "--collector.filesystem.ignored-mount-points"
- '^(\/rootfs\/var\/lib\/|\/rootfs\/run\/docker\/|\/var\/run\/docker\/netns\/|\/(host|root)\/sys\/kernel\/debug\/).*' |
I'm having the same issue and it doesn't make much sense, as if I exec into that container, I can read my volumes, I can see it using DF and DU, but I also have those permission denied on my container logs and can't see storage metrics passed to Prometheus. level=error msg="Error on statfs() system call for "/root-disk/run/docker/netns/default": permission denied" source="filesystem_linux.go:57" I can see I can't access root-disk/run/docker from it, its 700 on my host... Any update on this problem? |
@nelsonfassis Are you sure you don't see this with So nothing wrong with the node-exporter. Wondering if there is something we can do to improve the experience. We could just silently skip unreadable mountpoint or skip cgroup mountpoints in the collector.. @SuperQ thoughts? |
We could reduce the message to |
@discordianfish My mistake. I didn't skip any mount points. I would suggest to not read anything but / by default, and an option to add what mounts do you want to check. Would be good for my use case at least. Now that I skipped those folders, everything seems to be working fine for me with node-exporter. Struggling with alertmanager now. |
Going to close this. Let's discuss in #66 the general "UX" of running then node-exporter in container environments. |
This change adds the ability to configure the --collector.filesystem.ignored-mount-points parameter, which is useful in events where a subdirectory cannot be statfs'd by a non-root user. Change-Id: Ie2be8c496aa676e9a3fee5434e0c194615f9cdab See: prometheus/node_exporter#703
* Update openstack-helm-infra from branch 'master' - Merge "Node Exporter: Allow Ignored Mountpoints" - Node Exporter: Allow Ignored Mountpoints This change adds the ability to configure the --collector.filesystem.ignored-mount-points parameter, which is useful in events where a subdirectory cannot be statfs'd by a non-root user. Change-Id: Ie2be8c496aa676e9a3fee5434e0c194615f9cdab See: prometheus/node_exporter#703
On request of @mdlayher ... a tracking issue.
Background: we have been running node_eporter in our Kubernetes cluster so far without problems, being up until 0.14.0 (where it was still running as root as defined in the Dockerfile). For full traceability, the working daemonset yaml config up until now.
Once we did the upstep to 0.15.0 (taking into account the new way to -- prepend collector options), our deployment gave the following errors.
We tried using the ignore-mount-points config flag for filesystem collector as in...
... but this resulted in the same issues. Eventually we went for overwriting the nobody user back again with root as in full config below (runAsUser being the key fix).
The problem is that the paths on the node (/rootfs/var/lib/kubelet and /rootfs/var/lib/docker-latest) are not readable by user nobody and we don't think it's a good idea to make them readable all by other users (third digit in linux permission map).
REF to original discussion: #599
The text was updated successfully, but these errors were encountered: