node: switching prometheus flock location to tsdb (#19376)
* node: switching prometheus flock location to tsdb * rookie mistake
This commit is contained in:
committed by
Péter Szilágyi
parent
d5cae48bae
commit
a8dd1f93c6
@ -34,7 +34,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/ethereum/go-ethereum/p2p"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
"github.com/prometheus/prometheus/util/flock"
|
||||
"github.com/prometheus/tsdb/fileutil"
|
||||
)
|
||||
|
||||
// Node is a container on which services can be registered.
|
||||
@ -43,8 +43,8 @@ type Node struct {
|
||||
config *Config
|
||||
accman *accounts.Manager
|
||||
|
||||
ephemeralKeystore string // if non-empty, the key directory that will be removed by Stop
|
||||
instanceDirLock flock.Releaser // prevents concurrent use of instance directory
|
||||
ephemeralKeystore string // if non-empty, the key directory that will be removed by Stop
|
||||
instanceDirLock fileutil.Releaser // prevents concurrent use of instance directory
|
||||
|
||||
serverConfig p2p.Config
|
||||
server *p2p.Server // Currently running P2P networking layer
|
||||
@ -267,7 +267,7 @@ func (n *Node) openDataDir() error {
|
||||
}
|
||||
// Lock the instance directory to prevent concurrent use by another instance as well as
|
||||
// accidental use of the instance directory as a database.
|
||||
release, _, err := flock.New(filepath.Join(instdir, "LOCK"))
|
||||
release, _, err := fileutil.Flock(filepath.Join(instdir, "LOCK"))
|
||||
if err != nil {
|
||||
return convertFileLockError(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user