in management-cluster-bootstrap/src/main/scala/org/apache/pekko/management/cluster/bootstrap/ClusterBootstrap.scala [106:123]
def start(): Unit =
if (Cluster(system).settings.SeedNodes.nonEmpty) {
log.warning(
"Application is configured with specific `pekko.cluster.seed-nodes`: {}, bailing out of the bootstrap process! " +
"If you want to use the automatic bootstrap mechanism, make sure to NOT set explicit seed nodes in the configuration. " +
"This node will attempt to join the configured seed nodes.",
Cluster(system).settings.SeedNodes.mkString("[", ", ", "]"))
} else if (bootstrapStep.compareAndSet(NotRunning, Initializing)) {
log.info("Initiating bootstrap procedure using {} method...", settings.contactPointDiscovery.discoveryMethod)
ensureSelfContactPoint()
val bootstrapProps = BootstrapCoordinator.props(discovery, joinDecider, settings)
val bootstrap = system.systemActorOf(bootstrapProps, "bootstrapCoordinator")
// Bootstrap already logs in several other execution points when it can't form a cluster, and why.
selfContactPoint.foreach { uri =>
bootstrap ! BootstrapCoordinator.Protocol.InitiateBootstrapping(uri)
}
} else log.warning("Bootstrap already initiated, yet start() method was called again. Ignoring.")