-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Resolving failed Kibana upgrade migrations #80999
Conversation
4310b58
to
d64aab8
Compare
d64aab8
to
a958a2f
Compare
Pinging @elastic/kibana-platform (Team:Platform) |
@elasticmachine merge upstream |
@rudolf I see TODOs in the summary. Is this ready for review? |
* Shut down all {kib} nodes. Running more than one {kib} version against the | ||
same Elasticseach index is unsupported. If you upgrade while older {kib} nodes are | ||
running, the upgrade can fail. | ||
* Shut down all {kib} instances. Running more than one {kib} version against |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bullet point about shutting down all Kibana instances (i.e., maintenance window/downtime required) is often missed. It might be helpful to highlight this in a warning statement and call out the expected downtime.
the appropriate {kib} index. When you have the previous version running again, | ||
delete the more recent `.kibana_N` index or indices so that future upgrades are | ||
based on the current {kib} index. You must restart {kib} to re-trigger the migration. | ||
In order to rollback after a failed upgrade migration, the saved object indices might also have to be rolled back to be compatible with the previous {kibana} version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any guidelines on how the user can determine if there are objects that need to be rolled back to be compatible with previous Kibana version? (i.e., if they have to follow the "Rolling back to a previous version of ..." section in addition to the "Resolving migration failures" section)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that would be useful to flesh out. In short, if you get unhandled exceptions it's worth retrying the migration to see if it would succeed. If a specific document fails to migrate retrying won't help, so you can either delete the document and retry, or rollback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a "preventing migration failures" section. In the rollback instructions I now added: if you tried the preventing migration failures and resolving migration failures and still can't upgrade you might choose to rollback.
[float] | ||
[[upgrade-before-you-begin]] | ||
=== Before you begin | ||
|
||
WARNING: {kib} automatically runs upgrade migrations when required. To roll back to an earlier version in case of an upgrade failure, you **must** have a backup snapshot available. Use <<snapshot-repositories, Snapshot and Restore>> to back up {kib} data by targeting the `.kibana*` indices. For more information see <<upgrade-migrations, upgrade-migrations>>. | ||
|
||
Before you upgrade {kib}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on adding another item here to prevent custom index templates from interfering with .kibana* indices?
i.e., remove any custom index template that might accidentally "cover" .kibana*
indices. This can help avoid saved objects migration issues due to custom index templates causing invalid/unexpected mappings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the "preventing migration failures" section and linked to it from here.
…out stopping all instances in specific upgrade steps
@pgayvallet I've addressed the remaining todo's now. |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. That's some great doc improvements!
* `.kibana_N`, or if set, the `kibana.index` configuration setting | ||
* `.kibana_task_manager_N`, or if set, the `xpack.tasks.index` configuration setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: I would replace .kibana_N
with .kibana_{N}
and .kibana_N+1
with .kibana_{N+1}
, but this is a developer point of view, not sure this is more readable for the target audience.
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc
…astic#81810) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc
…astic#81810) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc
* master: (87 commits) [Actions] Adding `hasAuth` to Webhook Configuration to avoid confusing UX (elastic#81778) [i18n] add get_kibana_translation_paths tests (elastic#81624) [UX] Fix search term reset from url (elastic#81654) [Lens] Improved range formatter (elastic#80132) [Resolver] `SideEffectContext` changes, remove `@testing-library` uses (elastic#81077) [Time to Visualize] Update Library Text with Call to Action (elastic#81667) [docs] Resolving failed Kibana upgrade migrations (elastic#80999) [ftr/menuToggle] provide helper for enhanced menu toggle handling (elastic#81709) [Task Manager] adds basic observability into Task Manager's runtime operations (elastic#77868) Doc changes for stack management and grouped feature privileges (elastic#80486) Added functional test for alerts list filters by status, alert type and action type. Did a code refactoring and splitting for alerts tests. (elastic#81422) [Security Solution][Endpoint][Admin] Malware Protections Notify User Version (elastic#81415) Revert "[Actions] Adding `hasAuth` to Webhook Configuration to avoid confusing UX (elastic#81390)" [Maps] Use default format when proxying EMS-files (elastic#79760) [Discover] Deangularize context.html (elastic#81442) Use the displayName property in default editor (elastic#73311) adds bug label to Bug report for Security Solution template (elastic#81643) [ML] Transforms: Remove index field limitation for custom query. (elastic#81467) [Actions] Adding `hasAuth` to Webhook Configuration to avoid confusing UX (elastic#81390) [Task Manager] Mark task as failed if maxAttempts has been met. (elastic#80681) ...
…81814) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc
…81813) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…astic#81810) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc
) (#81882) * [docs] Resolving failed Kibana upgrade migrations (#80999) (#81810) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc * Adapt upgrade migration documentation for <= 7.3
… (elastic#81810) (elastic#81882) * [docs] Resolving failed Kibana upgrade migrations (elastic#80999) (elastic#81810) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc * Adapt upgrade migration documentation for <= 7.3 # Conflicts: # docs/setup/upgrade.asciidoc
… (elastic#81810) (elastic#81882) * [docs] Resolving failed Kibana upgrade migrations (elastic#80999) (elastic#81810) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc * Adapt upgrade migration documentation for <= 7.3 # Conflicts: # docs/setup/upgrade.asciidoc
… (elastic#81810) (elastic#81882) * [docs] Resolving failed Kibana upgrade migrations (elastic#80999) (elastic#81810) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc * Adapt upgrade migration documentation for <= 7.3 # Conflicts: # docs/setup/upgrade.asciidoc
) (#81882) (#81985) * [docs] Resolving failed Kibana upgrade migrations (#80999) (#81810) * Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/setup/upgrade.asciidoc # docs/setup/upgrade/upgrade-migrations.asciidoc # docs/setup/upgrade/upgrade-standard.asciidoc * Adapt upgrade migration documentation for <= 7.3 # Conflicts: # docs/setup/upgrade.asciidoc
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Resolving failed Kibana upgrade migrations * Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps * Add preventing migration failures section * Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures * Fix link Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Documentation for resolving failed Kibana upgrade migrations. Related to #80283
This provides instructions for retrying failed upgrade migrations, or rolling back to a previous migration using snapshots. Using snapshots makes this process significantly simpler and much harder to accidentally remove the wrong index or forget to add the correct alias etc etc.
TODO:
xpack.tasks.index: .tasks
refresh_interval
index setting for newly created indices.Checklist
Delete any items that are not applicable to this PR.
For maintainers