Skip to content

Commit

Permalink
node: switching prometheus flock location to tsdb (#19376)
Browse files Browse the repository at this point in the history
* node: switching prometheus flock location to tsdb

* rookie mistake
  • Loading branch information
steveruckdashel authored and karalabe committed Apr 4, 2019
1 parent d5cae48 commit a8dd1f9
Show file tree
Hide file tree
Showing 24 changed files with 677 additions and 109 deletions.
8 changes: 4 additions & 4 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down
87 changes: 0 additions & 87 deletions vendor/github.com/prometheus/prometheus/NOTICE

This file was deleted.

File renamed without changes.
22 changes: 22 additions & 0 deletions vendor/github.com/prometheus/tsdb/fileutil/dir_unix.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions vendor/github.com/prometheus/tsdb/fileutil/dir_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

149 changes: 149 additions & 0 deletions vendor/github.com/prometheus/tsdb/fileutil/fileutil.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a8dd1f9

Please sign in to comment.