don't quarantine back, #21450

* Don't quarantine the other system when receiving the Quarantined message,
  since that will result cluster member removal and can result in
  forming two separate clusters (cluster split).
* Instead, the downing strategy should act on ThisActorSystemQuarantinedEvent, e.g.
  use it as a STONITH signal.
This commit is contained in:
Patrik Nordwall 2016-09-13 08:01:58 +02:00
parent acafe80cf1
commit bf151e9793
2 changed files with 8 additions and 13 deletions

View file

@ -366,18 +366,11 @@ abstract class SurviveNetworkInstabilitySpec
}
runOn(side2: _*) {
if (RARP(system).provider.remoteSettings.Artery.Enabled) {
// with artery the other side stays quarantined
val expected = (side2 map address).toSet
clusterView.members.map(_.address) should ===(expected)
} else {
// with the old remoting side2 comes back but stays unreachable
// side2 comes back but stays unreachable
val expected = ((side2 ++ side1) map address).toSet
clusterView.members.map(_.address) should ===(expected)
assertUnreachable(side1: _*)
}
}
enterBarrier("after-7")
assertCanTalk(side1AfterJoin: _*)

View file

@ -623,10 +623,12 @@ private[remote] class ArteryTransport(_system: ExtendedActorSystem, _provider: R
}
case Quarantined(from, to) if to == localAddress
// Don't quarantine the other system here, since that will result cluster member removal
// and can result in forming two separate clusters (cluster split).
// Instead, the downing strategy should act on ThisActorSystemQuarantinedEvent, e.g.
// use it as a STONITH signal.
val lifecycleEvent = ThisActorSystemQuarantinedEvent(localAddress.address, from.address)
publishLifecycleEvent(lifecycleEvent)
// quarantine the other system from here
association(from.address).quarantine(lifecycleEvent.toString, Some(from.uid))
case _: ActorSystemTerminating
inboundEnvelope.sender match {