summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-12-05 09:21:50 -0500
committerMatthew Heon <matthew.heon@gmail.com>2017-12-05 10:04:59 -0500
commit70da705c364bf5f32c85966e15bfa56039b0f6f6 (patch)
treedfce6c1218f33084ac5d9bdaa464e65dc99522dd /libpod
parenteb942b1b47235ffddc37c6e353fbafcfa3a60a15 (diff)
downloadpodman-70da705c364bf5f32c85966e15bfa56039b0f6f6.tar.gz
podman-70da705c364bf5f32c85966e15bfa56039b0f6f6.tar.bz2
podman-70da705c364bf5f32c85966e15bfa56039b0f6f6.zip
Remove check for existance of lockfile when retrieving containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/sql_state_internal.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/libpod/sql_state_internal.go b/libpod/sql_state_internal.go
index dfcd97c63..515b5b6ad 100644
--- a/libpod/sql_state_internal.go
+++ b/libpod/sql_state_internal.go
@@ -4,7 +4,6 @@ import (
"database/sql"
"encoding/json"
"io/ioutil"
- "os"
"path/filepath"
"time"
@@ -386,13 +385,8 @@ func ctrFromScannable(row scannable, runtime *Runtime, specsDir string, lockDir
ctr.valid = true
ctr.runtime = runtime
- // Ensure the lockfile exists
- lockPath := filepath.Join(lockDir, id)
- _, err = os.Stat(lockPath)
- if err != nil {
- return nil, errors.Wrapf(err, "error performing stat on container %s lockfile", id)
- }
// Open and set the lockfile
+ lockPath := filepath.Join(lockDir, id)
lock, err := storage.GetLockfile(lockPath)
if err != nil {
return nil, errors.Wrapf(err, "error retrieving lockfile for container %s", id)