Browse Source

Deprecate disabling basic-license features (#54816)

We believe there's no longer a need to be able to disable basic-license
features completely using the "xpack.*.enabled" settings. If users don't
want to use those features, they simply don't need to use them. Having
such features always available lets us build more complex features that
assume basic-license features are present.

This commit deprecates settings of the form "xpack.*.enabled" for
basic-license features, excluding "security", which is a special case.
It also removes deprecated settings from integration tests and unit
tests where they're not directly relevant; e.g. monitoring and ILM are
no longer disabled in many integration tests.
William Brafford 5 years ago
parent
commit
92c8a73348
62 changed files with 172 additions and 168 deletions
  1. 0 3
      distribution/build.gradle
  2. 18 0
      docs/reference/migration/migrate_8_0/settings.asciidoc
  3. 22 35
      docs/reference/modules/node.asciidoc
  4. 2 2
      docs/reference/monitoring/collecting-monitoring-data.asciidoc
  5. 3 2
      docs/reference/settings/ilm-settings.asciidoc
  6. 1 0
      docs/reference/settings/monitoring-settings.asciidoc
  7. 6 7
      docs/reference/settings/notification-settings.asciidoc
  8. 1 0
      docs/reference/settings/sql-settings.asciidoc
  9. 3 2
      docs/reference/settings/transform-settings.asciidoc
  10. 10 11
      docs/reference/slm/apis/index.asciidoc
  11. 10 11
      docs/reference/slm/index.asciidoc
  12. 0 2
      plugins/examples/security-authorization-engine/build.gradle
  13. 2 3
      x-pack/plugin/ccr/qa/rest/build.gradle
  14. 0 1
      x-pack/plugin/ccr/qa/security/build.gradle
  15. 0 1
      x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/CcrIntegTestCase.java
  16. 13 10
      x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackSettings.java
  17. 16 2
      x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/monitoring/collector/enrich/EnrichStatsCollectorTests.java
  18. 0 4
      x-pack/plugin/ilm/qa/multi-cluster/build.gradle
  19. 0 2
      x-pack/plugin/ilm/qa/multi-node/build.gradle
  20. 0 2
      x-pack/plugin/ilm/qa/rest/build.gradle
  21. 0 2
      x-pack/plugin/ilm/qa/with-security/build.gradle
  22. 3 0
      x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/ilm/IndexLifecycleInfoTransportActionTests.java
  23. 0 1
      x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/ilm/IndexLifecycleInitialisationTests.java
  24. 0 2
      x-pack/plugin/ml/qa/basic-multi-node/build.gradle
  25. 0 1
      x-pack/plugin/ml/qa/disabled/build.gradle
  26. 0 2
      x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle
  27. 11 0
      x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeIntegTestCase.java
  28. 0 1
      x-pack/plugin/ml/qa/single-node-tests/build.gradle
  29. 7 10
      x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlIndexTemplateRegistryTests.java
  30. 3 0
      x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringInfoTransportActionTests.java
  31. 3 0
      x-pack/plugin/rollup/src/test/java/org/elasticsearch/xpack/rollup/RollupInfoTransportActionTests.java
  32. 0 1
      x-pack/plugin/security/qa/basic-enable-security/build.gradle
  33. 0 1
      x-pack/plugin/security/qa/security-basic/build.gradle
  34. 2 3
      x-pack/plugin/security/qa/security-disabled/build.gradle
  35. 2 3
      x-pack/plugin/security/qa/security-not-enabled/build.gradle
  36. 0 1
      x-pack/plugin/security/qa/security-trial/build.gradle
  37. 0 1
      x-pack/plugin/security/qa/tls-basic/build.gradle
  38. 0 1
      x-pack/plugin/sql/qa/build.gradle
  39. 10 2
      x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/SqlInfoTransportActionTests.java
  40. 3 0
      x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlPluginTests.java
  41. 0 1
      x-pack/plugin/transform/qa/multi-node-tests/build.gradle
  42. 4 0
      x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/TransformInfoTransportActionTests.java
  43. 5 0
      x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/TransformTests.java
  44. 8 0
      x-pack/plugin/vectors/src/test/java/org/elasticsearch/xpack/vectors/VectorsInfoTransportActionTests.java
  45. 1 4
      x-pack/plugin/watcher/qa/rest/build.gradle
  46. 0 6
      x-pack/plugin/watcher/qa/rest/src/test/resources/rest-api-spec/test/painless/50_update_scripts.yml
  47. 0 3
      x-pack/plugin/watcher/qa/with-monitoring/build.gradle
  48. 0 2
      x-pack/plugin/watcher/qa/with-security/build.gradle
  49. 3 0
      x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java
  50. 0 2
      x-pack/qa/core-rest-tests-with-security/build.gradle
  51. 0 3
      x-pack/qa/multi-cluster-search-security/build.gradle
  52. 0 3
      x-pack/qa/multi-cluster-tests-with-security/build.gradle
  53. 0 2
      x-pack/qa/multi-node/build.gradle
  54. 0 1
      x-pack/qa/reindex-tests-with-security/build.gradle
  55. 0 1
      x-pack/qa/rolling-upgrade-basic/build.gradle
  56. 0 1
      x-pack/qa/rolling-upgrade-multi-cluster/build.gradle
  57. 0 2
      x-pack/qa/security-example-spi-extension/build.gradle
  58. 0 1
      x-pack/qa/smoke-test-plugins-ssl/build.gradle
  59. 0 1
      x-pack/qa/smoke-test-security-with-mustache/build.gradle
  60. 0 1
      x-pack/qa/third-party/jira/build.gradle
  61. 0 1
      x-pack/qa/third-party/pagerduty/build.gradle
  62. 0 1
      x-pack/qa/third-party/slack/build.gradle

+ 0 - 3
distribution/build.gradle

@@ -449,9 +449,6 @@ testClusters {
         throw new IllegalArgumentException("Unsupported self-generated license type: [" + licenseType + "[basic] or [trial].")
         throw new IllegalArgumentException("Unsupported self-generated license type: [" + licenseType + "[basic] or [trial].")
       }
       }
       setting 'xpack.security.enabled', 'true'
       setting 'xpack.security.enabled', 'true'
-      setting 'xpack.monitoring.enabled', 'true'
-      setting 'xpack.sql.enabled', 'true'
-      setting 'xpack.rollup.enabled', 'true'
       keystore 'bootstrap.password', 'password'
       keystore 'bootstrap.password', 'password'
       user username: 'elastic-admin', password: 'elastic-password', role: 'superuser'
       user username: 'elastic-admin', password: 'elastic-password', role: 'superuser'
     }
     }

+ 18 - 0
docs/reference/migration/migrate_8_0/settings.asciidoc

@@ -51,3 +51,21 @@ setting `cluster.remote.connect` is removed.
 In Elasticsearch 7.8.0, the setting `node.local_storage` was deprecated and
 In Elasticsearch 7.8.0, the setting `node.local_storage` was deprecated and
 beginning in Elasticsearch 8.0.0 all nodes will require local storage. Therefore,
 beginning in Elasticsearch 8.0.0 all nodes will require local storage. Therefore,
 the `node.local_storage` setting has been removed.
 the `node.local_storage` setting has been removed.
+
+[float]
+==== Option to disable basic license features is deprecated
+
+In Elasticsearch 7.8.0, the following settings 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`
+
+In future releases, it will not be possible to disable the APIs for Enrichment,
+Flattened mappings, ILM, Monitoring, Rollup, SLM, SQL, Transforms, and Vectors.

+ 22 - 35
docs/reference/modules/node.asciidoc

@@ -52,10 +52,9 @@ fails to start.
 
 
 <<transform-node,{transform-cap} node>>::
 <<transform-node,{transform-cap} node>>::
 
 
-A node that has `xpack.transform.enabled` and `node.transform` set to `true`. If
-you want to use {transforms}, there must be at least one {transform} node in
-your cluster. For more information, see <<transform-settings>> and
-<<transforms>>.
+A node that has `node.transform` set to `true`. If you want to use {transforms},
+there must be at least one {transform} node in your cluster. For more
+information, see <<transform-settings>> and <<transforms>>.
 
 
 [NOTE]
 [NOTE]
 [[coordinating-node]]
 [[coordinating-node]]
@@ -126,8 +125,7 @@ node.ingest: false <4>
 node.ml: false <5>
 node.ml: false <5>
 xpack.ml.enabled: true <6>
 xpack.ml.enabled: true <6>
 node.transform: false <7>
 node.transform: false <7>
-xpack.transform.enabled: true <8>
-node.remote_client_client: false <9>
+node.remote_client_client: false <8>
 -------------------
 -------------------
 <1> The `node.master` role is enabled by default.
 <1> The `node.master` role is enabled by default.
 <2> The `node.voting_only` role is disabled by default.
 <2> The `node.voting_only` role is disabled by default.
@@ -136,8 +134,7 @@ node.remote_client_client: false <9>
 <5> Disable the `node.ml` role (enabled by default).
 <5> Disable the `node.ml` role (enabled by default).
 <6> The `xpack.ml.enabled` setting is enabled by default.
 <6> The `xpack.ml.enabled` setting is enabled by default.
 <7> Disable the `node.transform` role.
 <7> Disable the `node.transform` role.
-<8> The `xpack.transform.enabled` setting is enabled by default.
-<9> Disable remote cluster connections (enabled by default).
+<8> Disable remote cluster connections (enabled by default).
 
 
 To create a dedicated master-eligible node in the {oss-dist}, set:
 To create a dedicated master-eligible node in the {oss-dist}, set:
 
 
@@ -209,8 +206,7 @@ node.ingest: false <4>
 node.ml: false <5>
 node.ml: false <5>
 xpack.ml.enabled: true <6>
 xpack.ml.enabled: true <6>
 node.transform: false <7>
 node.transform: false <7>
-xpack.transform.enabled: true <8>
-node.remote_cluster_client: false <9>
+node.remote_cluster_client: false <8>
 -------------------
 -------------------
 <1> The `node.master` role is enabled by default.
 <1> The `node.master` role is enabled by default.
 <2> Enable the `node.voting_only` role (disabled by default).
 <2> Enable the `node.voting_only` role (disabled by default).
@@ -219,8 +215,7 @@ node.remote_cluster_client: false <9>
 <5> Disable the `node.ml` role (enabled by default).
 <5> Disable the `node.ml` role (enabled by default).
 <6> The `xpack.ml.enabled` setting is enabled by default.
 <6> The `xpack.ml.enabled` setting is enabled by default.
 <7> Disable the `node.transform` role.
 <7> Disable the `node.transform` role.
-<8> The `xpack.transform.enabled` setting is enabled by default.
-<9> Disable remote cluster connections (enabled by default).
+<8> Disable remote cluster connections (enabled by default).
 
 
 [float]
 [float]
 [[data-node]]
 [[data-node]]
@@ -243,8 +238,7 @@ node.data: true <3>
 node.ingest: false <4>
 node.ingest: false <4>
 node.ml: false <5>
 node.ml: false <5>
 node.transform: false <6>
 node.transform: false <6>
-xpack.transform.enabled: true <7>
-node.remote_cluster_client: false <8>
+node.remote_cluster_client: false <7>
 -------------------
 -------------------
 <1> Disable the `node.master` role (enabled by default).
 <1> Disable the `node.master` role (enabled by default).
 <2> The `node.voting_only` role is disabled by default.
 <2> The `node.voting_only` role is disabled by default.
@@ -252,8 +246,7 @@ node.remote_cluster_client: false <8>
 <4> Disable the `node.ingest` role (enabled by default).
 <4> Disable the `node.ingest` role (enabled by default).
 <5> Disable the `node.ml` role (enabled by default).
 <5> Disable the `node.ml` role (enabled by default).
 <6> Disable the `node.transform` role.
 <6> Disable the `node.transform` role.
-<7> The `xpack.transform.enabled` setting is enabled by default.
-<8> Disable remote cluster connections (enabled by default).
+<7> Disable remote cluster connections (enabled by default).
 
 
 To create a dedicated data node in the {oss-dist}, set:
 To create a dedicated data node in the {oss-dist}, set:
 [source,yaml]
 [source,yaml]
@@ -343,8 +336,7 @@ node.ingest: false <4>
 node.ml: false <5>
 node.ml: false <5>
 xpack.ml.enabled: true <6>
 xpack.ml.enabled: true <6>
 node.transform: false <7>
 node.transform: false <7>
-xpack.transform.enabled: true <8>
-node.remote_cluster_client: false <9>
+node.remote_cluster_client: false <8>
 -------------------
 -------------------
 <1> Disable the `node.master` role (enabled by default).
 <1> Disable the `node.master` role (enabled by default).
 <2> The `node.voting_only` role is disabled by default.
 <2> The `node.voting_only` role is disabled by default.
@@ -353,8 +345,7 @@ node.remote_cluster_client: false <9>
 <5> Disable the `node.ml` role (enabled by default).
 <5> Disable the `node.ml` role (enabled by default).
 <6> The `xpack.ml.enabled` setting is enabled by default.
 <6> The `xpack.ml.enabled` setting is enabled by default.
 <7> Disable the `node.transform` role.
 <7> Disable the `node.transform` role.
-<8> The `xpack.transform.enabled` setting is enabled by default.
-<9> Disable remote cluster connections (enabled by default).
+<8> Disable remote cluster connections (enabled by default).
 
 
 To create a dedicated coordinating node in the {oss-dist}, set:
 To create a dedicated coordinating node in the {oss-dist}, set:
 
 
@@ -396,8 +387,7 @@ node.ingest: false <4>
 node.ml: true <5>
 node.ml: true <5>
 xpack.ml.enabled: true <6>
 xpack.ml.enabled: true <6>
 node.transform: false <7>
 node.transform: false <7>
-xpack.transform.enabled: true <8>
-node.remote_cluster_client: false <9>
+node.remote_cluster_client: false <8>
 -------------------
 -------------------
 <1> Disable the `node.master` role (enabled by default).
 <1> Disable the `node.master` role (enabled by default).
 <2> The `node.voting_only` role is disabled by default.
 <2> The `node.voting_only` role is disabled by default.
@@ -406,8 +396,7 @@ node.remote_cluster_client: false <9>
 <5> The `node.ml` role is enabled by default.
 <5> The `node.ml` role is enabled by default.
 <6> The `xpack.ml.enabled` setting is enabled by default.
 <6> The `xpack.ml.enabled` setting is enabled by default.
 <7> Disable the `node.transform` role.
 <7> Disable the `node.transform` role.
-<8> The `xpack.transform.enabled` setting is enabled by default.
-<9> Disable remote cluster connections (enabled by default).
+<8> Disable remote cluster connections (enabled by default).
 
 
 [discrete]
 [discrete]
 [[transform-node]]
 [[transform-node]]
@@ -415,13 +404,13 @@ node.remote_cluster_client: false <9>
 
 
 {transform-cap} nodes run {transforms} and handle {transform} API requests.
 {transform-cap} nodes run {transforms} and handle {transform} API requests.
 
 
-If you want to use {transforms} in your cluster, you must have
-`xpack.transform.enabled` set to `true` on all master-eligible nodes and all
-data nodes. If you want to use {transforms} in clients (including {kib}), it
-must also be enabled on all 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 <<transform-settings>>.
+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
+<<transform-settings>>.
 
 
 To create a dedicated {transform} node in the {default-dist}, set:
 To create a dedicated {transform} node in the {default-dist}, set:
 
 
@@ -433,8 +422,7 @@ node.data: false <3>
 node.ingest: false <4>
 node.ingest: false <4>
 node.ml: false <5>
 node.ml: false <5>
 node.transform: true <6>
 node.transform: true <6>
-xpack.transform.enabled: true <7>
-node.remote_cluster_client: false <8>
+node.remote_cluster_client: false <7>
 -------------------
 -------------------
 <1> Disable the `node.master` role.
 <1> Disable the `node.master` role.
 <2> Disable the `node.voting_only`.
 <2> Disable the `node.voting_only`.
@@ -442,8 +430,7 @@ node.remote_cluster_client: false <8>
 <4> Disable the `node.ingest` role.
 <4> Disable the `node.ingest` role.
 <5> Disable the `node.ml` role.
 <5> Disable the `node.ml` role.
 <6> Enable the `node.transform` role.
 <6> Enable the `node.transform` role.
-<7> Enable the `xpack.transform.enabled` setting.
-<8> Disable remote cluster connections.
+<7> Disable remote cluster connections.
 
 
 [float]
 [float]
 [[change-node-role]]
 [[change-node-role]]

+ 2 - 2
docs/reference/monitoring/collecting-monitoring-data.asciidoc

@@ -30,8 +30,8 @@ To learn about monitoring in general, see <<monitor-elasticsearch-cluster>>.
 
 
 . Configure your cluster to collect monitoring data:
 . Configure your cluster to collect monitoring data:
 
 
-.. Verify that the `xpack.monitoring.enabled` setting is `true`, which is its
-default value, on each node in the cluster. For more information, see
+.. Verify that the deprecated `xpack.monitoring.enabled` setting is not set to
+`false` on any node in the cluster. For more information, see
 <<monitoring-settings>>.
 <<monitoring-settings>>.
 
 
 .. Verify that the `xpack.monitoring.elasticsearch.collection.enabled` setting
 .. Verify that the `xpack.monitoring.elasticsearch.collection.enabled` setting

+ 3 - 2
docs/reference/settings/ilm-settings.asciidoc

@@ -7,8 +7,9 @@ These are the settings available for configuring Index Lifecycle Management
 ==== Cluster level settings
 ==== Cluster level settings
 
 
 `xpack.ilm.enabled`::
 `xpack.ilm.enabled`::
-Whether ILM is enabled or disabled, setting this to `false` disables any
-ILM REST API endpoints and functionality. Defaults to `true`.
+deprecated:[7.8.0,Basic License features should always be enabled] +
+Whether ILM is enabled or disabled, setting this to `false` disables any ILM
+REST API endpoints and functionality. Defaults to `true`.
 
 
 `indices.lifecycle.poll_interval`::
 `indices.lifecycle.poll_interval`::
 (<<time-units, time units>>) How often {ilm} checks for indices that meet policy
 (<<time-units, time units>>) How often {ilm} checks for indices that meet policy

+ 1 - 0
docs/reference/settings/monitoring-settings.asciidoc

@@ -27,6 +27,7 @@ For more information, see <<monitor-elasticsearch-cluster>>.
 ==== General Monitoring Settings
 ==== General Monitoring Settings
 
 
 `xpack.monitoring.enabled`::
 `xpack.monitoring.enabled`::
+deprecated:[7.8.0,Basic License features should always be enabled] +
 Set to `true` (default) to enable {es} {monitoring} for {es} on the node.
 Set to `true` (default) to enable {es} {monitoring} for {es} on the node.
 +
 +
 --
 --

+ 6 - 7
docs/reference/settings/notification-settings.asciidoc

@@ -38,13 +38,12 @@ required. For more information, see <<encrypting-data>>.
 added:[6.3.0,Default changed to `true`.]
 added:[6.3.0,Default changed to `true`.]
 deprecated:[7.0.0,Watcher history indices are now managed by the `watch-history-ilm-policy` ILM policy]
 deprecated:[7.0.0,Watcher history indices are now managed by the `watch-history-ilm-policy` ILM policy]
 +
 +
-Set to `true` (default) to enable the cleaner service. If this setting is
-`true`, the `xpack.monitoring.enabled` setting must also be set to `true` with
-a local exporter enabled. The cleaner service removes previous versions of
-{watcher} indices (for example, `.watcher-history*`) when it determines that
-they are old. The duration of {watcher} indices is determined by the
-`xpack.monitoring.history.duration` setting, which defaults to 7 days. For
-more information about that setting, see <<monitoring-settings>>.
+Set to `true` (default) to enable the cleaner service. The cleaner service
+removes previous versions of {watcher} indices (for example,
+`.watcher-history*`) when it determines that they are old. The duration of
+{watcher} indices is determined by the `xpack.monitoring.history.duration`
+setting, which defaults to 7 days. For more information about that setting,
+see <<monitoring-settings>>.
 
 
 `xpack.http.proxy.host`::
 `xpack.http.proxy.host`::
 Specifies the address of the proxy server to use to connect to HTTP services.
 Specifies the address of the proxy server to use to connect to HTTP services.

+ 1 - 0
docs/reference/settings/sql-settings.asciidoc

@@ -12,4 +12,5 @@ these SQL Access settings in the `elasticsearch.yml` file.
 [[general-sql-settings]]
 [[general-sql-settings]]
 ==== General SQL Access Settings
 ==== General SQL Access Settings
 `xpack.sql.enabled`::
 `xpack.sql.enabled`::
+deprecated:[7.8.0,Basic License features should always be enabled] +
 Set to `false` to disable SQL Access on the node.
 Set to `false` to disable SQL Access on the node.

+ 3 - 2
docs/reference/settings/transform-settings.asciidoc

@@ -35,13 +35,14 @@ of transforms to certain nodes instead of using `xpack.transform.enabled`. On de
 coordinating nodes or dedicated master nodes, disable the node.transform role.
 coordinating nodes or dedicated master nodes, disable the node.transform role.
 
 
 `xpack.transform.enabled`::
 `xpack.transform.enabled`::
-Set to `true` (default) to enable {transforms} on the node. +
+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
 If set to `false` in `elasticsearch.yml`, the {transform} APIs are disabled on
 the node. Therefore the node cannot start or administrate {transforms} or
 the node. Therefore the node cannot start or administrate {transforms} or
 receive transport (internal) communication requests related to {transform} APIs.
 receive transport (internal) communication requests related to {transform} APIs.
 If the node is a coordinating node, {transform} requests from clients (including
 If the node is a coordinating node, {transform} requests from clients (including
-{kib}) also fail. 
+{kib}) also fail.
 +
 +
 IMPORTANT: If you want to use {transform} features in your cluster, it is
 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
 recommended that you set `xpack.transform.enabled` to `true` on all nodes. This

+ 10 - 11
docs/reference/slm/apis/index.asciidoc

@@ -3,33 +3,32 @@
 [[snapshot-lifecycle-management]]
 [[snapshot-lifecycle-management]]
 == Manage the snapshot lifecycle
 == Manage the snapshot lifecycle
 
 
-You can set up snapshot lifecycle policies to automate the timing, frequency, and retention of snapshots. 
-Snapshot policies can apply to multiple indices. 
+You can set up snapshot lifecycle policies to automate the timing, frequency, and retention of snapshots.
+Snapshot policies can apply to multiple indices.
 
 
 The snapshot lifecycle management (SLM) <<snapshot-lifecycle-management-api, CRUD APIs>> provide
 The snapshot lifecycle management (SLM) <<snapshot-lifecycle-management-api, CRUD APIs>> provide
-the building blocks for the snapshot policy features that are part of the Management application in {kib}. 
-The  Snapshot and Restore UI makes it easy to set up policies, register snapshot repositories, 
+the building blocks for the snapshot policy features that are part of the Management application in {kib}.
+The  Snapshot and Restore UI makes it easy to set up policies, register snapshot repositories,
 view and manage snapshots, and restore indices.
 view and manage snapshots, and restore indices.
 
 
 You can stop and restart SLM to temporarily pause automatic backups while performing
 You can stop and restart SLM to temporarily pause automatic backups while performing
 upgrades or other maintenance.
 upgrades or other maintenance.
-To disable SLM entirely, set `xpack.slm.enabled` to `false` in `elasticsearch.yml`.
 
 
 [float]
 [float]
 [[slm-and-security]]
 [[slm-and-security]]
 === Security and SLM
 === Security and SLM
 
 
-Two built-in cluster privileges control access to the SLM actions when 
+Two built-in cluster privileges control access to the SLM actions when
 {es} {security-features} are enabled:
 {es} {security-features} are enabled:
 
 
-`manage_slm`:: Allows a user to perform all SLM actions, including creating and updating policies 
-and starting and stopping SLM. 
+`manage_slm`:: Allows a user to perform all SLM actions, including creating and updating policies
+and starting and stopping SLM.
 
 
-`read_slm`:: Allows a user to perform all read-only SLM actions, 
+`read_slm`:: Allows a user to perform all read-only SLM actions,
 such as getting policies and checking the SLM status.
 such as getting policies and checking the SLM status.
 
 
 `cluster:admin/snapshot/*`:: Allows a user to take and delete snapshots of any
 `cluster:admin/snapshot/*`:: Allows a user to take and delete snapshots of any
-index, whether or not they have access to that index. 
+index, whether or not they have access to that index.
 
 
 For example, the following request configures an `slm-admin` role that grants the privileges
 For example, the following request configures an `slm-admin` role that grants the privileges
 necessary for administering SLM.
 necessary for administering SLM.
@@ -69,4 +68,4 @@ POST /_security/role/slm-read-only
 
 
 include::getting-started-slm.asciidoc[]
 include::getting-started-slm.asciidoc[]
 
 
-include::slm-retention.asciidoc[]
+include::slm-retention.asciidoc[]

+ 10 - 11
docs/reference/slm/index.asciidoc

@@ -3,33 +3,32 @@
 [[snapshot-lifecycle-management]]
 [[snapshot-lifecycle-management]]
 == Manage the snapshot lifecycle
 == Manage the snapshot lifecycle
 
 
-You can set up snapshot lifecycle policies to automate the timing, frequency, and retention of snapshots. 
-Snapshot policies can apply to multiple indices. 
+You can set up snapshot lifecycle policies to automate the timing, frequency, and retention of snapshots.
+Snapshot policies can apply to multiple indices.
 
 
 The snapshot lifecycle management (SLM) <<snapshot-lifecycle-management-api, CRUD APIs>> provide
 The snapshot lifecycle management (SLM) <<snapshot-lifecycle-management-api, CRUD APIs>> provide
-the building blocks for the snapshot policy features that are part of the Management application in {kib}. 
-The  Snapshot and Restore UI makes it easy to set up policies, register snapshot repositories, 
+the building blocks for the snapshot policy features that are part of the Management application in {kib}.
+The  Snapshot and Restore UI makes it easy to set up policies, register snapshot repositories,
 view and manage snapshots, and restore indices.
 view and manage snapshots, and restore indices.
 
 
 You can stop and restart SLM to temporarily pause automatic backups while performing
 You can stop and restart SLM to temporarily pause automatic backups while performing
 upgrades or other maintenance.
 upgrades or other maintenance.
-To disable SLM entirely, set `xpack.slm.enabled` to `false` in `elasticsearch.yml`.
 
 
 [float]
 [float]
 [[slm-and-security]]
 [[slm-and-security]]
 === Security and SLM
 === Security and SLM
 
 
-Two built-in cluster privileges control access to the SLM actions when 
+Two built-in cluster privileges control access to the SLM actions when
 {es} {security-features} are enabled:
 {es} {security-features} are enabled:
 
 
-`manage_slm`:: Allows a user to perform all SLM actions, including creating and updating policies 
-and starting and stopping SLM. 
+`manage_slm`:: Allows a user to perform all SLM actions, including creating and updating policies
+and starting and stopping SLM.
 
 
-`read_slm`:: Allows a user to perform all read-only SLM actions, 
+`read_slm`:: Allows a user to perform all read-only SLM actions,
 such as getting policies and checking the SLM status.
 such as getting policies and checking the SLM status.
 
 
 `cluster:admin/snapshot/*`:: Allows a user to take and delete snapshots of any
 `cluster:admin/snapshot/*`:: Allows a user to take and delete snapshots of any
-index, whether or not they have access to that index. 
+index, whether or not they have access to that index.
 
 
 For example, the following request configures an `slm-admin` role that grants the privileges
 For example, the following request configures an `slm-admin` role that grants the privileges
 necessary for administering SLM.
 necessary for administering SLM.
@@ -69,4 +68,4 @@ POST /_security/role/slm-read-only
 
 
 include::getting-started-slm.asciidoc[]
 include::getting-started-slm.asciidoc[]
 
 
-include::slm-retention.asciidoc[]
+include::slm-retention.asciidoc[]

+ 0 - 2
plugins/examples/security-authorization-engine/build.gradle

@@ -24,9 +24,7 @@ integTest {
 
 
 testClusters.integTest {
 testClusters.integTest {
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
 
 
   // This is important, so that all the modules are available too.
   // This is important, so that all the modules are available too.

+ 2 - 3
x-pack/plugin/ccr/qa/rest/build.gradle

@@ -5,9 +5,9 @@ apply plugin: 'elasticsearch.standalone-test'
 
 
 restResources {
 restResources {
   restApi {
   restApi {
-    includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'info' 
+    includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'info'
     includeXpack 'ccr'
     includeXpack 'ccr'
-  } 
+  }
 }
 }
 
 
 dependencies {
 dependencies {
@@ -26,7 +26,6 @@ testClusters.restTest {
   // that is thrown in production when indexing a document directly in a follower index.
   // that is thrown in production when indexing a document directly in a follower index.
   jvmArgs '-da:org.elasticsearch.xpack.ccr.index.engine.FollowingEngineAssertions'
   jvmArgs '-da:org.elasticsearch.xpack.ccr.index.engine.FollowingEngineAssertions'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   // TODO: reduce the need for superuser here
   // TODO: reduce the need for superuser here

+ 0 - 1
x-pack/plugin/ccr/qa/security/build.gradle

@@ -20,7 +20,6 @@ testClusters.'leader-cluster' {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
-  setting 'xpack.monitoring.enabled', 'false'
   extraConfigFile 'roles.yml', file('leader-roles.yml')
   extraConfigFile 'roles.yml', file('leader-roles.yml')
   user username: "test_admin", role: "superuser"
   user username: "test_admin", role: "superuser"
   user username: "test_ccr", role: "ccruser"
   user username: "test_ccr", role: "ccruser"

+ 0 - 1
x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/CcrIntegTestCase.java

@@ -227,7 +227,6 @@ public abstract class CcrIntegTestCase extends ESTestCase {
         builder.putList(DISCOVERY_SEED_PROVIDERS_SETTING.getKey(), "file");
         builder.putList(DISCOVERY_SEED_PROVIDERS_SETTING.getKey(), "file");
         builder.put(NetworkModule.TRANSPORT_TYPE_KEY, getTestTransportType());
         builder.put(NetworkModule.TRANSPORT_TYPE_KEY, getTestTransportType());
         builder.put(XPackSettings.SECURITY_ENABLED.getKey(), false);
         builder.put(XPackSettings.SECURITY_ENABLED.getKey(), false);
-        builder.put(XPackSettings.MONITORING_ENABLED.getKey(), false);
         builder.put(XPackSettings.WATCHER_ENABLED.getKey(), false);
         builder.put(XPackSettings.WATCHER_ENABLED.getKey(), false);
         builder.put(XPackSettings.MACHINE_LEARNING_ENABLED.getKey(), false);
         builder.put(XPackSettings.MACHINE_LEARNING_ENABLED.getKey(), false);
         builder.put(LicenseService.SELF_GENERATED_LICENSE_TYPE.getKey(), "trial");
         builder.put(LicenseService.SELF_GENERATED_LICENSE_TYPE.getKey(), "trial");

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

@@ -40,7 +40,8 @@ public class XPackSettings {
     /**
     /**
      * Setting for controlling whether or not enrich is enabled.
      * Setting for controlling whether or not enrich is enabled.
      */
      */
-    public static final Setting<Boolean> ENRICH_ENABLED_SETTING = Setting.boolSetting("xpack.enrich.enabled", true, Property.NodeScope);
+    public static final Setting<Boolean> ENRICH_ENABLED_SETTING = Setting.boolSetting("xpack.enrich.enabled", true,
+        Property.NodeScope, Property.Deprecated);
 
 
     /**
     /**
      * Setting for controlling whether or not CCR is enabled.
      * Setting for controlling whether or not CCR is enabled.
@@ -49,14 +50,14 @@ public class XPackSettings {
 
 
     /** Setting for enabling or disabling data frame. Defaults to true. */
     /** Setting for enabling or disabling data frame. Defaults to true. */
     public static final Setting<Boolean> TRANSFORM_ENABLED = Setting.boolSetting("xpack.transform.enabled", true,
     public static final Setting<Boolean> TRANSFORM_ENABLED = Setting.boolSetting("xpack.transform.enabled", true,
-            Setting.Property.NodeScope);
+        Property.NodeScope, Property.Deprecated);
 
 
     /** Setting for enabling or disabling security. Defaults to true. */
     /** Setting for enabling or disabling security. Defaults to true. */
     public static final Setting<Boolean> SECURITY_ENABLED = Setting.boolSetting("xpack.security.enabled", true, Setting.Property.NodeScope);
     public static final Setting<Boolean> SECURITY_ENABLED = Setting.boolSetting("xpack.security.enabled", true, Setting.Property.NodeScope);
 
 
     /** Setting for enabling or disabling monitoring. */
     /** Setting for enabling or disabling monitoring. */
     public static final Setting<Boolean> MONITORING_ENABLED = Setting.boolSetting("xpack.monitoring.enabled", true,
     public static final Setting<Boolean> MONITORING_ENABLED = Setting.boolSetting("xpack.monitoring.enabled", true,
-            Setting.Property.NodeScope);
+        Property.NodeScope, Property.Deprecated);
 
 
     /** Setting for enabling or disabling watcher. Defaults to true. */
     /** Setting for enabling or disabling watcher. Defaults to true. */
     public static final Setting<Boolean> WATCHER_ENABLED = Setting.boolSetting("xpack.watcher.enabled", true, Setting.Property.NodeScope);
     public static final Setting<Boolean> WATCHER_ENABLED = Setting.boolSetting("xpack.watcher.enabled", true, Setting.Property.NodeScope);
@@ -70,7 +71,7 @@ public class XPackSettings {
 
 
     /** Setting for enabling or disabling rollup. Defaults to true. */
     /** Setting for enabling or disabling rollup. Defaults to true. */
     public static final Setting<Boolean> ROLLUP_ENABLED = Setting.boolSetting("xpack.rollup.enabled", true,
     public static final Setting<Boolean> ROLLUP_ENABLED = Setting.boolSetting("xpack.rollup.enabled", true,
-            Setting.Property.NodeScope);
+        Property.NodeScope, Property.Deprecated);
 
 
     /** Setting for enabling or disabling auditing. Defaults to false. */
     /** Setting for enabling or disabling auditing. Defaults to false. */
     public static final Setting<Boolean> AUDIT_ENABLED = Setting.boolSetting("xpack.security.audit.enabled", false,
     public static final Setting<Boolean> AUDIT_ENABLED = Setting.boolSetting("xpack.security.audit.enabled", false,
@@ -88,13 +89,13 @@ public class XPackSettings {
      * Setting for enabling or disabling the index lifecycle extension. Defaults to true.
      * Setting for enabling or disabling the index lifecycle extension. Defaults to true.
      */
      */
     public static final Setting<Boolean> INDEX_LIFECYCLE_ENABLED = Setting.boolSetting("xpack.ilm.enabled", true,
     public static final Setting<Boolean> INDEX_LIFECYCLE_ENABLED = Setting.boolSetting("xpack.ilm.enabled", true,
-        Setting.Property.NodeScope);
+        Property.NodeScope, Property.Deprecated);
 
 
     /**
     /**
      * Setting for enabling or disabling the snapshot lifecycle extension. Defaults to true.
      * Setting for enabling or disabling the snapshot lifecycle extension. Defaults to true.
      */
      */
     public static final Setting<Boolean> SNAPSHOT_LIFECYCLE_ENABLED = Setting.boolSetting("xpack.slm.enabled", true,
     public static final Setting<Boolean> SNAPSHOT_LIFECYCLE_ENABLED = Setting.boolSetting("xpack.slm.enabled", true,
-        Setting.Property.NodeScope);
+        Property.NodeScope, Property.Deprecated);
 
 
     /** Setting for enabling or disabling TLS. Defaults to false. */
     /** Setting for enabling or disabling TLS. Defaults to false. */
     public static final Setting<Boolean> TRANSPORT_SSL_ENABLED = Setting.boolSetting("xpack.security.transport.ssl.enabled", false,
     public static final Setting<Boolean> TRANSPORT_SSL_ENABLED = Setting.boolSetting("xpack.security.transport.ssl.enabled", false,
@@ -121,14 +122,16 @@ public class XPackSettings {
         Setting.boolSetting("xpack.security.fips_mode.enabled", false, Property.NodeScope);
         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. */
-    public static final Setting<Boolean> SQL_ENABLED = Setting.boolSetting("xpack.sql.enabled", true, Setting.Property.NodeScope);
+    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. */
-    public static final Setting<Boolean> FLATTENED_ENABLED = Setting.boolSetting("xpack.flattened.enabled",
-        true, Setting.Property.NodeScope);
+    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. */
-    public static final Setting<Boolean> VECTORS_ENABLED = Setting.boolSetting("xpack.vectors.enabled", true, Setting.Property.NodeScope);
+    public static final Setting<Boolean> VECTORS_ENABLED = Setting.boolSetting("xpack.vectors.enabled", true,
+        Property.NodeScope, Property.Deprecated);
 
 
     /*
     /*
      * SSL settings. These are the settings that are specifically registered for SSL. Many are private as we do not explicitly use them
      * SSL settings. These are the settings that are specifically registered for SSL. Many are private as we do not explicitly use them

+ 16 - 2
x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/monitoring/collector/enrich/EnrichStatsCollectorTests.java

@@ -8,6 +8,7 @@ package org.elasticsearch.xpack.monitoring.collector.enrich;
 import org.elasticsearch.action.ActionFuture;
 import org.elasticsearch.action.ActionFuture;
 import org.elasticsearch.client.Client;
 import org.elasticsearch.client.Client;
 import org.elasticsearch.cluster.service.ClusterService;
 import org.elasticsearch.cluster.service.ClusterService;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
@@ -74,7 +75,8 @@ public class EnrichStatsCollectorTests extends BaseCollectorTestCase {
         // this is controls the blockage
         // this is controls the blockage
         final Settings settings = enrichDisabledSettings();
         final Settings settings = enrichDisabledSettings();
 
 
-        when(licenseState.isMonitoringAllowed()).thenReturn(randomBoolean());
+        boolean isMonitoringAllowed = randomBoolean();
+        when(licenseState.isMonitoringAllowed()).thenReturn(isMonitoringAllowed);
         when(licenseState.isEnrichAllowed()).thenReturn(randomBoolean());
         when(licenseState.isEnrichAllowed()).thenReturn(randomBoolean());
 
 
         final boolean isElectedMaster = randomBoolean();
         final boolean isElectedMaster = randomBoolean();
@@ -87,12 +89,18 @@ public class EnrichStatsCollectorTests extends BaseCollectorTestCase {
         if (isElectedMaster) {
         if (isElectedMaster) {
             verify(licenseState).isMonitoringAllowed();
             verify(licenseState).isMonitoringAllowed();
         }
         }
+        if (isElectedMaster && isMonitoringAllowed) {
+            // The enrich setting is only checked if the node is master and monitoring is allowed,
+            // so in other cases we won't have a deprecation warning.
+            assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.ENRICH_ENABLED_SETTING });
+        }
     }
     }
 
 
     public void testShouldCollectReturnsFalseIfEnrichIsNotAllowed() {
     public void testShouldCollectReturnsFalseIfEnrichIsNotAllowed() {
         final Settings settings = randomFrom(enrichEnabledSettings(), enrichDisabledSettings());
         final Settings settings = randomFrom(enrichEnabledSettings(), enrichDisabledSettings());
 
 
-        when(licenseState.isMonitoringAllowed()).thenReturn(randomBoolean());
+        boolean isMonitoringAllowed = randomBoolean();
+        when(licenseState.isMonitoringAllowed()).thenReturn(isMonitoringAllowed);
         // this is controls the blockage
         // this is controls the blockage
         when(licenseState.isEnrichAllowed()).thenReturn(false);
         when(licenseState.isEnrichAllowed()).thenReturn(false);
         final boolean isElectedMaster = randomBoolean();
         final boolean isElectedMaster = randomBoolean();
@@ -105,6 +113,9 @@ public class EnrichStatsCollectorTests extends BaseCollectorTestCase {
         if (isElectedMaster) {
         if (isElectedMaster) {
             verify(licenseState).isMonitoringAllowed();
             verify(licenseState).isMonitoringAllowed();
         }
         }
+        if (isElectedMaster && isMonitoringAllowed && settings.get(XPackSettings.ENRICH_ENABLED_SETTING.getKey()) != null) {
+            assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.ENRICH_ENABLED_SETTING });
+        }
     }
     }
 
 
     public void testShouldCollectReturnsTrue() {
     public void testShouldCollectReturnsTrue() {
@@ -119,6 +130,9 @@ public class EnrichStatsCollectorTests extends BaseCollectorTestCase {
         assertThat(collector.shouldCollect(isElectedMaster), is(true));
         assertThat(collector.shouldCollect(isElectedMaster), is(true));
 
 
         verify(licenseState).isMonitoringAllowed();
         verify(licenseState).isMonitoringAllowed();
+        if (settings.get(XPackSettings.ENRICH_ENABLED_SETTING.getKey()) != null) {
+            assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.ENRICH_ENABLED_SETTING });
+        }
     }
     }
 
 
     public void testDoCollect() throws Exception {
     public void testDoCollect() throws Exception {

+ 0 - 4
x-pack/plugin/ilm/qa/multi-cluster/build.gradle

@@ -23,11 +23,9 @@ task 'leader-cluster'(type: RestIntegTestTask) {
 testClusters.'leader-cluster' {
 testClusters.'leader-cluster' {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   setting 'path.repo', repoDir.absolutePath
   setting 'path.repo', repoDir.absolutePath
-  setting 'xpack.ilm.enabled', 'true'
   setting 'xpack.ccr.enabled', 'true'
   setting 'xpack.ccr.enabled', 'true'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'indices.lifecycle.poll_interval', '1000ms'
   setting 'indices.lifecycle.poll_interval', '1000ms'
@@ -50,11 +48,9 @@ task 'follow-cluster'(type: RestIntegTestTask) {
 testClusters.'follow-cluster' {
 testClusters.'follow-cluster' {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   setting 'path.repo', repoDir.absolutePath
   setting 'path.repo', repoDir.absolutePath
-  setting 'xpack.ilm.enabled', 'true'
   setting 'xpack.ccr.enabled', 'true'
   setting 'xpack.ccr.enabled', 'true'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'indices.lifecycle.poll_interval', '1000ms'
   setting 'indices.lifecycle.poll_interval', '1000ms'

+ 0 - 2
x-pack/plugin/ilm/qa/multi-node/build.gradle

@@ -23,10 +23,8 @@ testClusters.integTest {
   numberOfNodes = 4
   numberOfNodes = 4
 
 
   setting 'path.repo', repoDir.absolutePath
   setting 'path.repo', repoDir.absolutePath
-  setting 'xpack.ilm.enabled', 'true'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'indices.lifecycle.poll_interval', '1000ms'
   setting 'indices.lifecycle.poll_interval', '1000ms'

+ 0 - 2
x-pack/plugin/ilm/qa/rest/build.gradle

@@ -28,9 +28,7 @@ task restTest(type: RestIntegTestTask) {
 
 
 testClusters.restTest {
 testClusters.restTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
-  setting 'xpack.ilm.enabled', 'true'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   user clusterCredentials
   user clusterCredentials

+ 0 - 2
x-pack/plugin/ilm/qa/with-security/build.gradle

@@ -18,10 +18,8 @@ integTest {
 
 
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
-  setting 'xpack.ilm.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   extraConfigFile 'roles.yml', file('roles.yml')
   extraConfigFile 'roles.yml', file('roles.yml')

+ 3 - 0
x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/ilm/IndexLifecycleInfoTransportActionTests.java

@@ -14,10 +14,12 @@ import org.elasticsearch.cluster.ClusterState;
 import org.elasticsearch.cluster.metadata.IndexMetadata;
 import org.elasticsearch.cluster.metadata.IndexMetadata;
 import org.elasticsearch.cluster.metadata.Metadata;
 import org.elasticsearch.cluster.metadata.Metadata;
 import org.elasticsearch.cluster.service.ClusterService;
 import org.elasticsearch.cluster.service.ClusterService;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.license.XPackLicenseState;
 import org.elasticsearch.license.XPackLicenseState;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.transport.TransportService;
+import org.elasticsearch.xpack.core.XPackSettings;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.ilm.IndexLifecycleFeatureSetUsage;
 import org.elasticsearch.xpack.core.ilm.IndexLifecycleFeatureSetUsage;
 import org.elasticsearch.xpack.core.ilm.IndexLifecycleFeatureSetUsage.PolicyStats;
 import org.elasticsearch.xpack.core.ilm.IndexLifecycleFeatureSetUsage.PolicyStats;
@@ -74,6 +76,7 @@ public class IndexLifecycleInfoTransportActionTests extends ESTestCase {
         featureSet = new IndexLifecycleInfoTransportAction(
         featureSet = new IndexLifecycleInfoTransportAction(
             mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
             mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
         assertThat(featureSet.enabled(), equalTo(true));
         assertThat(featureSet.enabled(), equalTo(true));
+        assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.INDEX_LIFECYCLE_ENABLED } );
     }
     }
 
 
     public void testName() {
     public void testName() {

+ 0 - 1
x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/ilm/IndexLifecycleInitialisationTests.java

@@ -94,7 +94,6 @@ public class IndexLifecycleInitialisationTests extends ESIntegTestCase {
     @Override
     @Override
     protected Settings nodeSettings(int nodeOrdinal) {
     protected Settings nodeSettings(int nodeOrdinal) {
         Settings.Builder settings = Settings.builder().put(super.nodeSettings(nodeOrdinal));
         Settings.Builder settings = Settings.builder().put(super.nodeSettings(nodeOrdinal));
-        settings.put(XPackSettings.INDEX_LIFECYCLE_ENABLED.getKey(), true);
         settings.put(XPackSettings.MACHINE_LEARNING_ENABLED.getKey(), false);
         settings.put(XPackSettings.MACHINE_LEARNING_ENABLED.getKey(), false);
         settings.put(XPackSettings.SECURITY_ENABLED.getKey(), false);
         settings.put(XPackSettings.SECURITY_ENABLED.getKey(), false);
         settings.put(XPackSettings.WATCHER_ENABLED.getKey(), false);
         settings.put(XPackSettings.WATCHER_ENABLED.getKey(), false);

+ 0 - 2
x-pack/plugin/ml/qa/basic-multi-node/build.gradle

@@ -10,9 +10,7 @@ dependencies {
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   numberOfNodes = 3
   numberOfNodes = 3
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.ml.enabled', 'true'
   setting 'xpack.ml.enabled', 'true'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'

+ 0 - 1
x-pack/plugin/ml/qa/disabled/build.gradle

@@ -9,7 +9,6 @@ dependencies {
 
 
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
 }
 }

+ 0 - 2
x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle

@@ -42,8 +42,6 @@ testClusters.integTest {
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.ml.enabled', 'true'
   setting 'xpack.ml.enabled', 'true'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.ilm.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.security.authc.token.enabled', 'true'
   setting 'xpack.security.authc.token.enabled', 'true'
   setting 'xpack.security.transport.ssl.enabled', 'true'
   setting 'xpack.security.transport.ssl.enabled', 'true'
   setting 'xpack.security.transport.ssl.key', nodeKey.name
   setting 'xpack.security.transport.ssl.key', nodeKey.name

+ 11 - 0
x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeIntegTestCase.java

@@ -28,7 +28,13 @@ import org.elasticsearch.test.ESIntegTestCase;
 import org.elasticsearch.test.SecuritySettingsSourceField;
 import org.elasticsearch.test.SecuritySettingsSourceField;
 import org.elasticsearch.transport.Netty4Plugin;
 import org.elasticsearch.transport.Netty4Plugin;
 import org.elasticsearch.xpack.core.XPackSettings;
 import org.elasticsearch.xpack.core.XPackSettings;
+import org.elasticsearch.xpack.core.ilm.DeleteAction;
+import org.elasticsearch.xpack.core.ilm.IndexLifecycleMetadata;
+import org.elasticsearch.xpack.core.ilm.LifecycleAction;
 import org.elasticsearch.xpack.core.ilm.LifecycleSettings;
 import org.elasticsearch.xpack.core.ilm.LifecycleSettings;
+import org.elasticsearch.xpack.core.ilm.LifecycleType;
+import org.elasticsearch.xpack.core.ilm.RolloverAction;
+import org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType;
 import org.elasticsearch.xpack.core.ml.MachineLearningField;
 import org.elasticsearch.xpack.core.ml.MachineLearningField;
 import org.elasticsearch.xpack.core.ml.MlMetadata;
 import org.elasticsearch.xpack.core.ml.MlMetadata;
 import org.elasticsearch.xpack.core.ml.MlTasks;
 import org.elasticsearch.xpack.core.ml.MlTasks;
@@ -195,6 +201,11 @@ abstract class MlNativeIntegTestCase extends ESIntegTestCase {
             List<NamedWriteableRegistry.Entry> entries = new ArrayList<>(ClusterModule.getNamedWriteables());
             List<NamedWriteableRegistry.Entry> entries = new ArrayList<>(ClusterModule.getNamedWriteables());
             entries.addAll(new SearchModule(Settings.EMPTY, Collections.emptyList()).getNamedWriteables());
             entries.addAll(new SearchModule(Settings.EMPTY, Collections.emptyList()).getNamedWriteables());
             entries.add(new NamedWriteableRegistry.Entry(Metadata.Custom.class, "ml", MlMetadata::new));
             entries.add(new NamedWriteableRegistry.Entry(Metadata.Custom.class, "ml", MlMetadata::new));
+            entries.add(new NamedWriteableRegistry.Entry(Metadata.Custom.class, IndexLifecycleMetadata.TYPE, IndexLifecycleMetadata::new));
+            entries.add(new NamedWriteableRegistry.Entry(LifecycleType.class, TimeseriesLifecycleType.TYPE,
+                (in) -> TimeseriesLifecycleType.INSTANCE));
+            entries.add(new NamedWriteableRegistry.Entry(LifecycleAction.class, DeleteAction.NAME, DeleteAction::new));
+            entries.add(new NamedWriteableRegistry.Entry(LifecycleAction.class, RolloverAction.NAME, RolloverAction::new));
             entries.add(new NamedWriteableRegistry.Entry(PersistentTaskParams.class, MlTasks.DATAFEED_TASK_NAME,
             entries.add(new NamedWriteableRegistry.Entry(PersistentTaskParams.class, MlTasks.DATAFEED_TASK_NAME,
                     StartDatafeedAction.DatafeedParams::new));
                     StartDatafeedAction.DatafeedParams::new));
             entries.add(new NamedWriteableRegistry.Entry(PersistentTaskParams.class, MlTasks.DATA_FRAME_ANALYTICS_TASK_NAME,
             entries.add(new NamedWriteableRegistry.Entry(PersistentTaskParams.class, MlTasks.DATA_FRAME_ANALYTICS_TASK_NAME,

+ 0 - 1
x-pack/plugin/ml/qa/single-node-tests/build.gradle

@@ -9,7 +9,6 @@ dependencies {
 
 
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
 }
 }

+ 7 - 10
x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlIndexTemplateRegistryTests.java

@@ -20,6 +20,7 @@ import org.elasticsearch.cluster.node.DiscoveryNode;
 import org.elasticsearch.cluster.node.DiscoveryNodes;
 import org.elasticsearch.cluster.node.DiscoveryNodes;
 import org.elasticsearch.cluster.service.ClusterService;
 import org.elasticsearch.cluster.service.ClusterService;
 import org.elasticsearch.common.ParseField;
 import org.elasticsearch.common.ParseField;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.util.concurrent.EsExecutors;
 import org.elasticsearch.common.util.concurrent.EsExecutors;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
@@ -85,11 +86,7 @@ public class MlIndexTemplateRegistryTests extends ESTestCase {
 
 
     public void testStateTemplateWithIlm() {
     public void testStateTemplateWithIlm() {
         MlIndexTemplateRegistry registry =
         MlIndexTemplateRegistry registry =
-            new MlIndexTemplateRegistry(
-                Settings.builder()
-                    .put(XPackSettings.INDEX_LIFECYCLE_ENABLED.getKey(), true)
-                    .build(),
-                clusterService, threadPool, client, xContentRegistry);
+            new MlIndexTemplateRegistry(Settings.EMPTY, clusterService, threadPool, client, xContentRegistry);
 
 
         registry.clusterChanged(createClusterChangedEvent(nodes));
         registry.clusterChanged(createClusterChangedEvent(nodes));
 
 
@@ -121,15 +118,13 @@ public class MlIndexTemplateRegistryTests extends ESTestCase {
             .orElseThrow(() -> new AssertionError("expected the ml state index template to be put"));
             .orElseThrow(() -> new AssertionError("expected the ml state index template to be put"));
         assertThat(req.settings().get("index.lifecycle.name"), is(nullValue()));
         assertThat(req.settings().get("index.lifecycle.name"), is(nullValue()));
         assertThat(req.settings().get("index.lifecycle.rollover_alias"), is(nullValue()));
         assertThat(req.settings().get("index.lifecycle.rollover_alias"), is(nullValue()));
+
+        assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.INDEX_LIFECYCLE_ENABLED } );
     }
     }
 
 
     public void testStatsTemplateWithIlm() {
     public void testStatsTemplateWithIlm() {
         MlIndexTemplateRegistry registry =
         MlIndexTemplateRegistry registry =
-            new MlIndexTemplateRegistry(
-                Settings.builder()
-                    .put(XPackSettings.INDEX_LIFECYCLE_ENABLED.getKey(), true)
-                    .build(),
-                clusterService, threadPool, client, xContentRegistry);
+            new MlIndexTemplateRegistry(Settings.EMPTY, clusterService, threadPool, client, xContentRegistry);
 
 
         registry.clusterChanged(createClusterChangedEvent(nodes));
         registry.clusterChanged(createClusterChangedEvent(nodes));
 
 
@@ -161,6 +156,8 @@ public class MlIndexTemplateRegistryTests extends ESTestCase {
             .orElseThrow(() -> new AssertionError("expected the ml stats index template to be put"));
             .orElseThrow(() -> new AssertionError("expected the ml stats index template to be put"));
         assertThat(req.settings().get("index.lifecycle.name"), is(nullValue()));
         assertThat(req.settings().get("index.lifecycle.name"), is(nullValue()));
         assertThat(req.settings().get("index.lifecycle.rollover_alias"), is(nullValue()));
         assertThat(req.settings().get("index.lifecycle.rollover_alias"), is(nullValue()));
+
+        assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.INDEX_LIFECYCLE_ENABLED } );
     }
     }
 
 
     @SuppressWarnings("unchecked")
     @SuppressWarnings("unchecked")

+ 3 - 0
x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringInfoTransportActionTests.java

@@ -11,6 +11,7 @@ import org.elasticsearch.action.support.PlainActionFuture;
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.io.stream.BytesStreamOutput;
 import org.elasticsearch.common.io.stream.BytesStreamOutput;
 import org.elasticsearch.common.io.stream.StreamInput;
 import org.elasticsearch.common.io.stream.StreamInput;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentBuilder;
@@ -20,6 +21,7 @@ import org.elasticsearch.test.VersionUtils;
 import org.elasticsearch.test.rest.yaml.ObjectPath;
 import org.elasticsearch.test.rest.yaml.ObjectPath;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.xpack.core.XPackFeatureSet;
 import org.elasticsearch.xpack.core.XPackFeatureSet;
+import org.elasticsearch.xpack.core.XPackSettings;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.monitoring.MonitoringFeatureSetUsage;
 import org.elasticsearch.xpack.core.monitoring.MonitoringFeatureSetUsage;
 import org.elasticsearch.xpack.monitoring.exporter.Exporter;
 import org.elasticsearch.xpack.monitoring.exporter.Exporter;
@@ -59,6 +61,7 @@ public class MonitoringInfoTransportActionTests extends ESTestCase {
         MonitoringInfoTransportAction featureSet = new MonitoringInfoTransportAction(
         MonitoringInfoTransportAction featureSet = new MonitoringInfoTransportAction(
             mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
             mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
         assertThat(featureSet.enabled(), is(enabled));
         assertThat(featureSet.enabled(), is(enabled));
+        assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.MONITORING_ENABLED } );
     }
     }
 
 
     public void testEnabledDefault() {
     public void testEnabledDefault() {

+ 3 - 0
x-pack/plugin/rollup/src/test/java/org/elasticsearch/xpack/rollup/RollupInfoTransportActionTests.java

@@ -8,11 +8,13 @@ package org.elasticsearch.xpack.rollup;
 import org.elasticsearch.action.support.ActionFilters;
 import org.elasticsearch.action.support.ActionFilters;
 import org.elasticsearch.action.support.PlainActionFuture;
 import org.elasticsearch.action.support.PlainActionFuture;
 import org.elasticsearch.common.io.stream.BytesStreamOutput;
 import org.elasticsearch.common.io.stream.BytesStreamOutput;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.license.XPackLicenseState;
 import org.elasticsearch.license.XPackLicenseState;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.xpack.core.XPackFeatureSet;
 import org.elasticsearch.xpack.core.XPackFeatureSet;
+import org.elasticsearch.xpack.core.XPackSettings;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.rollup.RollupFeatureSetUsage;
 import org.elasticsearch.xpack.core.rollup.RollupFeatureSetUsage;
 import org.junit.Before;
 import org.junit.Before;
@@ -47,6 +49,7 @@ public class RollupInfoTransportActionTests extends ESTestCase {
         RollupInfoTransportAction featureSet = new RollupInfoTransportAction(
         RollupInfoTransportAction featureSet = new RollupInfoTransportAction(
             mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
             mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
         assertThat(featureSet.enabled(), is(enabled));
         assertThat(featureSet.enabled(), is(enabled));
+        assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.ROLLUP_ENABLED } );
     }
     }
 
 
     public void testEnabledDefault() {
     public void testEnabledDefault() {

+ 0 - 1
x-pack/plugin/security/qa/basic-enable-security/build.gradle

@@ -20,7 +20,6 @@ integTest {
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   numberOfNodes = 2
   numberOfNodes = 2
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'basic'
   setting 'xpack.license.self_generated.type', 'basic'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.security.enabled', 'false'

+ 0 - 1
x-pack/plugin/security/qa/security-basic/build.gradle

@@ -12,7 +12,6 @@ testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   numberOfNodes = 2
   numberOfNodes = 2
 
 
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'basic'
   setting 'xpack.license.self_generated.type', 'basic'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'

+ 2 - 3
x-pack/plugin/security/qa/security-disabled/build.gradle

@@ -1,11 +1,11 @@
 /*
 /*
  * This QA project tests the security plugin when security is explicitlt disabled.
  * This QA project tests the security plugin when security is explicitlt disabled.
- * It is intended to cover security functionality which is supposed to 
+ * It is intended to cover security functionality which is supposed to
  * function in a specific way even if security is disabled on the cluster
  * function in a specific way even if security is disabled on the cluster
  * For example: If a cluster has a pipeline with the set_security_user processor
  * For example: If a cluster has a pipeline with the set_security_user processor
  *              defined, it should be not fail
  *              defined, it should be not fail
  */
  */
- 
+
 apply plugin: 'elasticsearch.testclusters'
 apply plugin: 'elasticsearch.testclusters'
 apply plugin: 'elasticsearch.standalone-rest-test'
 apply plugin: 'elasticsearch.standalone-rest-test'
 apply plugin: 'elasticsearch.rest-test'
 apply plugin: 'elasticsearch.rest-test'
@@ -20,7 +20,6 @@ testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   numberOfNodes = 2
   numberOfNodes = 2
 
 
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   // We run with a trial license, but explicitly disable security.
   // We run with a trial license, but explicitly disable security.
   // This means the security plugin is loaded and all feature are permitted, but they are not enabled
   // This means the security plugin is loaded and all feature are permitted, but they are not enabled

+ 2 - 3
x-pack/plugin/security/qa/security-not-enabled/build.gradle

@@ -1,11 +1,11 @@
 /*
 /*
  * This QA project tests the security plugin when security is not enabled.
  * This QA project tests the security plugin when security is not enabled.
- * It is intended to cover security functionality which is supposed to 
+ * It is intended to cover security functionality which is supposed to
  * function in a specific way even if security is not enabled on the cluster
  * function in a specific way even if security is not enabled on the cluster
  * For example: If a cluster has a pipeline with the set_security_user processor
  * For example: If a cluster has a pipeline with the set_security_user processor
  *              defined, it should be not fail
  *              defined, it should be not fail
  */
  */
- 
+
 apply plugin: 'elasticsearch.testclusters'
 apply plugin: 'elasticsearch.testclusters'
 apply plugin: 'elasticsearch.standalone-rest-test'
 apply plugin: 'elasticsearch.standalone-rest-test'
 apply plugin: 'elasticsearch.rest-test'
 apply plugin: 'elasticsearch.rest-test'
@@ -20,7 +20,6 @@ testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   numberOfNodes = 2
   numberOfNodes = 2
 
 
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   // We run with a trial license, but do not enable security.
   // We run with a trial license, but do not enable security.
   // This means the security plugin is loaded and all feature are permitted, but they are not enabled
   // This means the security plugin is loaded and all feature are permitted, but they are not enabled

+ 0 - 1
x-pack/plugin/security/qa/security-trial/build.gradle

@@ -12,7 +12,6 @@ testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   numberOfNodes = 2
   numberOfNodes = 2
 
 
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'

+ 0 - 1
x-pack/plugin/security/qa/tls-basic/build.gradle

@@ -24,7 +24,6 @@ testClusters.integTest {
   extraConfigFile 'transport.crt', file('src/test/resources/ssl/transport.crt')
   extraConfigFile 'transport.crt', file('src/test/resources/ssl/transport.crt')
   extraConfigFile 'ca.crt', file('src/test/resources/ssl/ca.crt')
   extraConfigFile 'ca.crt', file('src/test/resources/ssl/ca.crt')
 
 
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'basic'
   setting 'xpack.license.self_generated.type', 'basic'
   setting 'xpack.security.http.ssl.enabled', 'true'
   setting 'xpack.security.http.ssl.enabled', 'true'

+ 0 - 1
x-pack/plugin/sql/qa/build.gradle

@@ -116,7 +116,6 @@ subprojects {
 
 
     testClusters.integTest {
     testClusters.integTest {
       testDistribution = 'DEFAULT'
       testDistribution = 'DEFAULT'
-      setting 'xpack.monitoring.enabled', 'false'
       setting 'xpack.ml.enabled', 'false'
       setting 'xpack.ml.enabled', 'false'
       setting 'xpack.watcher.enabled', 'false'
       setting 'xpack.watcher.enabled', 'false'
     }
     }

+ 10 - 2
x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/SqlInfoTransportActionTests.java

@@ -13,6 +13,7 @@ import org.elasticsearch.client.Client;
 import org.elasticsearch.cluster.ClusterName;
 import org.elasticsearch.cluster.ClusterName;
 import org.elasticsearch.cluster.node.DiscoveryNode;
 import org.elasticsearch.cluster.node.DiscoveryNode;
 import org.elasticsearch.cluster.service.ClusterService;
 import org.elasticsearch.cluster.service.ClusterService;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.common.xcontent.ObjectPath;
 import org.elasticsearch.common.xcontent.ObjectPath;
@@ -21,6 +22,7 @@ import org.elasticsearch.tasks.Task;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.threadpool.ThreadPool;
 import org.elasticsearch.threadpool.ThreadPool;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.transport.TransportService;
+import org.elasticsearch.xpack.core.XPackSettings;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.sql.SqlFeatureSetUsage;
 import org.elasticsearch.xpack.core.sql.SqlFeatureSetUsage;
 import org.elasticsearch.xpack.core.watcher.common.stats.Counters;
 import org.elasticsearch.xpack.core.watcher.common.stats.Counters;
@@ -66,16 +68,22 @@ public class SqlInfoTransportActionTests extends ESTestCase {
     public void testEnabled() {
     public void testEnabled() {
         boolean enabled = randomBoolean();
         boolean enabled = randomBoolean();
         Settings.Builder settings = Settings.builder();
         Settings.Builder settings = Settings.builder();
+        boolean isExplicitlySet = false;
         if (enabled) {
         if (enabled) {
             if (randomBoolean()) {
             if (randomBoolean()) {
                 settings.put("xpack.sql.enabled", enabled);
                 settings.put("xpack.sql.enabled", enabled);
+                isExplicitlySet = true;
             }
             }
         } else {
         } else {
             settings.put("xpack.sql.enabled", enabled);
             settings.put("xpack.sql.enabled", enabled);
+            isExplicitlySet = true;
         }
         }
         SqlInfoTransportAction featureSet = new SqlInfoTransportAction(
         SqlInfoTransportAction featureSet = new SqlInfoTransportAction(
             mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
             mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
         assertThat(featureSet.enabled(), is(enabled));
         assertThat(featureSet.enabled(), is(enabled));
+        if (isExplicitlySet) {
+            assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.SQL_ENABLED } );
+        }
     }
     }
 
 
     @SuppressWarnings("unchecked")
     @SuppressWarnings("unchecked")
@@ -114,11 +122,11 @@ public class SqlInfoTransportActionTests extends ESTestCase {
         PlainActionFuture<XPackUsageFeatureResponse> future = new PlainActionFuture<>();
         PlainActionFuture<XPackUsageFeatureResponse> future = new PlainActionFuture<>();
         usageAction.masterOperation(mock(Task.class), null, null, future);
         usageAction.masterOperation(mock(Task.class), null, null, future);
         SqlFeatureSetUsage sqlUsage = (SqlFeatureSetUsage) future.get().getUsage();
         SqlFeatureSetUsage sqlUsage = (SqlFeatureSetUsage) future.get().getUsage();
-        
+
         long fooBarBaz = ObjectPath.eval("foo.bar.baz", sqlUsage.stats());
         long fooBarBaz = ObjectPath.eval("foo.bar.baz", sqlUsage.stats());
         long fooFoo = ObjectPath.eval("foo.foo", sqlUsage.stats());
         long fooFoo = ObjectPath.eval("foo.foo", sqlUsage.stats());
         long spam = ObjectPath.eval("spam", sqlUsage.stats());
         long spam = ObjectPath.eval("spam", sqlUsage.stats());
-        
+
         assertThat(sqlUsage.stats().keySet(), containsInAnyOrder("foo", "spam"));
         assertThat(sqlUsage.stats().keySet(), containsInAnyOrder("foo", "spam"));
         assertThat(fooBarBaz, is(5L));
         assertThat(fooBarBaz, is(5L));
         assertThat(fooFoo, is(1L));
         assertThat(fooFoo, is(1L));

+ 3 - 0
x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlPluginTests.java

@@ -11,10 +11,12 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
 import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
 import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
 import org.elasticsearch.common.settings.ClusterSettings;
 import org.elasticsearch.common.settings.ClusterSettings;
 import org.elasticsearch.common.settings.IndexScopedSettings;
 import org.elasticsearch.common.settings.IndexScopedSettings;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.SettingsFilter;
 import org.elasticsearch.common.settings.SettingsFilter;
 import org.elasticsearch.rest.RestController;
 import org.elasticsearch.rest.RestController;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.ESTestCase;
+import org.elasticsearch.xpack.core.XPackSettings;
 import org.elasticsearch.xpack.sql.session.Cursors;
 import org.elasticsearch.xpack.sql.session.Cursors;
 
 
 import java.util.Collections;
 import java.util.Collections;
@@ -35,5 +37,6 @@ public class SqlPluginTests extends ESTestCase {
             new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS),
             new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS),
             IndexScopedSettings.DEFAULT_SCOPED_SETTINGS, new SettingsFilter(Collections.emptyList()),
             IndexScopedSettings.DEFAULT_SCOPED_SETTINGS, new SettingsFilter(Collections.emptyList()),
             mock(IndexNameExpressionResolver.class), () -> mock(DiscoveryNodes.class)), empty());
             mock(IndexNameExpressionResolver.class), () -> mock(DiscoveryNodes.class)), empty());
+        assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.SQL_ENABLED } );
     }
     }
 }
 }

+ 0 - 1
x-pack/plugin/transform/qa/multi-node-tests/build.gradle

@@ -29,7 +29,6 @@ testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.security.authc.token.enabled', 'true'
   setting 'xpack.security.authc.token.enabled', 'true'
   setting 'xpack.security.transport.ssl.enabled', 'true'
   setting 'xpack.security.transport.ssl.enabled', 'true'
   setting 'xpack.security.transport.ssl.key', nodeKey.name
   setting 'xpack.security.transport.ssl.key', nodeKey.name

+ 4 - 0
x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/TransformInfoTransportActionTests.java

@@ -11,6 +11,7 @@ import org.elasticsearch.action.support.ActionFilters;
 import org.elasticsearch.action.support.PlainActionFuture;
 import org.elasticsearch.action.support.PlainActionFuture;
 import org.elasticsearch.client.Client;
 import org.elasticsearch.client.Client;
 import org.elasticsearch.cluster.ClusterState;
 import org.elasticsearch.cluster.ClusterState;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.ToXContent;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentBuilder;
@@ -24,6 +25,7 @@ import org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.xpack.core.XPackFeatureSet;
 import org.elasticsearch.xpack.core.XPackFeatureSet;
+import org.elasticsearch.xpack.core.XPackSettings;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.transform.transforms.TransformIndexerStats;
 import org.elasticsearch.xpack.core.transform.transforms.TransformIndexerStats;
 import org.junit.Before;
 import org.junit.Before;
@@ -72,6 +74,7 @@ public class TransformInfoTransportActionTests extends ESTestCase {
             licenseState
             licenseState
         );
         );
         assertThat(featureSet.enabled(), is(enabled));
         assertThat(featureSet.enabled(), is(enabled));
+        assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.TRANSFORM_ENABLED } );
     }
     }
 
 
     public void testEnabledDefault() {
     public void testEnabledDefault() {
@@ -158,5 +161,6 @@ public class TransformInfoTransportActionTests extends ESTestCase {
             assertEquals(null, XContentMapValues.extractValue("transforms", usageAsMap));
             assertEquals(null, XContentMapValues.extractValue("transforms", usageAsMap));
             assertEquals(null, XContentMapValues.extractValue("stats", usageAsMap));
             assertEquals(null, XContentMapValues.extractValue("stats", usageAsMap));
         }
         }
+        assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.TRANSFORM_ENABLED } );
     }
     }
 }
 }

+ 5 - 0
x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/TransformTests.java

@@ -6,9 +6,11 @@
 
 
 package org.elasticsearch.xpack.transform;
 package org.elasticsearch.xpack.transform;
 
 
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.license.XPackLicenseState;
 import org.elasticsearch.license.XPackLicenseState;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.ESTestCase;
+import org.elasticsearch.xpack.core.XPackSettings;
 
 
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.equalTo;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.mock;
@@ -36,6 +38,9 @@ public class TransformTests extends ESTestCase {
             transformPluginEnabled && transformEnabled,
             transformPluginEnabled && transformEnabled,
             Boolean.parseBoolean(transform.additionalSettings().get("node.attr.transform.node"))
             Boolean.parseBoolean(transform.additionalSettings().get("node.attr.transform.node"))
         );
         );
+        if (transformPluginEnabled == false) {
+            assertSettingDeprecationsAndWarnings(new Setting<?>[]{XPackSettings.TRANSFORM_ENABLED});
+        }
     }
     }
 
 
     public void testNodeAttributesDirectlyGiven() {
     public void testNodeAttributesDirectlyGiven() {

+ 8 - 0
x-pack/plugin/vectors/src/test/java/org/elasticsearch/xpack/vectors/VectorsInfoTransportActionTests.java

@@ -8,11 +8,13 @@ package org.elasticsearch.xpack.vectors;
 import org.elasticsearch.action.support.ActionFilters;
 import org.elasticsearch.action.support.ActionFilters;
 import org.elasticsearch.action.support.PlainActionFuture;
 import org.elasticsearch.action.support.PlainActionFuture;
 import org.elasticsearch.common.io.stream.BytesStreamOutput;
 import org.elasticsearch.common.io.stream.BytesStreamOutput;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.license.XPackLicenseState;
 import org.elasticsearch.license.XPackLicenseState;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.test.ESTestCase;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.xpack.core.XPackFeatureSet;
 import org.elasticsearch.xpack.core.XPackFeatureSet;
+import org.elasticsearch.xpack.core.XPackSettings;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
 import org.elasticsearch.xpack.core.vectors.VectorsFeatureSetUsage;
 import org.elasticsearch.xpack.core.vectors.VectorsFeatureSetUsage;
 import org.junit.Before;
 import org.junit.Before;
@@ -52,13 +54,16 @@ public class VectorsInfoTransportActionTests extends ESTestCase {
 
 
     public void testEnabled() throws Exception {
     public void testEnabled() throws Exception {
         boolean enabled = randomBoolean();
         boolean enabled = randomBoolean();
+        boolean isExplicitlySet = false;
         Settings.Builder settings = Settings.builder();
         Settings.Builder settings = Settings.builder();
         if (enabled) {
         if (enabled) {
             if (randomBoolean()) {
             if (randomBoolean()) {
                 settings.put("xpack.vectors.enabled", enabled);
                 settings.put("xpack.vectors.enabled", enabled);
+                isExplicitlySet = true;
             }
             }
         } else {
         } else {
             settings.put("xpack.vectors.enabled", enabled);
             settings.put("xpack.vectors.enabled", enabled);
+            isExplicitlySet = true;
         }
         }
         VectorsInfoTransportAction featureSet = new VectorsInfoTransportAction(
         VectorsInfoTransportAction featureSet = new VectorsInfoTransportAction(
 mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
 mock(TransportService.class), mock(ActionFilters.class), settings.build(), licenseState);
@@ -75,6 +80,9 @@ mock(TransportService.class), mock(ActionFilters.class), settings.build(), licen
         usage.writeTo(out);
         usage.writeTo(out);
         XPackFeatureSet.Usage serializedUsage = new VectorsFeatureSetUsage(out.bytes().streamInput());
         XPackFeatureSet.Usage serializedUsage = new VectorsFeatureSetUsage(out.bytes().streamInput());
         assertThat(serializedUsage.enabled(), is(enabled));
         assertThat(serializedUsage.enabled(), is(enabled));
+        if (isExplicitlySet) {
+            assertSettingDeprecationsAndWarnings(new Setting<?>[] { XPackSettings.VECTORS_ENABLED} );
+        }
     }
     }
 
 
 }
 }

+ 1 - 4
x-pack/plugin/watcher/qa/rest/build.gradle

@@ -22,7 +22,7 @@ artifacts {
 
 
 restResources {
 restResources {
   restApi {
   restApi {
-    includeCore '_common', 'cluster', 'nodes', 'search', 'get', 'indices', 
+    includeCore '_common', 'cluster', 'nodes', 'search', 'get', 'indices',
                 'index', 'put_script', 'ingest', 'count'
                 'index', 'put_script', 'ingest', 'count'
     includeXpack 'watcher', 'xpack'
     includeXpack 'watcher', 'xpack'
   }
   }
@@ -30,10 +30,7 @@ restResources {
 
 
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
-  setting 'xpack.slm.enabled', 'false'
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
   setting 'xpack.security.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'logger.org.elasticsearch.xpack.watcher', 'DEBUG'
   setting 'logger.org.elasticsearch.xpack.watcher', 'DEBUG'

+ 0 - 6
x-pack/plugin/watcher/qa/rest/src/test/resources/rest-api-spec/test/painless/50_update_scripts.yml

@@ -2,9 +2,6 @@
 # See https://github.com/elastic/x-plugins/issues/4237
 # See https://github.com/elastic/x-plugins/issues/4237
 ---
 ---
 "Test transform scripts are updated on execution":
 "Test transform scripts are updated on execution":
-  - skip:
-      features: warnings
-
   - do:
   - do:
       cluster.health:
       cluster.health:
         wait_for_status: yellow
         wait_for_status: yellow
@@ -77,9 +74,6 @@
 
 
 ---
 ---
 "Test condition scripts are updated on execution":
 "Test condition scripts are updated on execution":
-  - skip:
-      features: warnings
-
   - do:
   - do:
       cluster.health:
       cluster.health:
         wait_for_status: yellow
         wait_for_status: yellow

+ 0 - 3
x-pack/plugin/watcher/qa/with-monitoring/build.gradle

@@ -8,9 +8,6 @@ dependencies {
 
 
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
-  setting 'xpack.slm.enabled', 'false'
-  setting 'xpack.ilm.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'true'
   setting 'xpack.monitoring.collection.enabled', 'true'
   setting 'xpack.monitoring.collection.enabled', 'true'
   setting 'xpack.monitoring.collection.interval', '1s'
   setting 'xpack.monitoring.collection.interval', '1s'
   setting 'xpack.watcher.enabled', 'true'
   setting 'xpack.watcher.enabled', 'true'

+ 0 - 2
x-pack/plugin/watcher/qa/with-security/build.gradle

@@ -19,8 +19,6 @@ restResources {
 
 
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
-  setting 'xpack.ilm.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   // settings to test settings filtering on
   // settings to test settings filtering on

+ 3 - 0
x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java

@@ -24,6 +24,7 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
 import org.elasticsearch.cluster.service.ClusterService;
 import org.elasticsearch.cluster.service.ClusterService;
 import org.elasticsearch.common.ParseField;
 import org.elasticsearch.common.ParseField;
 import org.elasticsearch.common.collect.ImmutableOpenMap;
 import org.elasticsearch.common.collect.ImmutableOpenMap;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.util.concurrent.EsExecutors;
 import org.elasticsearch.common.util.concurrent.EsExecutors;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
 import org.elasticsearch.common.util.concurrent.ThreadContext;
@@ -155,6 +156,7 @@ public class WatcherIndexTemplateRegistryTests extends ESTestCase {
         verify(client.admin().indices(), times(5)).putTemplate(captor.capture(), anyObject());
         verify(client.admin().indices(), times(5)).putTemplate(captor.capture(), anyObject());
         captor.getAllValues().forEach(req -> assertNull(req.settings().get("index.lifecycle.name")));
         captor.getAllValues().forEach(req -> assertNull(req.settings().get("index.lifecycle.name")));
         verify(client, times(0)).execute(eq(PutLifecycleAction.INSTANCE), anyObject(), anyObject());
         verify(client, times(0)).execute(eq(PutLifecycleAction.INSTANCE), anyObject(), anyObject());
+        assertSettingDeprecationsAndWarnings(new Setting[]{XPackSettings.INDEX_LIFECYCLE_ENABLED});
     }
     }
 
 
     public void testThatNonExistingPoliciesAreAddedImmediately() {
     public void testThatNonExistingPoliciesAreAddedImmediately() {
@@ -192,6 +194,7 @@ public class WatcherIndexTemplateRegistryTests extends ESTestCase {
         ClusterChangedEvent event = createClusterChangedEvent(Settings.EMPTY, Collections.emptyMap(), Collections.emptyMap(), nodes);
         ClusterChangedEvent event = createClusterChangedEvent(Settings.EMPTY, Collections.emptyMap(), Collections.emptyMap(), nodes);
         registry.clusterChanged(event);
         registry.clusterChanged(event);
         verify(client, times(0)).execute(eq(PutLifecycleAction.INSTANCE), anyObject(), anyObject());
         verify(client, times(0)).execute(eq(PutLifecycleAction.INSTANCE), anyObject(), anyObject());
+        assertSettingDeprecationsAndWarnings(new Setting<?>[]{XPackSettings.INDEX_LIFECYCLE_ENABLED});
     }
     }
 
 
     public void testPolicyAlreadyExistsButDiffers() throws IOException {
     public void testPolicyAlreadyExistsButDiffers() throws IOException {

+ 0 - 2
x-pack/qa/core-rest-tests-with-security/build.gradle

@@ -27,10 +27,8 @@ integTest {
 
 
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
 
 

+ 0 - 3
x-pack/qa/multi-cluster-search-security/build.gradle

@@ -24,10 +24,8 @@ testClusters.'remote-cluster' {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   numberOfNodes = 2
   numberOfNodes = 2
   setting 'node.remote_cluster_client', "false"
   setting 'node.remote_cluster_client', "false"
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
 
 
@@ -46,7 +44,6 @@ testClusters.'mixed-cluster' {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'cluster.remote.my_remote_cluster.seeds', {
   setting 'cluster.remote.my_remote_cluster.seeds', {

+ 0 - 3
x-pack/qa/multi-cluster-tests-with-security/build.gradle

@@ -25,10 +25,8 @@ testClusters.'remote-cluster' {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   numberOfNodes = 2
   numberOfNodes = 2
   setting 'node.remote_cluster_client', "false"
   setting 'node.remote_cluster_client', "false"
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
 
 
   user username: "test_user", password: "x-pack-test-password"
   user username: "test_user", password: "x-pack-test-password"
@@ -46,7 +44,6 @@ testClusters.'mixed-cluster' {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'cluster.remote.my_remote_cluster.seeds', {
   setting 'cluster.remote.my_remote_cluster.seeds', {
     testClusters.'remote-cluster'.getAllTransportPortURI().collect { "\"$it\"" }.toString()
     testClusters.'remote-cluster'.getAllTransportPortURI().collect { "\"$it\"" }.toString()

+ 0 - 2
x-pack/qa/multi-node/build.gradle

@@ -9,10 +9,8 @@ dependencies {
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   numberOfNodes = 2
   numberOfNodes = 2
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   extraConfigFile 'roles.yml', file('roles.yml')
   extraConfigFile 'roles.yml', file('roles.yml')

+ 0 - 1
x-pack/qa/reindex-tests-with-security/build.gradle

@@ -27,7 +27,6 @@ testClusters.integTest {
   extraConfigFile 'http.crt', file('src/test/resources/ssl/http.crt')
   extraConfigFile 'http.crt', file('src/test/resources/ssl/http.crt')
   extraConfigFile 'ca.p12', caFile
   extraConfigFile 'ca.p12', caFile
   setting 'reindex.remote.whitelist', '127.0.0.1:*'
   setting 'reindex.remote.whitelist', '127.0.0.1:*'
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'

+ 0 - 1
x-pack/qa/rolling-upgrade-basic/build.gradle

@@ -20,7 +20,6 @@ for (Version bwcVersion : bwcVersions.wireCompatible) {
 
 
       setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
       setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
       setting 'xpack.security.enabled', 'false'
       setting 'xpack.security.enabled', 'false'
-      setting 'xpack.monitoring.enabled', 'false'
       setting 'xpack.ml.enabled', 'false'
       setting 'xpack.ml.enabled', 'false'
       setting 'xpack.watcher.enabled', 'false'
       setting 'xpack.watcher.enabled', 'false'
       setting 'xpack.license.self_generated.type', 'basic'
       setting 'xpack.license.self_generated.type', 'basic'

+ 0 - 1
x-pack/qa/rolling-upgrade-multi-cluster/build.gradle

@@ -26,7 +26,6 @@ for (Version bwcVersion : bwcVersions.wireCompatible) {
 
 
     setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
     setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
     setting 'xpack.security.enabled', 'false'
     setting 'xpack.security.enabled', 'false'
-    setting 'xpack.monitoring.enabled', 'false'
     setting 'xpack.ml.enabled', 'false'
     setting 'xpack.ml.enabled', 'false'
     setting 'xpack.watcher.enabled', 'false'
     setting 'xpack.watcher.enabled', 'false'
     setting 'xpack.license.self_generated.type', 'trial'
     setting 'xpack.license.self_generated.type', 'trial'

+ 0 - 2
x-pack/qa/security-example-spi-extension/build.gradle

@@ -30,9 +30,7 @@ testClusters.integTest {
   setting 'xpack.security.authc.realms.native.native.order', '2'
   setting 'xpack.security.authc.realms.native.native.order', '2'
   setting 'xpack.security.authc.realms.custom_role_mapping.role_map.order', '3'
   setting 'xpack.security.authc.realms.custom_role_mapping.role_map.order', '3'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
 
 
   user username: "test_user", password: "x-pack-test-password"
   user username: "test_user", password: "x-pack-test-password"

+ 0 - 1
x-pack/qa/smoke-test-plugins-ssl/build.gradle

@@ -55,7 +55,6 @@ testClusters.integTest {
   setting 'xpack.security.http.ssl.certificate_authorities', 'testnode.crt'
   setting 'xpack.security.http.ssl.certificate_authorities', 'testnode.crt'
   keystore 'xpack.security.http.ssl.secure_key_passphrase', 'testnode'
   keystore 'xpack.security.http.ssl.secure_key_passphrase', 'testnode'
 
 
-  setting 'xpack.ilm.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
   // copy keystores, keys and certificates into config/
   // copy keystores, keys and certificates into config/
   extraConfigFile nodeKeystore.name, nodeKeystore
   extraConfigFile nodeKeystore.name, nodeKeystore

+ 0 - 1
x-pack/qa/smoke-test-security-with-mustache/build.gradle

@@ -15,7 +15,6 @@ restResources {
 testClusters.integTest {
 testClusters.integTest {
   testDistribution = 'DEFAULT'
   testDistribution = 'DEFAULT'
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.watcher.enabled', 'false'
-  setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.license.self_generated.type', 'trial'
   user username: "test_admin", password: "x-pack-test-password"
   user username: "test_admin", password: "x-pack-test-password"

+ 0 - 1
x-pack/qa/third-party/jira/build.gradle

@@ -43,7 +43,6 @@ if (!jiraUrl && !jiraUser && !jiraPassword && !jiraProject) {
   testClusters.integTest {
   testClusters.integTest {
     testDistribution = 'DEFAULT'
     testDistribution = 'DEFAULT'
     setting 'xpack.security.enabled', 'false'
     setting 'xpack.security.enabled', 'false'
-    setting 'xpack.monitoring.enabled', 'false'
     setting 'xpack.ml.enabled', 'false'
     setting 'xpack.ml.enabled', 'false'
     setting 'xpack.license.self_generated.type', 'trial'
     setting 'xpack.license.self_generated.type', 'trial'
     setting 'logger.org.elasticsearch.xpack.watcher', 'DEBUG'
     setting 'logger.org.elasticsearch.xpack.watcher', 'DEBUG'

+ 0 - 1
x-pack/qa/third-party/pagerduty/build.gradle

@@ -22,7 +22,6 @@ if (!pagerDutyServiceKey) {
   testClusters.integTest {
   testClusters.integTest {
     testDistribution = 'DEFAULT'
     testDistribution = 'DEFAULT'
     setting 'xpack.security.enabled', 'false'
     setting 'xpack.security.enabled', 'false'
-    setting 'xpack.monitoring.enabled', 'false'
     setting 'xpack.ml.enabled', 'false'
     setting 'xpack.ml.enabled', 'false'
     setting 'xpack.license.self_generated.type', 'trial'
     setting 'xpack.license.self_generated.type', 'trial'
     setting 'logger.org.elasticsearch.xpack.watcher', 'DEBUG'
     setting 'logger.org.elasticsearch.xpack.watcher', 'DEBUG'

+ 0 - 1
x-pack/qa/third-party/slack/build.gradle

@@ -22,7 +22,6 @@ if (!slackUrl) {
   testClusters.integTest {
   testClusters.integTest {
     testDistribution = 'DEFAULT'
     testDistribution = 'DEFAULT'
     setting 'xpack.security.enabled', 'false'
     setting 'xpack.security.enabled', 'false'
-    setting 'xpack.monitoring.enabled', 'false'
     setting 'xpack.ml.enabled', 'false'
     setting 'xpack.ml.enabled', 'false'
     setting 'xpack.license.self_generated.type', 'trial'
     setting 'xpack.license.self_generated.type', 'trial'
     setting 'logger.org.elasticsearch.xpack.watcher', 'DEBUG'
     setting 'logger.org.elasticsearch.xpack.watcher', 'DEBUG'