Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated xpack "enable" settings should be no-ops #55416

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2771955
Make xpack.transform.enabled setting a no-op
williamrandolph Apr 15, 2020
7fb31d9
Make xpack.rollup.enabled a no-op
williamrandolph Apr 15, 2020
8cdc5a6
Make xpack.logstash.enabled a no-op
williamrandolph Apr 15, 2020
64aaccd
Make xpack.slm.enabled a no-op
williamrandolph Apr 15, 2020
e4b67bd
Deprecation annotations and javadoc
williamrandolph Apr 16, 2020
1be3458
Make xpack.sql.enabled a no-op and remove imports
williamrandolph Apr 16, 2020
fa74c45
Make xpack.flattened.enabled a no-op
williamrandolph Apr 16, 2020
ddc7236
Make xpack.vectors.enabled a no-op
williamrandolph Apr 16, 2020
a1bd525
Remove or deprecate useless settings params
williamrandolph Apr 16, 2020
ffce6a1
Unused imports and spotless
williamrandolph Apr 16, 2020
7c1cf20
Fixes for tests
williamrandolph Apr 16, 2020
1909e4e
Remove unneeded settings objects used in tests
williamrandolph Apr 17, 2020
3062456
Remove enrich enabled setting
williamrandolph Apr 17, 2020
7e1e4e9
Javadoc and deprecation annotation
williamrandolph Apr 17, 2020
999f2e7
Basic license features are always enabled
williamrandolph Apr 17, 2020
c83b643
Remove enabled from mutation test
williamrandolph Apr 17, 2020
528488e
Merge branch 'master' into deprecated-disablements-are-no-op
williamrandolph Apr 22, 2020
6051e31
Merge branch 'master' into deprecated-disablements-are-no-op
williamrandolph Apr 22, 2020
b0e1578
Docs for no-op deprecated settings
williamrandolph Apr 23, 2020
ed20742
Merge branch 'master' into deprecated-disablements-are-no-op
williamrandolph Apr 24, 2020
a3a9f47
Merge branch 'master' into deprecated-disablements-are-no-op
williamrandolph Apr 29, 2020
224324b
Merge branch 'master' into deprecated-disablements-are-no-op
williamrandolph Apr 30, 2020
a906c1f
Apply spotless
williamrandolph Apr 30, 2020
7b9fbca
Merge branch 'master' into deprecated-disablements-are-no-op
williamrandolph May 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions docs/reference/migration/migrate_8_0/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,15 @@ removed.
In Elasticsearch 7.8.0, the following settings no longer have any effect, and
have been deprecated:

* `xpack.enrich.enabled`
* `xpack.flattened.enabled`
* `xpack.ilm.enabled`
* `xpack.monitoring.enabled`
* `xpack.rollup.enabled`
* `xpack.slm.enabled`
* `xpack.sql.enabled`
* `xpack.transform.enabled`
* `xpack.vectors.enabled`

Previously, these settings could be set to `false` in order to disable the
feature's APIs in a cluster. As of 7.8.0, these basic license features are
Expand All @@ -83,20 +90,6 @@ If you have disabled ILM so that you can use another tool to manage Watcher
indices, the newly introduced `xpack.watcher.use_ilm_index_management` setting
may be set to false.

Additionally, the following settings have been deprecated without removing
their effects:

* `xpack.enrich.enabled`
* `xpack.flattened.enabled`
* `xpack.rollup.enabled`
* `xpack.slm.enabled`
* `xpack.sql.enabled`
* `xpack.transform.enabled`
* `xpack.vectors.enabled`

In future releases, it will not be possible to disable the APIs for Enrichment,
Flattened mappings, Rollup, SLM, SQL, Transforms, and Vectors.

[float]
==== The `prefer_v2_templates` parameter now defaults to `true`

Expand Down
9 changes: 3 additions & 6 deletions docs/reference/modules/node.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,9 @@ node.remote_cluster_client: false <8>

{transform-cap} nodes run {transforms} and handle {transform} API requests.

If you want to use {transforms} in your cluster, you must not have
`xpack.transform.enabled` set to `false` on any master-eligible or data
nodes. To use {transforms} in clients (including {kib}), do not disable this
setting on any coordinating nodes. You must also have `node.transform` set to
`true` on at least one node. This is the default behavior. If you have the
{oss-dist}, do not use these settings. For more information, see
If you want to use {transforms} in your cluster, you must have `node.transform`
set to `true` on at least one node. This is the default behavior. If you have
the {oss-dist}, do not use these settings. For more information, see
<<transform-settings>>.

To create a dedicated {transform} node in the {default-dist}, set:
Expand Down
5 changes: 2 additions & 3 deletions docs/reference/settings/sql-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
<titleabbrev>SQL access settings</titleabbrev>
++++

SQL Access is enabled by default. You can configure
these SQL Access settings in the `elasticsearch.yml` file.
SQL Access is always enabled.

[float]
[[general-sql-settings]]
==== General SQL Access Settings
`xpack.sql.enabled`::
deprecated:[7.8.0,Basic License features should always be enabled] +
Set to `false` to disable SQL Access on the node.
This deprecated setting no longer has any effect.
32 changes: 9 additions & 23 deletions docs/reference/settings/transform-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,20 @@ file.
==== General {transforms} settings

`node.transform`::
Set to `true` to identify the node as a _transform node_. If either `node.data`
or `xpack.transform.enabled` is `false` for the node, the default value is
`false`. Otherwise, the default value is `true`.
Set to `true` to identify the node as a _transform node_. If `node.data`
is `false` for the node, the default value is `false`. Otherwise, the default
value is `true`.
+
If set to `false` in `elasticsearch.yml`, the node cannot run transforms. If set to
`true` but `xpack.transform.enabled` is set to `false`, the `node.transform` setting is
ignored and the node cannot run transforms. If you want to run transforms, there must be at
least one transform node in your cluster. +
If set to `false` in `elasticsearch.yml`, the node cannot run transforms. If
you want to run transforms, there must be at least one transform node in your
cluster. +
+
IMPORTANT: It is advised to use the `node.transform` setting to constrain the execution
of transforms to certain nodes instead of using `xpack.transform.enabled`. On dedicated
coordinating nodes or dedicated master nodes, disable the node.transform role.
IMPORTANT: On dedicated coordinating nodes or dedicated master nodes, disable
the node.transform role.

`xpack.transform.enabled`::
deprecated:[7.8.0,Basic License features should always be enabled] +
Set to `true` (default) to enable {transforms} on the node.
+
If set to `false` in `elasticsearch.yml`, the {transform} APIs are disabled on
the node. Therefore the node cannot start or administrate {transforms} or
receive transport (internal) communication requests related to {transform} APIs.
If the node is a coordinating node, {transform} requests from clients (including
{kib}) also fail.
+
IMPORTANT: If you want to use {transform} features in your cluster, it is
recommended that you set `xpack.transform.enabled` to `true` on all nodes. This
is the default behavior. At a minimum, it must be enabled on all master-eligible
nodes and all data nodes. If you want to use {transforms} in clients or {kib},
it must also be enabled on all coordinating nodes.
This deprecated setting no longer has any effect.

`xpack.transform.num_transform_failure_retries` (<<cluster-update-settings,Dynamic>>)::
The number of times that a {transform} retries when it experiences a
Expand Down
13 changes: 6 additions & 7 deletions docs/reference/transform/setup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ To use the {transforms}, you must have the
==== {transform-cap} nodes

To use {transforms}, there must be at least one node in your cluster with
`xpack.transform.enabled` and `node.transform` set to `true`. By default, all
nodes are {transform} nodes unless you explicitly change these settings or set
`node.data` to `false`.
`node.transform` set to `true`. By default, all nodes are {transform} nodes
unless you explicitly change these settings or set `node.data` to `false`.

If you want to control which nodes run {transforms}, set `node.transform` to
`false` on some nodes.
Expand All @@ -35,14 +34,14 @@ which users can manage or view {transforms}.

To _view_ the configuration and status of {transforms}, you must have:

* `transform_user` built-in role or `monitor_transform`
* `transform_user` built-in role or `monitor_transform`
cluster privileges

To _manage_ {transforms}, you must have:

* `transform_admin` built-in role or `manage_transform`
* `transform_admin` built-in role or `manage_transform`
cluster privileges
* `read` and `view_index_metadata` index privileges on source indices
* `read`, `create_index`, and `index` index privileges on destination indices
For more information, see <<security-privileges>> and <<built-in-roles>>.

For more information, see <<security-privileges>> and <<built-in-roles>>.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ private XPackSettings() {

/**
* Setting for controlling whether or not enrich is enabled.
* <p>
* This setting is now a no-op: setting it to false is permitted, but does nothing.
*/
@Deprecated(since = "7.8.0")
public static final Setting<Boolean> ENRICH_ENABLED_SETTING = Setting.boolSetting("xpack.enrich.enabled", true,
Property.NodeScope, Property.Deprecated);

Expand All @@ -48,7 +51,12 @@ private XPackSettings() {
*/
public static final Setting<Boolean> CCR_ENABLED_SETTING = Setting.boolSetting("xpack.ccr.enabled", true, Property.NodeScope);

/** Setting for enabling or disabling data frame. Defaults to true. */
/**
* Setting for enabling or disabling data frame. Defaults to true.
* <p>
* This setting is now a no-op: setting it to false is permitted, but does nothing.
*/
@Deprecated(since = "7.8.0")
public static final Setting<Boolean> TRANSFORM_ENABLED = Setting.boolSetting("xpack.transform.enabled", true,
Property.NodeScope, Property.Deprecated);

Expand All @@ -74,7 +82,12 @@ private XPackSettings() {
public static final Setting<Boolean> MACHINE_LEARNING_ENABLED = Setting.boolSetting("xpack.ml.enabled", true,
Setting.Property.NodeScope);

/** Setting for enabling or disabling rollup. Defaults to true. */
/**
* Setting for enabling or disabling rollup. Defaults to true.
* <p>
* This setting is now a no-op: setting it to false is permitted, but does nothing.
*/
@Deprecated(since = "7.8.0")
public static final Setting<Boolean> ROLLUP_ENABLED = Setting.boolSetting("xpack.rollup.enabled", true,
Property.NodeScope, Property.Deprecated);

Expand All @@ -86,7 +99,12 @@ private XPackSettings() {
public static final Setting<Boolean> DLS_FLS_ENABLED = Setting.boolSetting("xpack.security.dls_fls.enabled", true,
Setting.Property.NodeScope);

/** Setting for enabling or disabling Logstash extensions. Defaults to true. */
/**
* Setting for enabling or disabling Logstash extensions. Defaults to true.
* <p>
* This setting is now a no-op: setting it to false is permitted, but does nothing.
*/
@Deprecated(since = "7.8.0")
public static final Setting<Boolean> LOGSTASH_ENABLED = Setting.boolSetting("xpack.logstash.enabled", true,
Setting.Property.NodeScope, Property.Deprecated);

Expand All @@ -101,7 +119,10 @@ private XPackSettings() {

/**
* Setting for enabling or disabling the snapshot lifecycle extension. Defaults to true.
* <p>
* This setting is now a no-op: setting it to false is permitted, but does nothing.
*/
@Deprecated(since = "7.8.0")
public static final Setting<Boolean> SNAPSHOT_LIFECYCLE_ENABLED = Setting.boolSetting("xpack.slm.enabled", true,
Property.NodeScope, Property.Deprecated);

Expand Down Expand Up @@ -129,15 +150,30 @@ private XPackSettings() {
public static final Setting<Boolean> FIPS_MODE_ENABLED =
Setting.boolSetting("xpack.security.fips_mode.enabled", false, Property.NodeScope);

/** Setting for enabling or disabling sql. Defaults to true. */
/**
* Setting for enabling or disabling sql. Defaults to true.
* <p>
* This setting is now a no-op: setting it to false is permitted, but does nothing.
*/
@Deprecated(since = "7.8.0")
public static final Setting<Boolean> SQL_ENABLED = Setting.boolSetting("xpack.sql.enabled", true,
Property.NodeScope, Property.Deprecated);

/** Setting for enabling or disabling flattened fields. Defaults to true. */
/**
* Setting for enabling or disabling flattened fields. Defaults to true.
* <p>
* This setting is now a no-op: setting it to false is permitted, but does nothing.
*/
@Deprecated(since = "7.8.0")
public static final Setting<Boolean> FLATTENED_ENABLED = Setting.boolSetting("xpack.flattened.enabled", true,
Property.NodeScope, Property.Deprecated);

/** Setting for enabling or disabling vectors. Defaults to true. */
/**
* Setting for enabling or disabling vectors. Defaults to true.
* <p>
* This setting is now a no-op: setting it to false is permitted, but does nothing.
*/
@Deprecated(since = "7.8.0")
public static final Setting<Boolean> VECTORS_ENABLED = Setting.boolSetting("xpack.vectors.enabled", true,
Property.NodeScope, Property.Deprecated);

Expand Down Expand Up @@ -256,6 +292,7 @@ public static List<Setting<?>> getAllSettings() {
settings.add(TRANSFORM_ENABLED);
settings.add(FLATTENED_ENABLED);
settings.add(VECTORS_ENABLED);
settings.add(ENRICH_ENABLED_SETTING);
return Collections.unmodifiableList(settings);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

public class EnrichFeatureSetUsage extends XPackFeatureSet.Usage {

public EnrichFeatureSetUsage(boolean available, boolean enabled) {
super(XPackField.ENRICH, available, enabled);
public EnrichFeatureSetUsage(boolean available) {
super(XPackField.ENRICH, available, true);
}

public EnrichFeatureSetUsage(StreamInput input) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public FlattenedFeatureSetUsage(StreamInput input) throws IOException {
this.fieldCount = input.getVersion().onOrAfter(Version.V_7_6_0) ? input.readInt() : 0;
}

public FlattenedFeatureSetUsage(boolean available, boolean enabled, int fieldCount) {
super(XPackField.FLATTENED, available, enabled);
public FlattenedFeatureSetUsage(boolean available, int fieldCount) {
super(XPackField.FLATTENED, available, true);
this.fieldCount = fieldCount;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public LogstashFeatureSetUsage(StreamInput in) throws IOException {
super(in);
}

public LogstashFeatureSetUsage(boolean available, boolean enabled) {
super(XPackField.LOGSTASH, available, enabled);
public LogstashFeatureSetUsage(boolean available) {
super(XPackField.LOGSTASH, available, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public RollupFeatureSetUsage(StreamInput input) throws IOException {
super(input);
}

public RollupFeatureSetUsage(boolean available, boolean enabled) {
super(XPackField.ROLLUP, available, enabled);
public RollupFeatureSetUsage(boolean available) {
super(XPackField.ROLLUP, available, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalWriteable(this.slmStats);
}

public SLMFeatureSetUsage(boolean available, boolean enabled, @Nullable SnapshotLifecycleStats slmStats) {
super(XPackField.SNAPSHOT_LIFECYCLE, available, enabled);
public SLMFeatureSetUsage(boolean available, @Nullable SnapshotLifecycleStats slmStats) {
super(XPackField.SNAPSHOT_LIFECYCLE, available, true);
this.slmStats = slmStats;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public SqlFeatureSetUsage(StreamInput in) throws IOException {
stats = in.readMap();
}

public SqlFeatureSetUsage(boolean available, boolean enabled, Map<String, Object> stats) {
super(XPackField.SQL, available, enabled);
public SqlFeatureSetUsage(boolean available, Map<String, Object> stats) {
super(XPackField.SQL, available, true);
this.stats = stats;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public TransformFeatureSetUsage(StreamInput in) throws IOException {
this.accumulatedStats = new TransformIndexerStats(in);
}

public TransformFeatureSetUsage(boolean available, boolean enabled, Map<String, Long> transformCountByState,
public TransformFeatureSetUsage(boolean available, Map<String, Long> transformCountByState,
TransformIndexerStats accumulatedStats) {
super(XPackField.TRANSFORM, available, enabled);
super(XPackField.TRANSFORM, available, true);
this.transformCountByState = Objects.requireNonNull(transformCountByState);
this.accumulatedStats = Objects.requireNonNull(accumulatedStats);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public Version getMinimalSupportedVersion() {
return Version.V_7_3_0;
}

public VectorsFeatureSetUsage(boolean available, boolean enabled, int numDenseVectorFields, int avgDenseVectorDims) {
super(XPackField.VECTORS, available, enabled);
public VectorsFeatureSetUsage(boolean available, int numDenseVectorFields, int avgDenseVectorDims) {
super(XPackField.VECTORS, available, true);
this.numDenseVectorFields = numDenseVectorFields;
this.avgDenseVectorDims = avgDenseVectorDims;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,25 @@ public void testFlattenedIsRemovedInNextMajor() {

@Override
protected FlattenedFeatureSetUsage createTestInstance() {
return new FlattenedFeatureSetUsage(randomBoolean(), randomBoolean(), randomIntBetween(0, 1000));
return new FlattenedFeatureSetUsage(randomBoolean(), randomIntBetween(0, 1000));
}

@Override
protected FlattenedFeatureSetUsage mutateInstance(FlattenedFeatureSetUsage instance) throws IOException {

boolean available = instance.available();
boolean enabled = instance.enabled();
int fieldCount = instance.fieldCount();

switch (between(0, 2)) {
switch (between(0, 1)) {
case 0:
available = !available;
break;
case 1:
enabled = !enabled;
break;
case 2:
fieldCount = randomValueOtherThan(instance.fieldCount(), () -> randomIntBetween(0, 1000));
break;
}

return new FlattenedFeatureSetUsage(available, enabled, fieldCount);
return new FlattenedFeatureSetUsage(available, fieldCount);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ protected TransformFeatureSetUsage createTestInstance() {
transformCountByState.put(randomFrom(IndexerState.values()).toString(), randomLong());
}

return new TransformFeatureSetUsage(randomBoolean(), randomBoolean(), transformCountByState,
TransformIndexerStatsTests.randomStats());
return new TransformFeatureSetUsage(randomBoolean(), transformCountByState, TransformIndexerStatsTests.randomStats());
}

@Override
Expand Down
Loading