From 63c8a31d5006754a9f45bdfb8eabacedc775fe8f Mon Sep 17 00:00:00 2001 From: Seth Jennings Date: Wed, 18 Oct 2017 10:42:10 -0500 Subject: [PATCH] UPSTREAM: google/cadvisor: 1770: Monitor diff directory for overlay2 --- .../github.com/google/cadvisor/container/docker/handler.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vendor/github.com/google/cadvisor/container/docker/handler.go b/vendor/github.com/google/cadvisor/container/docker/handler.go index dab60eabe3df..544a087fc85d 100644 --- a/vendor/github.com/google/cadvisor/container/docker/handler.go +++ b/vendor/github.com/google/cadvisor/container/docker/handler.go @@ -43,7 +43,8 @@ import ( const ( // The read write layers exist here. - aufsRWLayer = "diff" + aufsRWLayer = "diff" + overlay2RWLayer = "diff" // Path to the directory where docker stores log files if the json logging driver is enabled. pathToContainersDir = "containers" @@ -195,8 +196,10 @@ func newDockerContainerHandler( switch storageDriver { case aufsStorageDriver: rootfsStorageDir = path.Join(storageDir, string(aufsStorageDriver), aufsRWLayer, rwLayerID) - case overlayStorageDriver, overlay2StorageDriver: + case overlayStorageDriver: rootfsStorageDir = path.Join(storageDir, string(storageDriver), rwLayerID) + case overlay2StorageDriver: + rootfsStorageDir = path.Join(storageDir, string(storageDriver), rwLayerID, overlay2RWLayer) case zfsStorageDriver: status, err := Status() if err != nil {