Skip to content

Commit f36ab09

Browse files
Deprecated xpack "enable" settings should be no-ops (#55416)
The following settings are now no-ops: * xpack.flattened.enabled * xpack.logstash.enabled * xpack.rollup.enabled * xpack.slm.enabled * xpack.sql.enabled * xpack.transform.enabled * xpack.vectors.enabled Since these settings no longer need to be checked, we can remove settings parameters from a number of constructors and methods, and do so in this commit. We also update documentation to remove references to these settings.
1 parent cd6a892 commit f36ab09

File tree

55 files changed

+230
-710
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+230
-710
lines changed

docs/reference/migration/migrate_8_0/settings.asciidoc

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,15 @@ removed.
7272
In Elasticsearch 7.8.0, the following settings no longer have any effect, and
7373
have been deprecated:
7474

75+
* `xpack.enrich.enabled`
76+
* `xpack.flattened.enabled`
7577
* `xpack.ilm.enabled`
7678
* `xpack.monitoring.enabled`
79+
* `xpack.rollup.enabled`
80+
* `xpack.slm.enabled`
81+
* `xpack.sql.enabled`
82+
* `xpack.transform.enabled`
83+
* `xpack.vectors.enabled`
7784

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

86-
Additionally, the following settings have been deprecated without removing
87-
their effects:
88-
89-
* `xpack.enrich.enabled`
90-
* `xpack.flattened.enabled`
91-
* `xpack.rollup.enabled`
92-
* `xpack.slm.enabled`
93-
* `xpack.sql.enabled`
94-
* `xpack.transform.enabled`
95-
* `xpack.vectors.enabled`
96-
97-
In future releases, it will not be possible to disable the APIs for Enrichment,
98-
Flattened mappings, Rollup, SLM, SQL, Transforms, and Vectors.
99-
10093
[float]
10194
==== The `prefer_v2_templates` parameter now defaults to `true`
10295

docs/reference/modules/node.asciidoc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,9 @@ node.remote_cluster_client: false <8>
404404

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

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

415412
To create a dedicated {transform} node in the {default-dist}, set:

docs/reference/settings/sql-settings.asciidoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
<titleabbrev>SQL access settings</titleabbrev>
66
++++
77

8-
SQL Access is enabled by default. You can configure
9-
these SQL Access settings in the `elasticsearch.yml` file.
8+
SQL Access is always enabled.
109

1110
[float]
1211
[[general-sql-settings]]
1312
==== General SQL Access Settings
1413
`xpack.sql.enabled`::
1514
deprecated:[7.8.0,Basic License features should always be enabled] +
16-
Set to `false` to disable SQL Access on the node.
15+
This deprecated setting no longer has any effect.

docs/reference/settings/transform-settings.asciidoc

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,20 @@ file.
2121
==== General {transforms} settings
2222

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

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

5339
`xpack.transform.num_transform_failure_retries` (<<cluster-update-settings,Dynamic>>)::
5440
The number of times that a {transform} retries when it experiences a

docs/reference/transform/setup.asciidoc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ To use the {transforms}, you must have the
1616
==== {transform-cap} nodes
1717

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

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

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

38-
* `transform_user` built-in role or `monitor_transform`
37+
* `transform_user` built-in role or `monitor_transform`
3938
cluster privileges
4039

4140
To _manage_ {transforms}, you must have:
4241

43-
* `transform_admin` built-in role or `manage_transform`
42+
* `transform_admin` built-in role or `manage_transform`
4443
cluster privileges
4544
* `read` and `view_index_metadata` index privileges on source indices
4645
* `read`, `create_index`, and `index` index privileges on destination indices
47-
48-
For more information, see <<security-privileges>> and <<built-in-roles>>.
46+
47+
For more information, see <<security-privileges>> and <<built-in-roles>>.

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackSettings.java

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ private XPackSettings() {
3939

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -256,6 +292,7 @@ public static List<Setting<?>> getAllSettings() {
256292
settings.add(TRANSFORM_ENABLED);
257293
settings.add(FLATTENED_ENABLED);
258294
settings.add(VECTORS_ENABLED);
295+
settings.add(ENRICH_ENABLED_SETTING);
259296
return Collections.unmodifiableList(settings);
260297
}
261298

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/EnrichFeatureSetUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
public class EnrichFeatureSetUsage extends XPackFeatureSet.Usage {
1717

18-
public EnrichFeatureSetUsage(boolean available, boolean enabled) {
19-
super(XPackField.ENRICH, available, enabled);
18+
public EnrichFeatureSetUsage(boolean available) {
19+
super(XPackField.ENRICH, available, true);
2020
}
2121

2222
public EnrichFeatureSetUsage(StreamInput input) throws IOException {

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/flattened/FlattenedFeatureSetUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public FlattenedFeatureSetUsage(StreamInput input) throws IOException {
2828
this.fieldCount = input.getVersion().onOrAfter(Version.V_7_6_0) ? input.readInt() : 0;
2929
}
3030

31-
public FlattenedFeatureSetUsage(boolean available, boolean enabled, int fieldCount) {
32-
super(XPackField.FLATTENED, available, enabled);
31+
public FlattenedFeatureSetUsage(boolean available, int fieldCount) {
32+
super(XPackField.FLATTENED, available, true);
3333
this.fieldCount = fieldCount;
3434
}
3535

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/logstash/LogstashFeatureSetUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ public LogstashFeatureSetUsage(StreamInput in) throws IOException {
1818
super(in);
1919
}
2020

21-
public LogstashFeatureSetUsage(boolean available, boolean enabled) {
22-
super(XPackField.LOGSTASH, available, enabled);
21+
public LogstashFeatureSetUsage(boolean available) {
22+
super(XPackField.LOGSTASH, available, true);
2323
}
2424

2525
@Override

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/rollup/RollupFeatureSetUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ public RollupFeatureSetUsage(StreamInput input) throws IOException {
1818
super(input);
1919
}
2020

21-
public RollupFeatureSetUsage(boolean available, boolean enabled) {
22-
super(XPackField.ROLLUP, available, enabled);
21+
public RollupFeatureSetUsage(boolean available) {
22+
super(XPackField.ROLLUP, available, true);
2323
}
2424

2525
@Override

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/slm/SLMFeatureSetUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public void writeTo(StreamOutput out) throws IOException {
3333
out.writeOptionalWriteable(this.slmStats);
3434
}
3535

36-
public SLMFeatureSetUsage(boolean available, boolean enabled, @Nullable SnapshotLifecycleStats slmStats) {
37-
super(XPackField.SNAPSHOT_LIFECYCLE, available, enabled);
36+
public SLMFeatureSetUsage(boolean available, @Nullable SnapshotLifecycleStats slmStats) {
37+
super(XPackField.SNAPSHOT_LIFECYCLE, available, true);
3838
this.slmStats = slmStats;
3939
}
4040

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/sql/SqlFeatureSetUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public SqlFeatureSetUsage(StreamInput in) throws IOException {
2525
stats = in.readMap();
2626
}
2727

28-
public SqlFeatureSetUsage(boolean available, boolean enabled, Map<String, Object> stats) {
29-
super(XPackField.SQL, available, enabled);
28+
public SqlFeatureSetUsage(boolean available, Map<String, Object> stats) {
29+
super(XPackField.SQL, available, true);
3030
this.stats = stats;
3131
}
3232

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/TransformFeatureSetUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public TransformFeatureSetUsage(StreamInput in) throws IOException {
3131
this.accumulatedStats = new TransformIndexerStats(in);
3232
}
3333

34-
public TransformFeatureSetUsage(boolean available, boolean enabled, Map<String, Long> transformCountByState,
34+
public TransformFeatureSetUsage(boolean available, Map<String, Long> transformCountByState,
3535
TransformIndexerStats accumulatedStats) {
36-
super(XPackField.TRANSFORM, available, enabled);
36+
super(XPackField.TRANSFORM, available, true);
3737
this.transformCountByState = Objects.requireNonNull(transformCountByState);
3838
this.accumulatedStats = Objects.requireNonNull(accumulatedStats);
3939
}

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/vectors/VectorsFeatureSetUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public Version getMinimalSupportedVersion() {
4747
return Version.V_7_3_0;
4848
}
4949

50-
public VectorsFeatureSetUsage(boolean available, boolean enabled, int numDenseVectorFields, int avgDenseVectorDims) {
51-
super(XPackField.VECTORS, available, enabled);
50+
public VectorsFeatureSetUsage(boolean available, int numDenseVectorFields, int avgDenseVectorDims) {
51+
super(XPackField.VECTORS, available, true);
5252
this.numDenseVectorFields = numDenseVectorFields;
5353
this.avgDenseVectorDims = avgDenseVectorDims;
5454
}

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/flattened/FlattenedFeatureSetUsageTests.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,25 @@ public void testFlattenedIsRemovedInNextMajor() {
2020

2121
@Override
2222
protected FlattenedFeatureSetUsage createTestInstance() {
23-
return new FlattenedFeatureSetUsage(randomBoolean(), randomBoolean(), randomIntBetween(0, 1000));
23+
return new FlattenedFeatureSetUsage(randomBoolean(), randomIntBetween(0, 1000));
2424
}
2525

2626
@Override
2727
protected FlattenedFeatureSetUsage mutateInstance(FlattenedFeatureSetUsage instance) throws IOException {
2828

2929
boolean available = instance.available();
30-
boolean enabled = instance.enabled();
3130
int fieldCount = instance.fieldCount();
3231

33-
switch (between(0, 2)) {
32+
switch (between(0, 1)) {
3433
case 0:
3534
available = !available;
3635
break;
3736
case 1:
38-
enabled = !enabled;
39-
break;
40-
case 2:
4137
fieldCount = randomValueOtherThan(instance.fieldCount(), () -> randomIntBetween(0, 1000));
4238
break;
4339
}
4440

45-
return new FlattenedFeatureSetUsage(available, enabled, fieldCount);
41+
return new FlattenedFeatureSetUsage(available, fieldCount);
4642
}
4743

4844
@Override

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/TransformFeatureSetUsageTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ protected TransformFeatureSetUsage createTestInstance() {
2424
transformCountByState.put(randomFrom(IndexerState.values()).toString(), randomLong());
2525
}
2626

27-
return new TransformFeatureSetUsage(randomBoolean(), randomBoolean(), transformCountByState,
28-
TransformIndexerStatsTests.randomStats());
27+
return new TransformFeatureSetUsage(randomBoolean(), transformCountByState, TransformIndexerStatsTests.randomStats());
2928
}
3029

3130
@Override

0 commit comments

Comments
 (0)