deprecation.asciidoc 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. [role="xpack"]
  2. [[migration-api-deprecation]]
  3. === Deprecation info APIs
  4. ++++
  5. <titleabbrev>Deprecation info</titleabbrev>
  6. ++++
  7. IMPORTANT: Use this API to check for deprecated configuration before performing
  8. a major version upgrade. You should run it on the last minor version of the
  9. major version you are upgrading from, as earlier minor versions may not include
  10. all deprecations.
  11. The deprecation API is to be used to retrieve information about different
  12. cluster, node, and index level settings that use deprecated features that will
  13. be removed or changed in the next major version.
  14. [[migration-api-request]]
  15. ==== {api-request-title}
  16. `GET /_migration/deprecations` +
  17. `GET /<target>/_migration/deprecations`
  18. [[migration-api-prereqs]]
  19. ==== {api-prereq-title}
  20. * If the {es} {security-features} are enabled, you must have the `manage`
  21. <<privileges-list-cluster,cluster privilege>> to use this API.
  22. [[migration-api-path-params]]
  23. ==== {api-path-parms-title}
  24. `<target>`::
  25. (Optional, string)
  26. Comma-separate list of data streams or indices to check. Wildcard (`*`)
  27. expressions are supported.
  28. +
  29. When you specify this parameter, only deprecations for the specified
  30. data streams or indices are returned.
  31. [[migration-api-settings]]
  32. ==== Settings
  33. You can use the following settings to control the behavior of the deprecation info API:
  34. [[skip_deprecated_settings]]
  35. NOTE: This setting is designed for indirect use by {ess-trial}[{ess}], {ece-ref}[{ece}], and {eck-ref}[{eck}].
  36. Direct use is not supported.
  37. // tag::skip_deprecated_settings-tag[]
  38. `deprecation.skip_deprecated_settings`
  39. (<<dynamic-cluster-setting,Dynamic>>)
  40. Defaults to an empty list. Set to a list of setting names to be ignored by the deprecation info API. Any
  41. deprecations related to settings in this list will not be returned by the API. Simple wildcard matching is supported.
  42. // end::skip_deprecated_settings-tag[]
  43. [[migration-api-example]]
  44. ==== {api-examples-title}
  45. To see the list of offenders in your cluster, submit a GET request to the
  46. `_migration/deprecations` endpoint:
  47. [source,console]
  48. --------------------------------------------------
  49. GET /_migration/deprecations
  50. --------------------------------------------------
  51. // TEST[skip:cannot assert tests have certain deprecations]
  52. Example response:
  53. ["source","js",subs="attributes,callouts,macros"]
  54. --------------------------------------------------
  55. {
  56. "cluster_settings" : [
  57. {
  58. "level" : "critical",
  59. "message" : "Cluster name cannot contain ':'",
  60. "url" : "{ref-70}/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_cluster_name",
  61. "details" : "This cluster is named [mycompany:logging], which contains the illegal character ':'."
  62. }
  63. ],
  64. "node_settings" : [ ],
  65. "index_settings" : {
  66. "logs:apache" : [
  67. {
  68. "level" : "warning",
  69. "message" : "Index name cannot contain ':'",
  70. "url" : "{ref-70}/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_index_name",
  71. "details" : "This index is named [logs:apache], which contains the illegal character ':'."
  72. }
  73. ]
  74. },
  75. "ml_settings" : [ ]
  76. }
  77. --------------------------------------------------
  78. // NOTCONSOLE
  79. The response breaks down all the specific forward-incompatible settings that you
  80. should resolve before upgrading your cluster. Any offending settings are
  81. represented as a deprecation warning.
  82. The following is an example deprecation warning:
  83. ["source","js",subs="attributes,callouts,macros"]
  84. --------------------------------------------------
  85. {
  86. "level" : "warning",
  87. "message" : "This is the generic descriptive message of the breaking change",
  88. "url" : "{ref-60}/breaking_60_indices_changes.html",
  89. "details" : "more information, like which nodes, indices, or settings are to blame"
  90. }
  91. --------------------------------------------------
  92. // NOTCONSOLE
  93. As is shown, there is a `level` property that describes the significance of the
  94. issue.
  95. |=======
  96. |warning | You can upgrade directly, but you are using deprecated functionality
  97. which will not be available or behave differently in the next major version.
  98. |critical | You cannot upgrade without fixing this problem.
  99. |=======
  100. The `message` property and the optional `details` property provide descriptive
  101. information about the deprecation warning. The `url` property provides a link to
  102. the Breaking Changes Documentation, where you can find more information about
  103. this change.
  104. Any cluster-level deprecation warnings can be found under the `cluster_settings`
  105. key. Similarly, any node-level warnings are found under `node_settings`. Since
  106. only a select subset of your nodes might incorporate these settings, it is
  107. important to read the `details` section for more information about which nodes
  108. are affected. Index warnings are sectioned off per index and can be filtered
  109. using an index-pattern in the query. This section includes warnings for the
  110. backing indices of data streams specified in the request path. Machine Learning
  111. related deprecation warnings can be found under the `ml_settings` key.
  112. The following example request shows only index-level deprecations of all
  113. `logstash-*` indices:
  114. [source,console]
  115. --------------------------------------------------
  116. GET /logstash-*/_migration/deprecations
  117. --------------------------------------------------
  118. // TEST[skip:cannot assert tests have certain deprecations]