mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #19775 from coolljt0725/fix_prepare_mount
daemon: don't prepare mountpoint for restart container
This commit is contained in:
commit
f4e5eb3f86
1 changed files with 7 additions and 0 deletions
|
@ -376,6 +376,13 @@ func (daemon *Daemon) restore() error {
|
|||
// This must be run after any containers with a restart policy so that containerized plugins
|
||||
// can have a chance to be running before we try to initialize them.
|
||||
for _, c := range containers {
|
||||
// if the container has restart policy, do not
|
||||
// prepare the mountpoints since it has been done on restarting.
|
||||
// This is to speed up the daemon start when a restart container
|
||||
// has a volume and the volume dirver is not available.
|
||||
if _, ok := restartContainers[c]; ok {
|
||||
continue
|
||||
}
|
||||
group.Add(1)
|
||||
go func(c *container.Container) {
|
||||
defer group.Done()
|
||||
|
|
Loading…
Reference in a new issue