From: Tom Clegg Date: Tue, 18 Oct 2022 17:23:26 +0000 (-0400) Subject: 19377: Fix diag sanity check. Suggest "check -yaml" on health fail. X-Git-Tag: 2.5.0~50^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/14f6625379992bc3ee054ad419095b476a1c4284 19377: Fix diag sanity check. Suggest "check -yaml" on health fail. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/lib/diagnostics/cmd.go b/lib/diagnostics/cmd.go index 5799ceb9a9..888503b551 100644 --- a/lib/diagnostics/cmd.go +++ b/lib/diagnostics/cmd.go @@ -157,12 +157,16 @@ func (diag *diagnoser) runtests() { } if cluster.SystemRootToken != os.Getenv("ARVADOS_API_TOKEN") { diag.infof("skipping because provided token is not SystemRootToken") + return nil } agg := &health.Aggregator{Cluster: cluster} resp := agg.ClusterHealth() for _, e := range resp.Errors { diag.errorf("health check: %s", e) } + if len(resp.Errors) > 0 { + diag.infof("consider running `arvados-server check -yaml` for a comprehensive report") + } diag.verbosef("reported clock skew = %v", resp.ClockSkew) reported := map[string]bool{} for _, result := range resp.Checks {