Fix daemon panic use wrong graphdriver with --live-restore flag
| ... | ... |
@@ -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 |