19377: Fix diag sanity check. Suggest "check -yaml" on health fail.
authorTom Clegg <tom@curii.com>
Tue, 18 Oct 2022 17:23:26 +0000 (13:23 -0400)
committerTom Clegg <tom@curii.com>
Tue, 18 Oct 2022 17:23:26 +0000 (13:23 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

lib/diagnostics/cmd.go

index 5799ceb9a98d880ce0b5c7193a2707c43e12c042..888503b551b4f8ee86a2115846d44df3da32dac9 100644 (file)
@@ -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 {