From ee00f4d1f7126ec90bc4c92dbbc7fc8ec09647c8 Mon Sep 17 00:00:00 2001 From: James Baiera Date: Mon, 13 Sep 2021 15:27:17 -0400 Subject: [PATCH 1/7] Deprecate the Monitoring ingest settings --- docs/reference/migration/index.asciidoc | 2 + .../reference/migration/migrate_7_16.asciidoc | 64 +++++++++++++++++++ .../xpack/monitoring/exporter/Exporter.java | 2 +- .../exporter/http/HttpExporter.java | 3 +- 4 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 docs/reference/migration/migrate_7_16.asciidoc diff --git a/docs/reference/migration/index.asciidoc b/docs/reference/migration/index.asciidoc index c053aa0c059a8..d415606fd123e 100644 --- a/docs/reference/migration/index.asciidoc +++ b/docs/reference/migration/index.asciidoc @@ -28,6 +28,7 @@ For more information about {minor-version}, see the <> and <>. For information about how to upgrade your cluster, see <>. +* <> * <> * <> * <> @@ -46,6 +47,7 @@ For information about how to upgrade your cluster, see <>. -- +include::migrate_7_16.asciidoc[] include::migrate_7_14.asciidoc[] include::migrate_7_13.asciidoc[] include::migrate_7_12.asciidoc[] diff --git a/docs/reference/migration/migrate_7_16.asciidoc b/docs/reference/migration/migrate_7_16.asciidoc new file mode 100644 index 0000000000000..6f0f1f5444296 --- /dev/null +++ b/docs/reference/migration/migrate_7_16.asciidoc @@ -0,0 +1,64 @@ +[[migrating-7.16]] +== Migrating to 7.16 +++++ +7.16 +++++ + +This section discusses the changes that you need to be aware of when migrating +your application to {es} 7.16. + +See also <> and <>. + +* <> + +//NOTE: The notable-breaking-changes tagged regions are re-used in the +//Installation and Upgrade Guide + +[discrete] +[[deprecated-7.16]] +=== Deprecations + +The following functionality has been deprecated in {es} 7.16 and will be removed +in 8.0. While this won't have an immediate impact on your applications, we +strongly encourage you take the described steps to update your code after +upgrading to 7.16. + +NOTE: Significant changes in behavior are deprecated in a minor release and the +old behavior is supported until the next major release. To find out if you are +using any deprecated functionality, enable <>. + +// tag::notable-breaking-changes[] + +[discrete] +[[breaking_716_monitoring_changes]] +==== Monitoring deprecations + +[[monitoring-ingest-settings-deprecation]] +.The `use_ingest` setting on Monitoring exporter configurations is deprecated. +[%collapsible] +==== +*Details* + +The `xpack.monitoring.exporters.*.use_ingest` property has been deprecated in 7.16.0 and +will be removed in 8.0.0. This parameter controls the creation of pipelines for monitoring +indices that currently have no function. + +*Impact* + +Discontinue the use of the `xpack.monitoring.exporters.*.use_ingest` setting. +==== + +[[monitoring-ingest-settings-deprecation]] +.The `index.pipeline.master_timeout` setting on Monitoring HTTP exporter configurations is deprecated. +[%collapsible] +==== +*Details* + +The `xpack.monitoring.exporters.*.index.pipeline.master_timeout` property has been +deprecated in 7.16.0. This parameter sets the timeout when waiting for the remote +Monitoring cluster to create pipelines. These pipelines for monitoring indices currently +have no function and will be removed in 8.0.0. + +*Impact* + +Discontinue the use of the `xpack.monitoring.exporters.*.index.pipeline.master_timeout` setting. +==== + +// end::notable-breaking-changes[] diff --git a/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporter.java b/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporter.java index af8fa91fd08a9..4f9385c1e6da3 100644 --- a/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporter.java +++ b/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporter.java @@ -89,7 +89,7 @@ public Iterator> settings() { */ public static final Setting.AffixSetting USE_INGEST_PIPELINE_SETTING = Setting.affixKeySetting("xpack.monitoring.exporters.","use_ingest", - key -> Setting.boolSetting(key, true, Property.Dynamic, Property.NodeScope), TYPE_DEPENDENCY); + key -> Setting.boolSetting(key, true, Property.Dynamic, Property.NodeScope, Property.Deprecated), TYPE_DEPENDENCY); /** * Every {@code Exporter} allows users to explicitly disable cluster alerts. */ diff --git a/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java b/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java index 951cbd4b58315..13f5bfdd3707d 100644 --- a/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java +++ b/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java @@ -389,7 +389,8 @@ public Iterator> settings() { */ public static final Setting.AffixSetting PIPELINE_CHECK_TIMEOUT_SETTING = Setting.affixKeySetting("xpack.monitoring.exporters.","index.pipeline.master_timeout", - (key) -> Setting.timeSetting(key, TimeValue.MINUS_ONE, Property.Dynamic, Property.NodeScope), HTTP_TYPE_DEPENDENCY); + (key) -> Setting.timeSetting(key, TimeValue.MINUS_ONE, Property.Dynamic, Property.NodeScope, Property.Deprecated), + HTTP_TYPE_DEPENDENCY); /** * Minimum supported version of the remote monitoring cluster (same major). From 072476e4fec4b84a4a06e46adf65248a5853edf1 Mon Sep 17 00:00:00 2001 From: James Baiera Date: Mon, 13 Sep 2021 16:32:27 -0400 Subject: [PATCH 2/7] Fix colliding block ids on documentation --- docs/reference/migration/migrate_7_16.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/migration/migrate_7_16.asciidoc b/docs/reference/migration/migrate_7_16.asciidoc index 6f0f1f5444296..0a8fa8e6b18ee 100644 --- a/docs/reference/migration/migrate_7_16.asciidoc +++ b/docs/reference/migration/migrate_7_16.asciidoc @@ -34,7 +34,7 @@ logging>>. [[breaking_716_monitoring_changes]] ==== Monitoring deprecations -[[monitoring-ingest-settings-deprecation]] +[[monitoring-use-ingest-setting-deprecation]] .The `use_ingest` setting on Monitoring exporter configurations is deprecated. [%collapsible] ==== @@ -47,7 +47,7 @@ indices that currently have no function. Discontinue the use of the `xpack.monitoring.exporters.*.use_ingest` setting. ==== -[[monitoring-ingest-settings-deprecation]] +[[monitoring-pipeline-master-timeout-setting-deprecation]] .The `index.pipeline.master_timeout` setting on Monitoring HTTP exporter configurations is deprecated. [%collapsible] ==== From c5f9e7596c6977fc16abf641c479392739ca5b55 Mon Sep 17 00:00:00 2001 From: James Baiera Date: Mon, 13 Sep 2021 16:55:57 -0400 Subject: [PATCH 3/7] Add assertWarnings --- .../xpack/monitoring/exporter/ExportersTests.java | 2 ++ .../xpack/monitoring/exporter/http/HttpExporterTests.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java index 5767939861e8b..56f805ed614c8 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java @@ -265,6 +265,8 @@ InitializedExporters initExporters(Settings settings) { assertEquals(settings.get("xpack.monitoring.exporters._name0.use_ingest"), "true"); assertEquals(settings.get("xpack.monitoring.exporters._name1.type"), "http"); assertEquals(settings.get("xpack.monitoring.exporters._name1.use_ingest"), "false"); + assertWarnings("[xpack.monitoring.exporters._http.use_ingest] setting was deprecated in Elasticsearch and will be removed " + + "in a future release! See the breaking changes documentation for the next major version."); } public void testExporterBlocksOnClusterState() { diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java index 91f74eecb3e73..162636d6369e5 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java @@ -490,6 +490,8 @@ public void testCreateResources() { assertThat(uniqueOwners, hasSize(1)); assertThat(uniqueOwners.get(0), equalTo("xpack.monitoring.exporters._http")); + assertWarnings("[xpack.monitoring.exporters._http.use_ingest] setting was deprecated in Elasticsearch and will be removed " + + "in a future release! See the breaking changes documentation for the next major version."); } public void testCreateDefaultParams() { @@ -526,6 +528,8 @@ public void testCreateDefaultParams() { // should have removed everything assertThat(parameters.size(), equalTo(0)); + assertWarnings("[xpack.monitoring.exporters._http.use_ingest] setting was deprecated in Elasticsearch and will be removed " + + "in a future release! See the breaking changes documentation for the next major version."); } public void testHttpExporterMigrationInProgressBlock() throws Exception { From 1d7d19b96bbfbc555b0c0d04089f9cc716f2706e Mon Sep 17 00:00:00 2001 From: James Baiera Date: Mon, 13 Sep 2021 17:07:17 -0400 Subject: [PATCH 4/7] Update broken docs link --- docs/reference/migration/index.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/migration/index.asciidoc b/docs/reference/migration/index.asciidoc index d415606fd123e..6883b1e9fb70d 100644 --- a/docs/reference/migration/index.asciidoc +++ b/docs/reference/migration/index.asciidoc @@ -28,7 +28,7 @@ For more information about {minor-version}, see the <> and <>. For information about how to upgrade your cluster, see <>. -* <> +* <> * <> * <> * <> From f742a15a948d3074813b86e915dcbe8ffec5c703 Mon Sep 17 00:00:00 2001 From: James Baiera Date: Tue, 14 Sep 2021 11:06:45 -0400 Subject: [PATCH 5/7] Correctly fix tests this time --- .../xpack/monitoring/exporter/ExportersTests.java | 4 +++- .../exporter/http/HttpExporterTests.java | 14 ++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java index 56f805ed614c8..f2d4600819487 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java @@ -265,7 +265,9 @@ InitializedExporters initExporters(Settings settings) { assertEquals(settings.get("xpack.monitoring.exporters._name0.use_ingest"), "true"); assertEquals(settings.get("xpack.monitoring.exporters._name1.type"), "http"); assertEquals(settings.get("xpack.monitoring.exporters._name1.use_ingest"), "false"); - assertWarnings("[xpack.monitoring.exporters._http.use_ingest] setting was deprecated in Elasticsearch and will be removed " + + assertWarnings("[xpack.monitoring.exporters.name0.use_ingest] setting was deprecated in Elasticsearch and will be removed " + + "in a future release! See the breaking changes documentation for the next major version."); + assertWarnings("[xpack.monitoring.exporters.name1.use_ingest] setting was deprecated in Elasticsearch and will be removed " + "in a future release! See the breaking changes documentation for the next major version."); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java index 162636d6369e5..14716cee64ce3 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java @@ -490,8 +490,11 @@ public void testCreateResources() { assertThat(uniqueOwners, hasSize(1)); assertThat(uniqueOwners.get(0), equalTo("xpack.monitoring.exporters._http")); - assertWarnings("[xpack.monitoring.exporters._http.use_ingest] setting was deprecated in Elasticsearch and will be removed " + - "in a future release! See the breaking changes documentation for the next major version."); + + if (useIngest == false) { + assertWarnings("[xpack.monitoring.exporters._http.use_ingest] setting was deprecated in Elasticsearch and will be removed " + + "in a future release! See the breaking changes documentation for the next major version."); + } } public void testCreateDefaultParams() { @@ -528,8 +531,11 @@ public void testCreateDefaultParams() { // should have removed everything assertThat(parameters.size(), equalTo(0)); - assertWarnings("[xpack.monitoring.exporters._http.use_ingest] setting was deprecated in Elasticsearch and will be removed " + - "in a future release! See the breaking changes documentation for the next major version."); + + if (useIngest == false) { + assertWarnings("[xpack.monitoring.exporters._http.use_ingest] setting was deprecated in Elasticsearch and will be removed " + + "in a future release! See the breaking changes documentation for the next major version."); + } } public void testHttpExporterMigrationInProgressBlock() throws Exception { From 93e11244a4cebb08a213e2869f9a0e1e317b97ec Mon Sep 17 00:00:00 2001 From: James Baiera Date: Tue, 14 Sep 2021 13:34:03 -0400 Subject: [PATCH 6/7] correctly fix tests final final --- .../xpack/monitoring/exporter/ExportersTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java index f2d4600819487..d3172a64e14a7 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java @@ -265,9 +265,9 @@ InitializedExporters initExporters(Settings settings) { assertEquals(settings.get("xpack.monitoring.exporters._name0.use_ingest"), "true"); assertEquals(settings.get("xpack.monitoring.exporters._name1.type"), "http"); assertEquals(settings.get("xpack.monitoring.exporters._name1.use_ingest"), "false"); - assertWarnings("[xpack.monitoring.exporters.name0.use_ingest] setting was deprecated in Elasticsearch and will be removed " + - "in a future release! See the breaking changes documentation for the next major version."); - assertWarnings("[xpack.monitoring.exporters.name1.use_ingest] setting was deprecated in Elasticsearch and will be removed " + + assertWarnings("[xpack.monitoring.exporters._name0.use_ingest] setting was deprecated in Elasticsearch and will be removed " + + "in a future release! See the breaking changes documentation for the next major version.", + "[xpack.monitoring.exporters._name1.use_ingest] setting was deprecated in Elasticsearch and will be removed " + "in a future release! See the breaking changes documentation for the next major version."); } From ea8f7f309a238bbe3100e5a53faf4b5352db055a Mon Sep 17 00:00:00 2001 From: James Baiera Date: Tue, 28 Sep 2021 15:28:57 -0400 Subject: [PATCH 7/7] Updating deprecation text --- docs/reference/migration/migrate_7_16.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/migration/migrate_7_16.asciidoc b/docs/reference/migration/migrate_7_16.asciidoc index 0a8fa8e6b18ee..60d2165e75c21 100644 --- a/docs/reference/migration/migrate_7_16.asciidoc +++ b/docs/reference/migration/migrate_7_16.asciidoc @@ -41,7 +41,7 @@ logging>>. *Details* + The `xpack.monitoring.exporters.*.use_ingest` property has been deprecated in 7.16.0 and will be removed in 8.0.0. This parameter controls the creation of pipelines for monitoring -indices that currently have no function. +indices. These pipelines currently have no function. *Impact* + Discontinue the use of the `xpack.monitoring.exporters.*.use_ingest` setting.