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

Incorrect disk space calculation inside docker container #825

Open
ikopylov opened this issue Jul 22, 2023 · 1 comment · May be fixed by #828
Open

Incorrect disk space calculation inside docker container #825

ikopylov opened this issue Jul 22, 2023 · 1 comment · May be fixed by #828
Assignees
Labels
bug Something isn't working

Comments

@ikopylov
Copy link
Member

Looks like we should use frsize instead of bsize here: https://github.com/qoollo/bob/blob/master/bob/src/hw_metrics_collector.rs#L169. But this should be tested.

Statvfs struct declaration: https://man7.org/linux/man-pages/man3/statvfs.3.html

Here is the issue for MacOs: docker/for-mac#2136

@ikopylov ikopylov added the bug Something isn't working label Jul 22, 2023
@ikopylov
Copy link
Member Author

Additionally, there is a problem in disks mapping logic: https://github.com/qoollo/bob/blob/master/bob/src/hw_metrics_collector.rs#L39

It iterates over system disks, but in docker every attached volume has different mount point but same device id, thus the same disk added multiple times. We should invert iteration logic (our disks first) and find a better way of mapping (probably, check path as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants