mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[8.14] [docs] Resolve migration failures: allow copying as curl and remove outdated 7.12 known issue (#190677) (#190808)
# Backport This will backport the following commits from `main` to `8.14`: - [[docs] Resolve migration failures: allow copying as curl and remove outdated 7.12 known issue (#190677)](https://github.com/elastic/kibana/pull/190677) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Rudolf Meijering","email":"skaapgif@gmail.com"},"sourceCommit":{"committedDate":"2024-08-20T14:07:52Z","message":"[docs] Resolve migration failures: allow copying as curl and remove outdated 7.12 known issue (#190677)\n\n## Summary\r\n\r\nThis allows users to copy the documented console commands as curl\r\ncommands. Useful since users don't have access to console when there's a\r\nmigration failure. I also removed a known 7.12 issue that's no longer\r\nrelevant for 8.x users.\r\n\r\nExample:\r\n<img width=\"815\" alt=\"Screenshot 2024-08-19 at 12 48 36\"\r\nsrc=\"https://github.com/user-attachments/assets/973fe626-7593-4d65-91d3-3c7aab5e9c63\">\r\n\r\nclicking \"copy as curl\" produces:\r\n```\r\ncurl -X PUT \"localhost:9200/_security/role/grant_kibana_system_indices?pretty\" -H 'Content-Type: application/json' -d'\r\n{\r\n \"indices\": [\r\n {\r\n \"names\": [\r\n \".kibana*\"\r\n ],\r\n \"privileges\": [\r\n \"all\"\r\n ],\r\n \"allow_restricted_indices\": true\r\n }\r\n ]\r\n}\r\n'\r\n```\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### Risk Matrix\r\n\r\nDelete this section if it is not applicable to this PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other developers to\r\nidentify risks that should be tested prior to the change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider some of the following examples\r\nand how they may potentially impact the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes |\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n| Multiple Spaces—unexpected behavior in non-default Kibana Space.\r\n| Low | High | Integration tests will verify that all features are still\r\nsupported in non-default Kibana Space and when user switches between\r\nspaces. |\r\n| Multiple nodes—Elasticsearch polling might have race conditions\r\nwhen multiple Kibana nodes are polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so executing them multiple times will not result\r\nin logical error, but will degrade performance. To test for this case we\r\nadd plenty of unit tests around this logic and document manual testing\r\nprocedure. |\r\n| Code should gracefully handle cases when feature X or plugin Y are\r\ndisabled. | Medium | High | Unit tests will verify that any feature flag\r\nor plugin combination still results in our service operational. |\r\n| [See more potential risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"befa09285b72b8f422126a309896234c66c7b48d","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","docs","backport:all-open","v8.7.2","v8.8.3","v8.9.3","v8.10.5","v8.11.5","v8.12.3","v8.13.5","v8.16.0","v8.14.4","v8.15.1","backport:version"],"title":"[docs] Resolve migration failures: allow copying as curl and remove outdated 7.12 known issue","number":190677,"url":"https://github.com/elastic/kibana/pull/190677","mergeCommit":{"message":"[docs] Resolve migration failures: allow copying as curl and remove outdated 7.12 known issue (#190677)\n\n## Summary\r\n\r\nThis allows users to copy the documented console commands as curl\r\ncommands. Useful since users don't have access to console when there's a\r\nmigration failure. I also removed a known 7.12 issue that's no longer\r\nrelevant for 8.x users.\r\n\r\nExample:\r\n<img width=\"815\" alt=\"Screenshot 2024-08-19 at 12 48 36\"\r\nsrc=\"https://github.com/user-attachments/assets/973fe626-7593-4d65-91d3-3c7aab5e9c63\">\r\n\r\nclicking \"copy as curl\" produces:\r\n```\r\ncurl -X PUT \"localhost:9200/_security/role/grant_kibana_system_indices?pretty\" -H 'Content-Type: application/json' -d'\r\n{\r\n \"indices\": [\r\n {\r\n \"names\": [\r\n \".kibana*\"\r\n ],\r\n \"privileges\": [\r\n \"all\"\r\n ],\r\n \"allow_restricted_indices\": true\r\n }\r\n ]\r\n}\r\n'\r\n```\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### Risk Matrix\r\n\r\nDelete this section if it is not applicable to this PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other developers to\r\nidentify risks that should be tested prior to the change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider some of the following examples\r\nand how they may potentially impact the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes |\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n| Multiple Spaces—unexpected behavior in non-default Kibana Space.\r\n| Low | High | Integration tests will verify that all features are still\r\nsupported in non-default Kibana Space and when user switches between\r\nspaces. |\r\n| Multiple nodes—Elasticsearch polling might have race conditions\r\nwhen multiple Kibana nodes are polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so executing them multiple times will not result\r\nin logical error, but will degrade performance. To test for this case we\r\nadd plenty of unit tests around this logic and document manual testing\r\nprocedure. |\r\n| Code should gracefully handle cases when feature X or plugin Y are\r\ndisabled. | Medium | High | Unit tests will verify that any feature flag\r\nor plugin combination still results in our service operational. |\r\n| [See more potential risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"befa09285b72b8f422126a309896234c66c7b48d"}},"sourceBranch":"main","suggestedTargetBranches":["8.7","8.8","8.9","8.10","8.11","8.12","8.13","8.14","8.15"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.11","label":"v8.11.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.12","label":"v8.12.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.13","label":"v8.13.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190677","number":190677,"mergeCommit":{"message":"[docs] Resolve migration failures: allow copying as curl and remove outdated 7.12 known issue (#190677)\n\n## Summary\r\n\r\nThis allows users to copy the documented console commands as curl\r\ncommands. Useful since users don't have access to console when there's a\r\nmigration failure. I also removed a known 7.12 issue that's no longer\r\nrelevant for 8.x users.\r\n\r\nExample:\r\n<img width=\"815\" alt=\"Screenshot 2024-08-19 at 12 48 36\"\r\nsrc=\"https://github.com/user-attachments/assets/973fe626-7593-4d65-91d3-3c7aab5e9c63\">\r\n\r\nclicking \"copy as curl\" produces:\r\n```\r\ncurl -X PUT \"localhost:9200/_security/role/grant_kibana_system_indices?pretty\" -H 'Content-Type: application/json' -d'\r\n{\r\n \"indices\": [\r\n {\r\n \"names\": [\r\n \".kibana*\"\r\n ],\r\n \"privileges\": [\r\n \"all\"\r\n ],\r\n \"allow_restricted_indices\": true\r\n }\r\n ]\r\n}\r\n'\r\n```\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### Risk Matrix\r\n\r\nDelete this section if it is not applicable to this PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other developers to\r\nidentify risks that should be tested prior to the change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider some of the following examples\r\nand how they may potentially impact the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes |\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n| Multiple Spaces—unexpected behavior in non-default Kibana Space.\r\n| Low | High | Integration tests will verify that all features are still\r\nsupported in non-default Kibana Space and when user switches between\r\nspaces. |\r\n| Multiple nodes—Elasticsearch polling might have race conditions\r\nwhen multiple Kibana nodes are polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so executing them multiple times will not result\r\nin logical error, but will degrade performance. To test for this case we\r\nadd plenty of unit tests around this logic and document manual testing\r\nprocedure. |\r\n| Code should gracefully handle cases when feature X or plugin Y are\r\ndisabled. | Medium | High | Unit tests will verify that any feature flag\r\nor plugin combination still results in our service operational. |\r\n| [See more potential risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"befa09285b72b8f422126a309896234c66c7b48d"}},{"branch":"8.14","label":"v8.14.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
This commit is contained in:
parent
c3fbf963ab
commit
a4d52607be
1 changed files with 6 additions and 24 deletions
|
@ -18,24 +18,6 @@ When you address the root cause for the migration failure,
|
|||
{kib} automatically retries the migration.
|
||||
If you're unable to resolve a failed migration, contact Support.
|
||||
|
||||
|
||||
[float]
|
||||
==== Known issues with {fleet} beta
|
||||
If you see a`timeout_exception` or `receive_timeout_transport_exception` error,
|
||||
it might be from a known known issue in 7.12.0 if you tried the {fleet} beta.
|
||||
Upgrade migrations fail because of a large number of documents in the `.kibana` index,
|
||||
which causes {kib} to log errors such as:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------
|
||||
Error: Unable to complete saved object migrations for the [.kibana] index. Please check the health of your Elasticsearch cluster and try again. Error: [receive_timeout_transport_exception]: [instance-0000000002][10.32.1.112:19541][cluster:monitor/task/get] request_id [2648] timed out after [59940ms]
|
||||
|
||||
Error: Unable to complete saved object migrations for the [.kibana] index. Please check the health of your Elasticsearch cluster and try again. Error: [timeout_exception]: Timed out waiting for completion of [org.elasticsearch.index.reindex.BulkByScrollTask@6a74c54]
|
||||
--------------------------------------------
|
||||
|
||||
For instructions on how to mitigate the known issue, refer to https://github.com/elastic/kibana/issues/95321[the GitHub issue].
|
||||
|
||||
|
||||
[float]
|
||||
==== Corrupt saved objects
|
||||
To find and remedy problems caused by corrupt documents, we highly recommend testing your {kib} upgrade in a development cluster,
|
||||
|
@ -56,7 +38,7 @@ To delete the documents that cause migrations to fail, take the following steps:
|
|||
|
||||
. Create a role as follows:
|
||||
+
|
||||
[source,sh]
|
||||
[source,console]
|
||||
--------------------------------------------
|
||||
PUT _security/role/grant_kibana_system_indices
|
||||
{
|
||||
|
@ -76,7 +58,7 @@ PUT _security/role/grant_kibana_system_indices
|
|||
|
||||
. Create a user with the role above and `superuser` built-in role:
|
||||
+
|
||||
[source,sh]
|
||||
[source,console]
|
||||
--------------------------------------------
|
||||
POST /_security/user/temporarykibanasuperuser
|
||||
{
|
||||
|
@ -87,7 +69,7 @@ POST /_security/user/temporarykibanasuperuser
|
|||
|
||||
. Remove the write block which the migration system has placed on the previous index:
|
||||
+
|
||||
[source,sh]
|
||||
[source,console]
|
||||
--------------------------------------------
|
||||
PUT .kibana_7.12.1_001/_settings
|
||||
{
|
||||
|
@ -99,7 +81,7 @@ PUT .kibana_7.12.1_001/_settings
|
|||
|
||||
. Delete the corrupt document:
|
||||
+
|
||||
[source,sh]
|
||||
[source,console]
|
||||
--------------------------------------------
|
||||
DELETE .kibana_7.12.0_001/_doc/marketing_space:dashboard:e3c5fc71-ac71-4805-bcab-2bcc9cc93275
|
||||
--------------------------------------------
|
||||
|
@ -185,7 +167,7 @@ The process is waiting for a yellow index status. There are two known causes:
|
|||
|
||||
Before retrying the migration, inspect the output of the `_cluster/allocation/explain?index=${targetIndex}` API to identify why the index isn't yellow:
|
||||
|
||||
[source,sh]
|
||||
[source,console]
|
||||
--------------------------------------------
|
||||
GET _cluster/allocation/explain
|
||||
{
|
||||
|
@ -220,7 +202,7 @@ Unable to complete saved object migrations for the [.kibana] index: [incompatibl
|
|||
--------------------------------------------
|
||||
|
||||
To get around the issue, remove the transient and persisted routing allocation settings:
|
||||
[source,sh]
|
||||
[source,console]
|
||||
--------------------------------------------
|
||||
PUT /_cluster/settings
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue