Browse code

Merge pull request #24676 from coolljt0725/fix_24674

Fix daemon panic use wrong graphdriver with --live-restore flag

Alexander Morozov authored on 2016/07/16 00:44:01
Showing 1 changed files
... ...
@@ -651,7 +651,7 @@ func (daemon *Daemon) Shutdown() error {
651 651
 	daemon.shutdown = true
652 652
 	// Keep mounts and networking running on daemon shutdown if
653 653
 	// we are to keep containers running and restore them.
654
-	if daemon.configStore.LiveRestore {
654
+	if daemon.configStore.LiveRestore && daemon.containers != nil {
655 655
 		// check if there are any running containers, if none we should do some cleanup
656 656
 		if ls, err := daemon.Containers(&types.ContainerListOptions{}); len(ls) != 0 || err != nil {
657 657
 			return nil