summaryrefslogtreecommitdiff
path: root/libpod/pod.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-12-14 09:19:00 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-14 18:18:16 +0000
commitbf0d35904752c2ac5c607c4a82237f074c862744 (patch)
tree682e3c5f6ec5eba26e654563bfee98dc88c417a0 /libpod/pod.go
parent6d297688644a73c23fce7fbbaa5b402eca4d85d8 (diff)
downloadpodman-bf0d35904752c2ac5c607c4a82237f074c862744.tar.gz
podman-bf0d35904752c2ac5c607c4a82237f074c862744.tar.bz2
podman-bf0d35904752c2ac5c607c4a82237f074c862744.zip
Remove lock existence checks when creating pods/containers
Given that we don't have a good way of cleaning up locks, these could potential cause issues if we ever reuse a container or pod ID Also changes locks dir to use tmpfs, as we can't directly clean up locks Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #138 Approved by: rhatdan
Diffstat (limited to 'libpod/pod.go')
-rw-r--r--libpod/pod.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/libpod/pod.go b/libpod/pod.go
index b336c2677..15899930b 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -1,7 +1,6 @@
package libpod
import (
- "os"
"path/filepath"
"github.com/containers/storage"
@@ -57,11 +56,6 @@ func newPod(lockDir string) (*Pod, error) {
// Path our lock file will reside at
lockPath := filepath.Join(lockDir, pod.id)
- // Ensure there is no conflict - file does not exist
- _, err := os.Stat(lockPath)
- if err == nil || !os.IsNotExist(err) {
- return nil, errors.Wrapf(ErrCtrExists, "lockfile for pod ID %s already exists", pod.id)
- }
// Grab a lockfile at the given path
lock, err := storage.GetLockfile(lockPath)
if err != nil {