summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-27 13:42:45 -0500
committerMatthew Heon <matthew.heon@gmail.com>2017-12-04 13:40:27 -0500
commite9298a533adf30c3dd1990098665be23a0f29d1a (patch)
tree12b3d265a1c7d5435f2953bf91ee6f56d4f54d44 /libpod/container.go
parentabfd18b0db8cb0ea331d90d702eab19e2157b973 (diff)
downloadpodman-e9298a533adf30c3dd1990098665be23a0f29d1a.tar.gz
podman-e9298a533adf30c3dd1990098665be23a0f29d1a.tar.bz2
podman-e9298a533adf30c3dd1990098665be23a0f29d1a.zip
Remove SQL state locking and rely on sqlite locking
Also renames some parameters from locksDir -> lockDir for consistency. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container.go b/libpod/container.go
index f93b214b9..4f8c148d1 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -338,7 +338,7 @@ func (c *Container) syncContainer() error {
}
// Make a new container
-func newContainer(rspec *spec.Spec, logDir string) (*Container, error) {
+func newContainer(rspec *spec.Spec, lockDir string) (*Container, error) {
if rspec == nil {
return nil, errors.Wrapf(ErrInvalidArg, "must provide a valid runtime spec to create container")
}
@@ -356,7 +356,7 @@ func newContainer(rspec *spec.Spec, logDir string) (*Container, error) {
ctr.config.CreatedTime = time.Now()
// Path our lock file will reside at
- lockPath := filepath.Join(logDir, ctr.config.ID)
+ lockPath := filepath.Join(lockDir, ctr.config.ID)
// Ensure there is no conflict - file does not exist
_, err := os.Stat(lockPath)
if err == nil || !os.IsNotExist(err) {