+func (boot *bootCommand) waitUntilReady(ctx context.Context) bool {
+ agg := health.Aggregator{Cluster: boot.cluster}
+ for waiting := true; waiting; {
+ time.Sleep(time.Second)
+ if ctx.Err() != nil {
+ return false
+ }
+ resp := agg.ClusterHealth()
+ // The overall health check (resp.Health=="OK") might
+ // never pass due to missing components (like
+ // arvados-dispatch-cloud in a test cluster), so
+ // instead we wait for all configured components to
+ // pass.
+ waiting = false
+ for _, check := range resp.Checks {
+ if check.Health != "OK" {
+ waiting = true
+ }
+ }
+ }
+ return true
+}
+