-
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
Test plan for SavedObject Migrations v2 #84141
Comments
Pinging @elastic/kibana-core (Team:Core) |
@joshdover I went through the test cases and this is great. I will talk to @LeeDr (out this week) and see where our names should go up. Looks like they are all fairly straightforward once we get test data. Thanks! |
After talking to @LeeDr - a couple of questions. Thanks!
|
One more question - will license levels impact this process in anyway? |
The only impact OSS vs X-Pack have is which plugins are enabled, so it should be covered by the "Disabling plugins" case above. License levels do not have any impact on which SO migrations are registered.
We're not making any changes to code that should impact import/export, but it's probably worth validating this by exporting data from a 6.8.x release into a 7.11 one. |
@joshdover could you explain a bit about migrations vs saved object import? I think saved objects which were exported from a previous Kibana version would be migrated as they are imported into a newer version? Maybe it's not during import but after? Also, could you please break down any steps within the migration process which we might see in the logging? Maybe an existing design or RFC doc already has this? If we want to abort the migration by killing Kibana it would be good to know how many timing windows there are where different states could exist.
For example, it might be like;
I don't know if Kibana sets some flag or version in a doc in Elasticsearch so that other Kibana instances know a migration is in progress. How can we figure out what migrations will happen to various different saved objects? It would be good to check that the migrations actually ran in these test cases including importing saved objects. |
@marius-dr spoke to @LeeDr and we have the test cases assigned between us right now for when the BC comes out. Depending on how it goes and where we land at after holidays - we can have status check. Thanks! |
When a user imports saved objects, we first migrate them before adding them to the
We have the algorithm documented here https://github.com/elastic/kibana/blob/master/rfcs/text/0013_saved_object_migrations.md#4212-migration-algorithm-cloned-index-per-version But when we implemented it some of the steps in this algorithm became two steps so I will rewrite it so that it's a better 1-1 match with the implementation (this will also be valuable documentation to maintain the feature). When migrations run we will print out each step so it's also easy to see what steps were executed or exactly at which step the process failed.
I've added a task to #75780 to add debug logging to print out this information. |
I started testing I created a bash script to help me run multiple kibanas in parallel without much hassle. I added full details on how to run the script in the file header.
|
|
All done. Also upgraded on cloud from 6.8.14->7.3.2->7.12.0 (Latest BC) |
@rudolf Should we close this issue? |
Manual test plan for #75780
End state of successful upgrade
Once an upgrade has successfully completed, this should be the end state of all indices and aliases (
8.0.0
should be replaced with the current version of Kibana):Scenarios
Multiple instances upgrading in parallel
Tester: @rudolf
The goal of this test is to ensure that multiple Kibana instances can successfully attempt the migration in parallel. The sub-goal is to identify any scaling issues with multiple nodes (if any) and determine a threshold where adding more Kibana instances creates performance problems in Elasticsearch. This is important information to know because Cloud's upgrade logic will start all new nodes at once. Based on current customer clusters, we need to be able to scale to at least 10 Kibana instances.
It would be useful to test this against a larger
.kibana
index.Use this bash script to run multiple Kibana instances on different ports.
Procedure
.kibana
index)Expected Behavior
Kibana instance is killed while migrations are running
Tester: @bhavyarm
The goal of this test is to verify that a Kibana instance can successfully re-attempt and complete a migration that may have failed or been aborted before completing.
Procedure
Expected Behavior
Upgrading from Kibana 6.8.x to 7.12
Tester: @bhavyarm
The goal of this test is to verify that we can successfully upgrade from the latest supported 6.8 version to the new migration system in 7.12.
Procedure
Expected Behavior
Upgrading from Kibana 6.0 to 7.12
Tester: @bhavyarm
The goal of this test is to verify that we can successfully upgrade from an older 6.x version from before we had migrations at all to the new migration system in 7.12.
Procedure
Expected Behavior
Upgrading from Kibana 5.6 to 6.8.x to 7.12
Tester: @bhavyarm
Similar to above, but this scenario specifically tests that the migration system will work with clusters that have gone through the 6.0 major upgrade. In this upgrade, the upgrade assistant reindexed the
.kibana
index into a.kibana-6
index behind an alias.Procedure
Expected Behavior
Upgrading from Kibana 7.3 to 7.12
Tester: @bhavyarm
The goal of this test is to verify that we can successfully upgrade from 7.3 from before the
.kibana_task_manager
index was managed by migrations to the new migration system in 7.12.Procedure
Expected Behavior
Large SO index
Tester: @rudolf
The goal of this test is to verify the performance of the new migration system when migrating an index with a large number of objects.
We have seen some deployments with ~200k documents in the
.kibana
indexed caused by telemetry data. This would be a good worst case performance scenario.Procedure
yarn es snapshot --data-archive=src/core/server/saved_objects/migrationsv2/integration_tests/archives/7.7.2_xpack_100k_obj.zip
Expected Behavior
Results
I did some rudimentary testing by running migrations on 100k saved objects (much larger than "normal") and looking at the output of
watch curl -s -X GET "elastic:changeme@localhost:9200/_cat/nodes?h=heap*\&v" -H 'Content-Type: application/json'
. There isn't a notable impact on the current heap between 1 kibana node or 10 (the largest kibana deployment we know of). But the runtime of the migration doubles for 10 nodes, so there is a performance impact.Migrations runtime with 100k objects:
However, this worst case scenario is still better than our downtime target of < 10 minutes.
Migrating an index with corrupt Saved Objects
Tester: @bhavyarm
The goal of this test is to verify the failure behavior when a corrupt saved object is in the index prior to migrations running. Corrupt saved objects are saved objects where the type and namespace in the _id don't match the type and namespace properties, or a document like
..., "type": "index-pattern", "dashboard": {...}
which is of typeindex-pattern
but doesn't have any attributes under the"index-pattern"
property, but instead has it's attributes under a"dashboard"
property.Here are some example corrupt saved objects:
Use this command to delete the corrupted saved object:
Procedure
Expected Behavior
Disabling plugins
Tester: @bhavyarm
The goal of this test is to verify that saved object documents that were created by a plugin that has since been disabled are copied into the new index and do not fail the migration.
Procedure
kibana.yml
file, disable some plugins that have data in the sample data set. For example:kibana.yml
Expected Behavior
.kibana
index should still include some objects of the typemap
andcanvas-workpad
The text was updated successfully, but these errors were encountered: