Skip to content

Commit

Permalink
Merge pull request #2377 from stevvooe/healthcheck-storage-ignore-not…
Browse files Browse the repository at this point in the history
…found

registry/handlers: ignore notfound on storage driver healthcheck
  • Loading branch information
dmcgowan committed Sep 29, 2017
2 parents 5db89f0 + 1618b49 commit 8710fa5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion registry/handlers/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8710fa5

Please sign in to comment.