mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 21:18:31 +00:00
647e225698
Some steps, such as steps that delete, close, or freeze an index, may fail due to a currently running snapshot of the index. In those cases, rather than move to the ERROR step, we should retry the step when the snapshot has completed. This change adds an abstract step (`AsyncRetryDuringSnapshotActionStep`) that certain steps (like the ones I mentioned above) can extend that will automatically handle a situation where a snapshot is taking place. When a `SnapshotInProgressException` is received by the listener wrapper, a `ClusterStateObserver` listener is registered to wait until the snapshot has completed, re-running the ILM action when no snapshot is occurring. This also adds integration tests for these scenarios (thanks to @talevy in #37552). Resolves #37541
25 lines
779 B
Groovy
25 lines
779 B
Groovy
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
dependencies {
|
|
testCompile project(path: xpackProject('plugin').path, configuration: 'testArtifacts')
|
|
}
|
|
|
|
integTestRunner {
|
|
/* To support taking index snapshots, we have to set path.repo setting */
|
|
systemProperty 'tests.path.repo', new File(buildDir, "cluster/shared/repo")
|
|
}
|
|
|
|
integTestCluster {
|
|
numNodes = 4
|
|
clusterName = 'ilm'
|
|
|
|
setting 'xpack.ilm.enabled', 'true'
|
|
setting 'xpack.security.enabled', 'false'
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
setting 'xpack.monitoring.enabled', 'false'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
setting 'indices.lifecycle.poll_interval', '1000ms'
|
|
}
|