Skip to content
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

Feature migration refuses to run if all features requiring upgrade have encountered errors #83917

Closed
gwbrown opened this issue Feb 15, 2022 · 1 comment · Fixed by #83918
Closed
Assignees
Labels
>bug :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team v7.17.0

Comments

@gwbrown
Copy link
Contributor

gwbrown commented Feb 15, 2022

Elasticsearch Version

7.17.0

Installed Plugins

none

Java Version

bundled

OS Version

Doesn't matter

Problem Description

If all features which still require migration have encountered an error, trying to start migration produces no results, only a response claiming no migration is necessary, even if that's not true. This means that transient errors that occur during migration are impossible to retry.

The only known workaround for this is a full-cluster restart, which will clear the migration upgrade result metadata.

Steps to Reproduce

  1. Start a cluster using a 6.x version.
  2. Upgrade it to 7.17.0.
  3. Run system index migration, but ensure that some indices fail (e.g. by triggering [Upgrade] migration system indices fails for tasks: mapper_parsing_exception #83779, which .tasks always will - fortunately that is easy enough to work around by removing the index)
  4. Try to re-run migration. Migration will not try to re-run.

Logs (if relevant)

The response will just say no migration is necessary:

{
  "accepted" : false,
  "reason" : "No system indices require migration"
}
@gwbrown gwbrown added >bug :Core/Infra/Core Core issues without another label v7.17.0 labels Feb 15, 2022
@gwbrown gwbrown self-assigned this Feb 15, 2022
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Feb 15, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

gwbrown added a commit that referenced this issue Feb 17, 2022
This PR addressed the behavior described in #83917, in which Feature migrations
which have encountered errors are not re-run in some cases. As of this PR, Features
which have encountered errors during migration are treated the same as Features 
requiring migration.

This PR also adds a test which artificially replicates #83917.
gwbrown added a commit to gwbrown/elasticsearch that referenced this issue Feb 17, 2022
…ic#83918)

This PR addressed the behavior described in elastic#83917, in which Feature migrations
which have encountered errors are not re-run in some cases. As of this PR, Features
which have encountered errors during migration are treated the same as Features 
requiring migration.

This PR also adds a test which artificially replicates elastic#83917.
gwbrown added a commit to gwbrown/elasticsearch that referenced this issue Feb 17, 2022
…ic#83918)

This PR addressed the behavior described in elastic#83917, in which Feature migrations
which have encountered errors are not re-run in some cases. As of this PR, Features
which have encountered errors during migration are treated the same as Features 
requiring migration.

This PR also adds a test which artificially replicates elastic#83917.
elasticsearchmachine pushed a commit that referenced this issue Feb 17, 2022
… (#84139)

This PR addressed the behavior described in #83917, in which Feature migrations
which have encountered errors are not re-run in some cases. As of this PR, Features
which have encountered errors during migration are treated the same as Features 
requiring migration.

This PR also adds a test which artificially replicates #83917.
elasticsearchmachine pushed a commit that referenced this issue Feb 17, 2022
…#83918) (#84137)

* Always re-run Feature migrations which have encountered errors (#83918)

This PR addressed the behavior described in #83917, in which Feature migrations
which have encountered errors are not re-run in some cases. As of this PR, Features
which have encountered errors during migration are treated the same as Features 
requiring migration.

This PR also adds a test which artificially replicates #83917.

* Adjust for method signature differences in this branch
gwbrown added a commit to gwbrown/elasticsearch that referenced this issue Feb 22, 2022
…ic#83918)

This PR addressed the behavior described in elastic#83917, in which Feature migrations
which have encountered errors are not re-run in some cases. As of this PR, Features
which have encountered errors during migration are treated the same as Features 
requiring migration.

This PR also adds a test which artificially replicates elastic#83917.
elasticsearchmachine pushed a commit that referenced this issue Feb 22, 2022
…83918) (#84138)

* Always re-run Feature migrations which have encountered errors (#83918)

This PR addressed the behavior described in #83917, in which Feature migrations
which have encountered errors are not re-run in some cases. As of this PR, Features
which have encountered errors during migration are treated the same as Features 
requiring migration.

This PR also adds a test which artificially replicates #83917.

* Resolve compilation failures for 8.0 branch
probakowski pushed a commit to probakowski/elasticsearch that referenced this issue Feb 23, 2022
…ic#83918)

This PR addressed the behavior described in elastic#83917, in which Feature migrations
which have encountered errors are not re-run in some cases. As of this PR, Features
which have encountered errors during migration are treated the same as Features 
requiring migration.

This PR also adds a test which artificially replicates elastic#83917.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team v7.17.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants