Ensure different error messages and creating/opening locks

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
Matthew Heon
2018-09-25 10:11:54 -04:00
committed by Matthew Heon
parent 625c7e18ef
commit 31df5e0e85

View File

@ -541,11 +541,14 @@ func makeRuntime(runtime *Runtime) (err error) {
}
if doRefresh {
manager, err = lock.NewSHMLockManager(lockPath, runtime.config.NumLocks)
if err != nil {
return errors.Wrapf(err, "error creating SHM locks for libpod")
}
} else {
manager, err = lock.OpenSHMLockManager(lockPath, runtime.config.NumLocks)
}
if err != nil {
return errors.Wrapf(err, "error initializing SHM locking")
if err != nil {
return errors.Wrapf(err, "error opening libpod SHM locks")
}
}
runtime.lockManager = manager
@ -720,7 +723,6 @@ func makeRuntime(runtime *Runtime) (err error) {
if err2 := runtime.refresh(runtimeAliveFile); err2 != nil {
return err2
}
}
}