diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-09-23 14:01:29 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-01-04 09:51:09 -0500 |
commit | 35361595f36728958e6abb2c37c22d79a776913a (patch) | |
tree | a844fb8eb6f8cf44b7619068599c6741c413f527 /libpod/boltdb_state_internal.go | |
parent | d4b2f116018e1d8e6a3c4f80f30db45934428c6b (diff) | |
download | podman-35361595f36728958e6abb2c37c22d79a776913a.tar.gz podman-35361595f36728958e6abb2c37c22d79a776913a.tar.bz2 podman-35361595f36728958e6abb2c37c22d79a776913a.zip |
Remove runtime lockDir and add in-memory lock manager
Remove runtime's lockDir as it is no longer needed after the lock
rework.
Add a trivial in-memory lock manager for unit testing
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/boltdb_state_internal.go')
-rw-r--r-- | libpod/boltdb_state_internal.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go index bffa83ffb..29a7184c9 100644 --- a/libpod/boltdb_state_internal.go +++ b/libpod/boltdb_state_internal.go @@ -3,7 +3,6 @@ package libpod import ( "bytes" "encoding/json" - "path/filepath" "runtime" "strings" @@ -351,8 +350,7 @@ func (s *BoltState) getVolumeFromDB(name []byte, volume *Volume, volBkt *bolt.Bu } // Get the lock - lockPath := filepath.Join(s.runtime.lockDir, string(name)) - lock, err := storage.GetLockfile(lockPath) + lock, err := s.runtime.lockManager.RetrieveLock(volume.config.LockID) if err != nil { return errors.Wrapf(err, "error retrieving lockfile for volume %s", string(name)) } |