1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #28965 from cpuguy83/move_plugin_shutdown

Move plugin shutdown after layerstore shtudown
This commit is contained in:
Anusha Ragunathan 2016-11-30 10:15:49 -08:00 committed by GitHub
commit 9c2f1669a0

View file

@ -792,7 +792,13 @@ func (daemon *Daemon) Shutdown() error {
})
}
// Shutdown plugins after containers. Don't change the order.
if daemon.layerStore != nil {
if err := daemon.layerStore.Cleanup(); err != nil {
logrus.Errorf("Error during layer Store.Cleanup(): %v", err)
}
}
// Shutdown plugins after containers and layerstore. Don't change the order.
daemon.pluginShutdown()
// trigger libnetwork Stop only if it's initialized
@ -800,12 +806,6 @@ func (daemon *Daemon) Shutdown() error {
daemon.netController.Stop()
}
if daemon.layerStore != nil {
if err := daemon.layerStore.Cleanup(); err != nil {
logrus.Errorf("Error during layer Store.Cleanup(): %v", err)
}
}
if err := daemon.cleanupMounts(); err != nil {
return err
}