mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Remove check for existance of lockfile when retrieving containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
@ -4,7 +4,6 @@ import (
|
|||||||
"database/sql"
|
"database/sql"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -386,13 +385,8 @@ func ctrFromScannable(row scannable, runtime *Runtime, specsDir string, lockDir
|
|||||||
ctr.valid = true
|
ctr.valid = true
|
||||||
ctr.runtime = runtime
|
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
|
// Open and set the lockfile
|
||||||
|
lockPath := filepath.Join(lockDir, id)
|
||||||
lock, err := storage.GetLockfile(lockPath)
|
lock, err := storage.GetLockfile(lockPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(err, "error retrieving lockfile for container %s", id)
|
return nil, errors.Wrapf(err, "error retrieving lockfile for container %s", id)
|
||||||
|
Reference in New Issue
Block a user