From 66c5e19f9bd057644fab475499ea45bb428ba2b2 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 28 Mar 2014 15:58:14 +0100 Subject: [PATCH] devmapper: Ensure we shut down thin pool cleanly. The change in commit a9fa1a13c3b0a654a96be01ff7ec19e8009b2094 made us only deactivate devices that were mounted. Unfortunately this made us not deactivate the base device. Which caused us to not be able to deactivate the pool. This fixes that by always just deactivating the base device. Docker-DCO-1.1-Signed-off-by: Alexander Larsson (github: alexlarsson) --- runtime/graphdriver/devmapper/deviceset.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime/graphdriver/devmapper/deviceset.go b/runtime/graphdriver/devmapper/deviceset.go index 762e982208..731e9dab8b 100644 --- a/runtime/graphdriver/devmapper/deviceset.go +++ b/runtime/graphdriver/devmapper/deviceset.go @@ -821,6 +821,10 @@ func (devices *DeviceSet) Shutdown() error { info.lock.Unlock() } + if err := devices.deactivateDevice(""); err != nil { + utils.Debugf("Shutdown deactivate base , error: %s\n", err) + } + if err := devices.deactivatePool(); err != nil { utils.Debugf("Shutdown deactivate pool , error: %s\n", err) }