diff options
Diffstat (limited to 'libpod/boltdb_state_internal.go')
-rw-r--r-- | libpod/boltdb_state_internal.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go index 29a7184c9..06f8dcb24 100644 --- a/libpod/boltdb_state_internal.go +++ b/libpod/boltdb_state_internal.go @@ -3,6 +3,7 @@ package libpod import ( "bytes" "encoding/json" + "path/filepath" "runtime" "strings" @@ -287,9 +288,10 @@ func (s *BoltState) getContainerFromDB(id []byte, ctr *Container, ctrsBkt *bolt. } // Get the lock - lock, err := s.runtime.lockManager.RetrieveLock(ctr.config.LockID) + lockPath := filepath.Join(s.runtime.lockDir, string(id)) + lock, err := storage.GetLockfile(lockPath) if err != nil { - return errors.Wrapf(err, "error retrieving lock for container %s", string(id)) + return errors.Wrapf(err, "error retrieving lockfile for container %s", string(id)) } ctr.lock = lock @@ -322,9 +324,10 @@ func (s *BoltState) getPodFromDB(id []byte, pod *Pod, podBkt *bolt.Bucket) error } // Get the lock - lock, err := s.runtime.lockManager.RetrieveLock(pod.config.LockID) + lockPath := filepath.Join(s.runtime.lockDir, string(id)) + lock, err := storage.GetLockfile(lockPath) if err != nil { - return errors.Wrapf(err, "error retrieving lock for pod %s", string(id)) + return errors.Wrapf(err, "error retrieving lockfile for pod %s", string(id)) } pod.lock = lock @@ -350,7 +353,8 @@ func (s *BoltState) getVolumeFromDB(name []byte, volume *Volume, volBkt *bolt.Bu } // Get the lock - lock, err := s.runtime.lockManager.RetrieveLock(volume.config.LockID) + lockPath := filepath.Join(s.runtime.lockDir, string(name)) + lock, err := storage.GetLockfile(lockPath) if err != nil { return errors.Wrapf(err, "error retrieving lockfile for volume %s", string(name)) } |