mirror of
https://github.com/docker/docs.git
synced 2026-04-01 00:38:52 +07:00
Log an error if the notary server cannot reach the signer or otherwise
if the signer is in trouble, but do not fail the health check, since the server can operate for a while without the signer (the server will have degraded performance, but is not down) Signed-off-by: Ying Li <ying.li@docker.com>
This commit is contained in:
@@ -115,10 +115,19 @@ func main() {
|
||||
)
|
||||
health.RegisterPeriodicFunc(
|
||||
"Trust operational",
|
||||
// If the trust service fails, the server is degraded but not
|
||||
// exactly unheatlthy, so always return healthy and just log an
|
||||
// error.
|
||||
func() error {
|
||||
return trust.(*signer.NotarySigner).CheckHealth(60)
|
||||
logrus.Info("Getting health")
|
||||
err := trust.(*signer.NotarySigner).CheckHealth(5)
|
||||
logrus.Info("Got health")
|
||||
if err != nil {
|
||||
logrus.Error("Trust not fully operational: ", err.Error())
|
||||
}
|
||||
return nil
|
||||
},
|
||||
time.Second*60)
|
||||
time.Second*5)
|
||||
} else {
|
||||
logrus.Info("Using local signing service")
|
||||
trust = signed.NewEd25519()
|
||||
|
||||
Reference in New Issue
Block a user