浏览代码

Merge pull request #27128 from anusha-ragunathan/plugin-shutdown

Shutdown plugins after containers.
Anusha Ragunathan 8 年之前
父节点
当前提交
671d01aabf
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      daemon/daemon.go

+ 3 - 2
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()