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

[BUG] Running the solution is getting null error in metadata migration #1177

Closed
rudney-souza opened this issue Dec 4, 2024 · 7 comments · Fixed by #1178
Closed

[BUG] Running the solution is getting null error in metadata migration #1177

rudney-souza opened this issue Dec 4, 2024 · 7 comments · Fixed by #1178
Labels
bug Something isn't working

Comments

@rudney-souza
Copy link

What is the bug?

After running the snapshot command, and waiting till completion, ive ran the command for metadata evaluate and got an null error

How can one reproduce the bug?

making a snapshot from ES_6.7 and then try to get metadata evaluated

What is the expected behavior?

A normal migration from ES_6.7 to OS_2.17

What is your host/environment?

ES_6.7 to OS_2.17

Do you have any screenshots?

image
image
image

@rudney-souza rudney-souza added bug Something isn't working untriaged labels Dec 4, 2024
@peternied
Copy link
Member

@rudney-souza Thanks for opening this issue. To help us understand what happened could you grab the metadata log file associated with failure, see Metadata-Migration#troubleshoot-issues for how to get this.

@rudney-souza
Copy link
Author

Thanks for response @peternied, so i got those logs in here
image
image
image

@peternied
Copy link
Member

@rudney-souza Thanks - I'm not seeing any [ERROR] entries or exception call stacks in what you've posted. Is it possible for you to share with me the full log contents privately?

I'm on the OpenSearch Slack instance as Peter Nied which might be a faster and private way to discover the root cause, see OpenSearch Slack. Alternatively you can email at [email protected]

peternied added a commit to peternied/opensearch-migrations that referenced this issue Dec 4, 2024
@peternied
Copy link
Member

Extracted the full callstack from the log file:

2024-12-04 19:55:04,302 ERROR o.o.m.c.Evaluate [main] Unexpected failure
java.lang.NullPointerException: null
        at org.opensearch.migrations.transformation.rules.IndexMappingTypeRemoval.canApply(IndexMappingTypeRemoval.java:56) ~[transformation-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.transformation.rules.IndexMappingTypeRemoval.applyTransformation(IndexMappingTypeRemoval.java:73) ~[transformation-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.transformation.rules.IndexMappingTypeRemoval.applyTransformation(IndexMappingTypeRemoval.java:40) ~[transformation-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.bulkload.transformers.Transformer_ES_6_8_to_OS_2_11.lambda$transformIndex$3(Transformer_ES_6_8_to_OS_2_11.java:78) ~[RFS-0.1.0-SNAPSHOT.jar:?]
        at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
        at org.opensearch.migrations.bulkload.transformers.Transformer_ES_6_8_to_OS_2_11.transformIndex(Transformer_ES_6_8_to_OS_2_11.java:78) ~[RFS-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.bulkload.transformers.Transformer_ES_6_8_to_OS_2_11.lambda$transformGlobalMetadata$1(Transformer_ES_6_8_to_OS_2_11.java:41) ~[RFS-0.1.0-SNAPSHOT.jar:?]
        at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
        at org.opensearch.migrations.bulkload.transformers.Transformer_ES_6_8_to_OS_2_11.transformGlobalMetadata(Transformer_ES_6_8_to_OS_2_11.java:38) ~[RFS-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.bulkload.transformers.CompositeTransformer.transformGlobalMetadata(CompositeTransformer.java:16) ~[RFS-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.bulkload.worker.MetadataRunner.migrateMetadata(MetadataRunner.java:25) ~[RFS-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.commands.MigratorEvaluatorBase.migrateGlobalMetadata(MigratorEvaluatorBase.java:115) ~[MetadataMigration-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.commands.MigratorEvaluatorBase.migrateAllItems(MigratorEvaluatorBase.java:86) ~[MetadataMigration-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.commands.Evaluate.execute(Evaluate.java:29) [MetadataMigration-0.1.0-SNAPSHOT.jar:?]
        at org.opensearch.migrations.MetadataMigration.main(MetadataMigration.java:77) [MetadataMigration-0.1.0-SNAPSHOT.jar:?]

@peternied
Copy link
Member

@rudney-souza I've merged a fix for this issue, you can pick it up immediately by going onto the bootstrap box with the following steps

cd /opensearch-migrations/deployment/cdk/opensearch-service-migration
git fetch origin
git merge origin/main
./buildDockerImages.sh
# Confirm any cdk.context.json settings and then redeploy
./deploy.sh

@rudney-souza
Copy link
Author

That sounds nice @peternied , thanks a lot!

@rudney-souza
Copy link
Author

Now all working, thanks a lot @peternied
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants