mirror of https://github.com/linkerd/linkerd2.git
Add a less scary message to the user when retries are still in progress (#2141)
When a failing check is being retried, we show the current err to the user. This can sometimes be unnecessarily alarming, as in the case of the control plane starting up. If a failing check is in the process of being retried, wait to show the final error message until the retries have completed.
This commit is contained in:
parent
e7556d7edc
commit
950c952d14
|
@ -15,6 +15,7 @@ import (
|
|||
"github.com/linkerd/linkerd2/pkg/k8s"
|
||||
"github.com/linkerd/linkerd2/pkg/profiles"
|
||||
"github.com/linkerd/linkerd2/pkg/version"
|
||||
log "github.com/sirupsen/logrus"
|
||||
authorizationapi "k8s.io/api/authorization/v1beta1"
|
||||
"k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
@ -634,6 +635,9 @@ func (hc *HealthChecker) runCheck(categoryID CategoryID, c *checker, observer ch
|
|||
|
||||
if err != nil && time.Now().Before(c.retryDeadline) {
|
||||
checkResult.Retry = true
|
||||
checkResult.Err = errors.New("waiting for check to complete")
|
||||
log.Debugf("Retrying on error: %s", err)
|
||||
|
||||
observer(checkResult)
|
||||
time.Sleep(retryWindow)
|
||||
continue
|
||||
|
|
|
@ -278,7 +278,7 @@ func TestHealthChecker(t *testing.T) {
|
|||
|
||||
expectedResults := []string{
|
||||
"cat1 desc1 retry=false",
|
||||
"cat7 desc7 retry=true: retry",
|
||||
"cat7 desc7 retry=true: waiting for check to complete",
|
||||
"cat7 desc7 retry=false",
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue