-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Question client: error fetching host resource usage stats: permission denied #1680
Comments
Can you go through the client logs and share with us the |
@sigil66 Are you still running into this? |
@dadgar we switched to running nomad as root on worker nodes, to deal with the issue. If the issue should be fixed I can test as an unprivileged user. |
@sigil66 I don't think we were ever able to reproduce it. I mainly wanted to see if it was still reproducible for you. If you do test would you mind trying on 0.5.0-rc2? https://releases.hashicorp.com/nomad/0.5.0-rc2/ |
@dadgar sure thing I will do so when I get a few spare cycles and will update accordingly. |
We've now started seeing this on some(!) of our hosts:
In our case it seems as if this started appearing after upgrading to 0.5.0. I'm currently trying to chase down what differences there might be between the hosts that may be causing this. |
After some digging, strace gave me the answer (at least to my cause):
Turns out the disk library used by Nomad to determine disk usage gets all mounted filesystems from /etc/mtab. However, not all of those filesystems are allowed to be stat:ed by a non-root user - which causes the permission denied error. |
@sigil66 I am of the opinion that we close this ticket since reading |
@diptanu However (correct me if I'm wrong) after looking at the code it seems as if Collect() returns as soon as Usage() returns an error. Shouldn't the code be more resilient - i.e. continue to warn about the failed stat, but collect data from the partitions the user actually have permission to read? |
@christoe I agree, could you file an issue with that project and cross link the issues? |
#1680: Continue after not being able to stat a mountpoint
Closed via #2090 |
Thanks! |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
If you have a question, prepend your issue with
[question]
or preferably use the nomad mailing list.If filing a bug please include the following:
Nomad version
Nomad v0.4.1
Operating system and Environment details
Ubuntu 16.04 amd64
Issue
While running nomad as a non root user:
client: error fetching host resource usage stats: permission denied
Looking at:
nomad/client/stats/host.go
Line 73 in 97a7173
I don't think any (could be wrong) of these collection actions should require root. I am guessing scheduling will not work correctly without proper host stats?
Reproduction steps
Run nomad as non root user
Nomad Server logs (if appropriate)
Nomad Client logs (if appropriate)
error fetching host resource usage stats: permission denied
Job file (if appropriate)
The text was updated successfully, but these errors were encountered: