deprecation.asciidoc 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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 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 /<index_name>/_migration/deprecations`
  19. [[migration-api-path-params]]
  20. ==== {api-path-parms-title}
  21. `index_name`::
  22. (Optional, string) Identifier for the index. It can be an index name or a
  23. wildcard expression. When you specify this parameter, only index-level
  24. deprecations for the specified indices are returned.
  25. [[migration-api-example]]
  26. ==== {api-examples-title}
  27. To see the list of offenders in your cluster, submit a GET request to the
  28. `_migration/deprecations` endpoint:
  29. [source,js]
  30. --------------------------------------------------
  31. GET /_migration/deprecations
  32. --------------------------------------------------
  33. // CONSOLE
  34. // TEST[skip:cannot assert tests have certain deprecations]
  35. Example response:
  36. ["source","js",subs="attributes,callouts,macros"]
  37. --------------------------------------------------
  38. {
  39. "cluster_settings" : [
  40. {
  41. "level" : "critical",
  42. "message" : "Cluster name cannot contain ':'",
  43. "url" : "{ref-70}/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_cluster_name",
  44. "details" : "This cluster is named [mycompany:logging], which contains the illegal character ':'."
  45. }
  46. ],
  47. "node_settings" : [ ],
  48. "index_settings" : {
  49. "logs:apache" : [
  50. {
  51. "level" : "warning",
  52. "message" : "Index name cannot contain ':'",
  53. "url" : "{ref-70}/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_index_name",
  54. "details" : "This index is named [logs:apache], which contains the illegal character ':'."
  55. }
  56. ]
  57. },
  58. "ml_settings" : [ ]
  59. }
  60. --------------------------------------------------
  61. // NOTCONSOLE
  62. The response breaks down all the specific forward-incompatible settings that you
  63. should resolve before upgrading your cluster. Any offending settings are
  64. represented as a deprecation warning.
  65. The following is an example deprecation warning:
  66. ["source","js",subs="attributes,callouts,macros"]
  67. --------------------------------------------------
  68. {
  69. "level" : "warning",
  70. "message" : "This is the generic descriptive message of the breaking change",
  71. "url" : "{ref-60}/breaking_60_indices_changes.html",
  72. "details" : "more information, like which nodes, indices, or settings are to blame"
  73. }
  74. --------------------------------------------------
  75. // NOTCONSOLE
  76. As is shown, there is a `level` property that describes the significance of the
  77. issue.
  78. |=======
  79. |warning | You can upgrade directly, but you are using deprecated functionality
  80. which will not be available or behave differently in the next major version.
  81. |critical | You cannot upgrade without fixing this problem.
  82. |=======
  83. The `message` property and the optional `details` property provide descriptive
  84. information about the deprecation warning. The `url` property provides a link to
  85. the Breaking Changes Documentation, where you can find more information about
  86. this change.
  87. Any cluster-level deprecation warnings can be found under the `cluster_settings`
  88. key. Similarly, any node-level warnings are found under `node_settings`. Since
  89. only a select subset of your nodes might incorporate these settings, it is
  90. important to read the `details` section for more information about which nodes
  91. are affected. Index warnings are sectioned off per index and can be filtered
  92. using an index-pattern in the query. Machine Learning related deprecation
  93. warnings can be found under the `ml_settings` key.
  94. The following example request shows only index-level deprecations of all
  95. `logstash-*` indices:
  96. [source,js]
  97. --------------------------------------------------
  98. GET /logstash-*/_migration/deprecations
  99. --------------------------------------------------
  100. // CONSOLE
  101. // TEST[skip:cannot assert tests have certain deprecations]