registry/handlers: ignore notfound on storage driver healthcheck

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2017-08-21 15:04:31 -07:00
parent 5f6282db7d
commit 1618b49d5b
No known key found for this signature in database
GPG key ID: 67B3DED84EDC823F

View file

@ -346,7 +346,10 @@ func (app *App) RegisterHealthChecks(healthRegistries ...*health.Registry) {
storageDriverCheck := func() error { storageDriverCheck := func() error {
_, err := app.driver.Stat(app, "/") // "/" should always exist _, 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 { if app.Config.Health.StorageDriver.Threshold != 0 {