From e9298a533adf30c3dd1990098665be23a0f29d1a Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 27 Nov 2017 13:42:45 -0500 Subject: Remove SQL state locking and rely on sqlite locking Also renames some parameters from locksDir -> lockDir for consistency. Signed-off-by: Matthew Heon --- libpod/container.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpod/container.go') 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) { -- cgit v1.2.3-54-g00ecf