|
@@ -7,6 +7,7 @@ import (
|
|
|
"io/ioutil"
|
|
|
"os"
|
|
|
"path"
|
|
|
+ "path/filepath"
|
|
|
"regexp"
|
|
|
"runtime"
|
|
|
"strings"
|
|
@@ -237,6 +238,8 @@ func (daemon *Daemon) register(container *Container, updateSuffixarray bool) err
|
|
|
// we'll waste time if we update it for every container
|
|
|
daemon.idIndex.Add(container.ID)
|
|
|
|
|
|
+ container.registerVolumes()
|
|
|
+
|
|
|
// FIXME: if the container is supposed to be running but is not, auto restart it?
|
|
|
// if so, then we need to restart monitor and init a new lock
|
|
|
// If the container is supposed to be running, make sure of it
|
|
@@ -400,10 +403,6 @@ func (daemon *Daemon) restore() error {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- for _, c := range registeredContainers {
|
|
|
- c.registerVolumes()
|
|
|
- }
|
|
|
-
|
|
|
if !debug {
|
|
|
fmt.Println()
|
|
|
log.Infof("Loading containers: done.")
|
|
@@ -890,7 +889,7 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error)
|
|
|
return nil, err
|
|
|
}
|
|
|
|
|
|
- volumes, err := volumes.NewRepository(path.Join(config.Root, "volumes"), volumesDriver)
|
|
|
+ volumes, err := volumes.NewRepository(filepath.Join(config.Root, "volumes"), volumesDriver)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|