deprecation.asciidoc 4.6 KB

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