Better logging when no seed nodes found (#29866)
In a recent support case the 'manual cluster join required' log message caused some confusion. Turns out the configuration we used to detect whether Cluster Bootstrap is available has been changed since https://github.com/akka/akka-management/pull/476 Unfortunately I don't think we can detect whether Cluster Bootstrap is actually enabled, since users may call `ClusterBootstrap(system).start()` whenever they like. Updated the logging to reflect that better.
This commit is contained in:
parent
9416dedad7
commit
4785ed1b48
1 changed files with 4 additions and 10 deletions
|
|
@ -428,8 +428,8 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef, joinConfigCompatCh
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seedNodes.isEmpty) {
|
if (seedNodes.isEmpty) {
|
||||||
if (isClusterBootstrapUsed)
|
if (isClusterBootstrapAvailable)
|
||||||
logDebug("Cluster Bootstrap is used for joining")
|
logInfo("No seed nodes found in configuration, relying on Cluster Bootstrap for joining")
|
||||||
else
|
else
|
||||||
logInfo(
|
logInfo(
|
||||||
"No seed-nodes configured, manual cluster join required, see " +
|
"No seed-nodes configured, manual cluster join required, see " +
|
||||||
|
|
@ -445,14 +445,8 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef, joinConfigCompatCh
|
||||||
context.system.eventStream.subscribe(self, classOf[ClassicQuarantinedEvent])
|
context.system.eventStream.subscribe(self, classOf[ClassicQuarantinedEvent])
|
||||||
}
|
}
|
||||||
|
|
||||||
private def isClusterBootstrapUsed: Boolean = {
|
private def isClusterBootstrapAvailable: Boolean =
|
||||||
val conf = context.system.settings.config
|
context.system.settings.config.hasPath("akka.management.cluster.bootstrap")
|
||||||
conf.hasPath("akka.management.cluster.bootstrap") &&
|
|
||||||
conf.hasPath("akka.management.http.route-providers") &&
|
|
||||||
conf
|
|
||||||
.getStringList("akka.management.http.route-providers")
|
|
||||||
.contains("akka.management.cluster.bootstrap.ClusterBootstrap$")
|
|
||||||
}
|
|
||||||
|
|
||||||
override def postStop(): Unit = {
|
override def postStop(): Unit = {
|
||||||
context.system.eventStream.unsubscribe(self)
|
context.system.eventStream.unsubscribe(self)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue