diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-01-06 23:16:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-06 23:16:55 -0800 |
commit | 1e4db4b0b8504e93e826d02b6c03cf78f41dcf7a (patch) | |
tree | 6efd8b7d8baf3344412b9d23b875cca1dbddccf4 /libpod/runtime.go | |
parent | b83b07cb4748f983c21b08b2ba015561cf664989 (diff) | |
parent | a76256834a0a409dfb53943e04fd2458c7782361 (diff) | |
download | podman-1e4db4b0b8504e93e826d02b6c03cf78f41dcf7a.tar.gz podman-1e4db4b0b8504e93e826d02b6c03cf78f41dcf7a.tar.bz2 podman-1e4db4b0b8504e93e826d02b6c03cf78f41dcf7a.zip |
Merge pull request #2089 from rhatdan/locks
Rootless with shmlocks was not working.
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r-- | libpod/runtime.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index fcc1c6d82..ab8d02a4f 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -1,6 +1,7 @@ package libpod import ( + "fmt" "io/ioutil" "os" "os/exec" @@ -695,7 +696,7 @@ func makeRuntime(runtime *Runtime) (err error) { var manager lock.Manager lockPath := DefaultSHMLockPath if rootless.IsRootless() { - lockPath = DefaultRootlessSHMLockPath + lockPath = fmt.Sprintf("%s_%d", DefaultRootlessSHMLockPath, rootless.GetRootlessUID()) } if doRefresh { // If SHM locks already exist, delete them and reinitialize @@ -705,12 +706,12 @@ func makeRuntime(runtime *Runtime) (err error) { manager, err = lock.NewSHMLockManager(lockPath, runtime.config.NumLocks) if err != nil { - return errors.Wrapf(err, "error creating SHM locks for libpod") + return err } } else { manager, err = lock.OpenSHMLockManager(lockPath, runtime.config.NumLocks) if err != nil { - return errors.Wrapf(err, "error opening libpod SHM locks") + return err } } runtime.lockManager = manager |