node: fix instance dir locking and improve error message
The lock file was ineffective because opening leveldb storage in read-only mode doesn't really take the lock. Fix it by including a dedicated flock library (which is actually split out of goleveldb).
Showing
- node/errors.go 18 additions, 0 deletionsnode/errors.go
- node/node.go 12 additions, 24 deletionsnode/node.go
- vendor/github.com/prometheus/prometheus/LICENSE 201 additions, 0 deletionsvendor/github.com/prometheus/prometheus/LICENSE
- vendor/github.com/prometheus/prometheus/NOTICE 87 additions, 0 deletionsvendor/github.com/prometheus/prometheus/NOTICE
- vendor/github.com/prometheus/prometheus/util/flock/flock.go 46 additions, 0 deletionsvendor/github.com/prometheus/prometheus/util/flock/flock.go
- vendor/github.com/prometheus/prometheus/util/flock/flock_plan9.go 32 additions, 0 deletions...ithub.com/prometheus/prometheus/util/flock/flock_plan9.go
- vendor/github.com/prometheus/prometheus/util/flock/flock_solaris.go 59 additions, 0 deletions...hub.com/prometheus/prometheus/util/flock/flock_solaris.go
- vendor/github.com/prometheus/prometheus/util/flock/flock_unix.go 54 additions, 0 deletions...github.com/prometheus/prometheus/util/flock/flock_unix.go
- vendor/github.com/prometheus/prometheus/util/flock/flock_windows.go 36 additions, 0 deletions...hub.com/prometheus/prometheus/util/flock/flock_windows.go
- vendor/vendor.json 6 additions, 0 deletionsvendor/vendor.json
Loading
Please register or sign in to comment