-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Monitor diff directory for overlay2 #1770
Conversation
we should cherrypick this onto the v0.27 and v0.26 branch |
cc @tallclair |
actually, lets wait on this until I have done some more digging. |
@derekwaynecarr Yeah, we are returning the path to container rootfs. So, we need to add "diff" here to do the equivalent for cri-o - https://github.com/google/cadvisor/blob/master/container/crio/handler.go#L144 |
during my testing overlay2 didn't show this issue, I'm not sure... |
we need this in cri-o as well @derekwaynecarr @mrunalp |
I tested the directory setup by doing the following:
So we may also have a bug with overlay as well... |
If we want to get to the upper layer of the container in crio, it is as I pointed out earlier https://github.com/google/cadvisor/blob/master/container/crio/handler.go#L144 + /diff. e.g. /var/lib/containers/storage/overlay/1462529fa84a113ec84ef5406c6db96812d792e632c66555e1032404c2431486/diff |
Based on the docker docs, and my own experiments, I think this fixes the overlay2 incorrect root directory issue. @derekwaynecarr would you mind providing a review? |
@mrunalp yes, I'm working on a cri-o fix |
I think this is cherry-pick worthy fwiw. |
@dashpole I will review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Cherrypick of #1770 to 0.27 release branch
Automatic merge from submit-queue (batch tested with PRs 16912, 16931, 16939, 16967, 16978). UPSTREAM: google/cadvisor: 1770: Monitor diff directory for overlay2 google/cadvisor#1770 Fixes per-container disk usage accounting when using overlay2 @derekwaynecarr
Automatic merge from submit-queue. update cadvisor godeps to v0.26.2 Issue: #52336 This is to cherrypick google/cadvisor#1770 to the 1.7 branch. First, I cherrypicked it to the cadvisor v0.26 branch, which is the cadvisor release tied to k8s v1.7. Now, I need to update the vendored version in 1.7 from 0.26.1 to 0.26.2. ```release-note Fix overlay2 container disk metrics for Docker ``` /assign @wojtek-t @dchen1107
👍 |
LGTM 👍 |
Fixes kubernetes/kubernetes#52336
The directory structure of overlay2 is different from overlay, and we should monitor the contents of /var/lib/docker/overlay2/CONTAINER_ID/diff/ instead of just /var/lib/docker/overlay2/CONTAINER_ID/