Explorar o código

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

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Lei Jitang %!s(int64=9) %!d(string=hai) anos
pai
achega
d9e8cea1b6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      daemon/daemon.go

+ 1 - 1
daemon/daemon.go

@@ -651,7 +651,7 @@ func (daemon *Daemon) Shutdown() error {
 	daemon.shutdown = true
 	// Keep mounts and networking running on daemon shutdown if
 	// we are to keep containers running and restore them.
-	if daemon.configStore.LiveRestore {
+	if daemon.configStore.LiveRestore && 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 {
 			return nil