From ed6e30767e27537ce342baa17659d983a76c5b7e Mon Sep 17 00:00:00 2001 From: Anusha Ragunathan Date: Mon, 3 Oct 2016 15:42:46 -0700 Subject: [PATCH] Shutdown plugins after containers. Fixes #26278 Signed-off-by: Anusha Ragunathan --- daemon/daemon.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index 9911f3d2a3..5837a10aea 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -726,8 +726,6 @@ func (daemon *Daemon) Shutdown() error { // Keep mounts and networking running on daemon shutdown if // we are to keep containers running and restore them. - pluginShutdown() - if daemon.configStore.LiveRestoreEnabled && daemon.containers != nil { // check if there are any running containers, if none we should do some cleanup if ls, err := daemon.Containers(&types.ContainerListOptions{}); len(ls) != 0 || err != nil { @@ -753,6 +751,9 @@ func (daemon *Daemon) Shutdown() error { }) } + // Shutdown plugins after containers. Dont change the order. + pluginShutdown() + // trigger libnetwork Stop only if it's initialized if daemon.netController != nil { daemon.netController.Stop()