mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
Do not initialize locks dir in BoltDB
We already create the locks directory as part of the libpod runtime's init - no need to do it again as part of BoltDB's init. Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
@ -3,7 +3,6 @@ package libpod
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@ -62,15 +61,6 @@ func NewBoltState(path, lockDir string, runtime *Runtime) (State, error) {
|
||||
|
||||
logrus.Debugf("Initializing boltdb state at %s", path)
|
||||
|
||||
// Make the directory that will hold container lockfiles
|
||||
if err := os.MkdirAll(lockDir, 0750); err != nil {
|
||||
// The directory is allowed to exist
|
||||
if !os.IsExist(err) {
|
||||
return nil, errors.Wrapf(err, "error creating lockfiles dir %s", lockDir)
|
||||
}
|
||||
}
|
||||
state.lockDir = lockDir
|
||||
|
||||
db, err := bolt.Open(path, 0600, nil)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "error opening database %s", path)
|
||||
|
Reference in New Issue
Block a user