The btrfs driver attempts to stat the /var/lib/docker directory to
ensure it exists. If it doesn't exist then it bails with an unhelpful
log line:
```
2014/05/10 00:51:30 no such file or directory
```
In 0.10 the directory was created but quickly digging through the logs I
can't tell what sort of re-ordering of code caused this regression.
Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
| ... | ... |
@@ -680,6 +680,12 @@ func NewDaemonFromDirectory(config *daemonconfig.Config, eng *engine.Engine) (*D |
| 680 | 680 |
if !config.EnableSelinuxSupport {
|
| 681 | 681 |
selinux.SetDisabled() |
| 682 | 682 |
} |
| 683 |
+ |
|
| 684 |
+ // Create the root directory if it doesn't exists |
|
| 685 |
+ if err := os.MkdirAll(config.Root, 0700); err != nil && !os.IsExist(err) {
|
|
| 686 |
+ return nil, err |
|
| 687 |
+ } |
|
| 688 |
+ |
|
| 683 | 689 |
// Set the default driver |
| 684 | 690 |
graphdriver.DefaultDriver = config.GraphDriver |
| 685 | 691 |
|