mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-29 07:29:42 -08:00
Merge pull request #1306 from prometheus/beorn7/storage
Tolerate the lost+found directory in the data directory
This commit is contained in:
commit
7a012ea611
|
@ -162,7 +162,7 @@ func newPersistence(
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(fis) > 0 {
|
if len(fis) > 0 && !(len(fis) == 1 && fis[0].Name() == "lost+found" && fis[0].IsDir()) {
|
||||||
return nil, fmt.Errorf("could not detect storage version on disk, assuming version 0, need version %d - please wipe storage or run a version of Prometheus compatible with storage version 0", Version)
|
return nil, fmt.Errorf("could not detect storage version on disk, assuming version 0, need version %d - please wipe storage or run a version of Prometheus compatible with storage version 0", Version)
|
||||||
}
|
}
|
||||||
// Finally we can write our own version into a new version file.
|
// Finally we can write our own version into a new version file.
|
||||||
|
|
Loading…
Reference in a new issue