diff --git a/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/ShardingContainerPoolBalancer.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/ShardingContainerPoolBalancer.scala index 5f7b9f05cd6..b33cfa4d753 100644 --- a/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/ShardingContainerPoolBalancer.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/ShardingContainerPoolBalancer.scala @@ -24,8 +24,6 @@ import java.util.concurrent.ThreadLocalRandom import akka.actor.{Actor, ActorSystem, Cancellable, Props} import akka.cluster.ClusterEvent._ import akka.cluster.{Cluster, Member, MemberStatus} -import akka.management.scaladsl.AkkaManagement -import akka.management.cluster.bootstrap.ClusterBootstrap import org.apache.openwhisk.common.InvokerState.{Healthy, Offline, Unhealthy, Unresponsive} import pureconfig._ import pureconfig.generic.auto._ @@ -154,11 +152,7 @@ class ShardingContainerPoolBalancer( extends CommonLoadBalancer(config, feedFactory, controllerInstance) { /** Build a cluster of all loadbalancers */ - private val cluster: Option[Cluster] = if (loadConfigOrThrow[ClusterConfig](ConfigKeys.cluster).useClusterBootstrap) { - AkkaManagement(actorSystem).start() - ClusterBootstrap(actorSystem).start() - Some(Cluster(actorSystem)) - } else if (loadConfigOrThrow[Seq[String]]("akka.cluster.seed-nodes").nonEmpty) { + private val cluster: Option[Cluster] = if (loadConfigOrThrow[ClusterConfig](ConfigKeys.cluster).useClusterBootstrap || loadConfigOrThrow[Seq[String]]("akka.cluster.seed-nodes").nonEmpty) { Some(Cluster(actorSystem)) } else { None