Print out an information message when local node is not in baseline
@@ -321,6 +321,9 @@ public class GridClusterStateProcessor extends GridProcessorAdapter implements I
@Override @Nullable public IgniteInternalFuture<Boolean> onLocalJoin(DiscoCache discoCache) {
final DiscoveryDataClusterState state = globalState;
+ if (state.active())
+ checkLocalNodeInBaseline(state.baselineTopology());
+
if (state.transition()) {
joinFut = new TransitionOnJoinWaitFuture(state, discoCache);
@@ -336,6 +339,23 @@ public class GridClusterStateProcessor extends GridProcessorAdapter implements I
return null;
}
+ /**
+ * Checks whether local node participating in Baseline Topology and warn if not.
+ */
+ private void checkLocalNodeInBaseline(BaselineTopology blt) {
+ if (blt == null || blt.consistentIds() == null || ctx.clientNode() || ctx.isDaemon())
+ return;
+
+ if (!CU.isPersistenceEnabled(ctx.config()))
+ return;
+
+ if (!blt.consistentIds().contains(ctx.discovery().localNode().consistentId())) {
+ U.quietAndInfo(log, "Local node is not included in Baseline Topology and will not be used " +
+ "for persistent data storage. Use control.(sh|bat) script or IgniteCluster interface to include " +
+ "the node to Baseline Topology.");
+ }
+ }
+
/**
* Checks whether all conditions to meet BaselineTopology are satisfied.
*/
@@ -1101,6 +1121,8 @@ public class GridClusterStateProcessor extends GridProcessorAdapter implements I
private void onFinalActivate(final StateChangeRequest req) {
ctx.dataStructures().onBeforeActivate();
+ checkLocalNodeInBaseline(globalState.baselineTopology());
+
ctx.closure().runLocalSafe(new Runnable() {
@Override public void run() {
boolean client = ctx.clientNode();
