Skip to content

Commit

Permalink
Allow rollup job creation only if cluster is x-pack ready (#30963)
Browse files Browse the repository at this point in the history
Otherwise we could end up with persistent tasks metadata in the cluster that some of the nodes
might not understand in case where the cluster is during rolling upgrade from the default 6.2 to the
default 6.3 distribution.

Follow-up to #30743
  • Loading branch information
ywelsch committed Jun 1, 2018
1 parent 674587c commit bc9c72e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xpack.core.XPackField;
import org.elasticsearch.xpack.core.XPackPlugin;
import org.elasticsearch.xpack.core.rollup.RollupField;
import org.elasticsearch.xpack.core.rollup.action.PutRollupJobAction;
import org.elasticsearch.xpack.core.rollup.job.RollupJob;
Expand Down Expand Up @@ -91,6 +92,8 @@ protected void masterOperation(PutRollupJobAction.Request request, ClusterState
return;
}

XPackPlugin.checkReadyForXPackCustomMetadata(clusterState);

FieldCapabilitiesRequest fieldCapsRequest = new FieldCapabilitiesRequest()
.indices(request.getConfig().getIndexPattern())
.fields(request.getConfig().getAllFields().toArray(new String[0]));
Expand Down

0 comments on commit bc9c72e

Please sign in to comment.