+ ok := super.WaitReady()
+ if timer != nil && !timer.Stop() {
+ return errors.New("boot timed out")
+ } else if !ok {
+ super.logger.Error("boot failed")
+ } else {
+ // Write each cluster's controller URL to stdout.
+ // Nothing else goes to stdout, so this allows a
+ // calling script to determine when the cluster is
+ // ready to use, and the controller's host:port (which
+ // may have been dynamically assigned depending on
+ // config/options).
+ for _, cc := range super.Clusters() {
+ fmt.Fprintln(stdout, cc.Services.Controller.ExternalURL)
+ }
+ if *shutdown {
+ super.Stop()
+ // Wait for children to exit. Don't report the
+ // ensuing "context cancelled" error, though:
+ // return nil to indicate successful startup.
+ _ = super.Wait()
+ fmt.Fprintln(stderr, "PASS - all services booted successfully")
+ return nil
+ }