mirror of
https://github.com/distribution/distribution
synced 2024-11-06 19:35:52 +01:00
Merge pull request #2377 from stevvooe/healthcheck-storage-ignore-notfound
registry/handlers: ignore notfound on storage driver healthcheck
This commit is contained in:
commit
8710fa58ae
@ -346,7 +346,10 @@ func (app *App) RegisterHealthChecks(healthRegistries ...*health.Registry) {
|
||||
|
||||
storageDriverCheck := func() error {
|
||||
_, err := app.driver.Stat(app, "/") // "/" should always exist
|
||||
return err // any error will be treated as failure
|
||||
if _, ok := err.(storagedriver.PathNotFoundError); ok {
|
||||
err = nil // pass this through, backend is responding, but this path doesn't exist.
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
if app.Config.Health.StorageDriver.Threshold != 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user