Merge pull request #11349 from cpuguy83/11132_better_error_message_on_graph_init
Make errors from graphdriver friendlier Upstream-commit: 88c706e442fb489387ba8ef5fd2de42479f74b87 Component: engine
This commit is contained in:
@ -876,7 +876,7 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error)
|
||||
// Load storage driver
|
||||
driver, err := graphdriver.New(config.Root, config.GraphOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("error intializing graphdriver: %v", err)
|
||||
}
|
||||
log.Debugf("Using graph driver %s", driver)
|
||||
|
||||
|
||||
@ -378,7 +378,7 @@ func (a *Driver) mount(id, mountLabel string) error {
|
||||
}
|
||||
|
||||
if err := a.aufsMount(layers, rw, target, mountLabel); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("error creating aufs mount to %s: %v", target, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ func (d *Driver) Get(id string, mountLabel string) (string, error) {
|
||||
|
||||
opts := fmt.Sprintf("lowerdir=%s,upperdir=%s,workdir=%s", lowerDir, upperDir, workDir)
|
||||
if err := syscall.Mount("overlay", mergedDir, "overlay", 0, label.FormatMountLabel(opts, mountLabel)); err != nil {
|
||||
return "", err
|
||||
return "", fmt.Errorf("error creating overlay mount to %s: %v", mergedDir, err)
|
||||
}
|
||||
mount.path = mergedDir
|
||||
mount.mounted = true
|
||||
|
||||
Reference in New Issue
Block a user