From b503f0591621430def3a835336f514eb28bbcd24 Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Wed, 23 Nov 2016 14:36:29 +0100 Subject: [PATCH] [Test] Fix rolling upgrade test to only wait for yellow in a mixed cluster If the primary shard of an index with (number_of_replicas > 0) ends up on a new node in a mixed cluster, the replica cannot be allocated to the old node as the new node might have written segments that use a new postings format or codec that is not available on the older node. As x-pack automatically creates indices with number_of_replicas > 0, for example monitoring-data-*, the test can only wait for yellow in a mixed cluster. Original commit: elastic/x-pack-elasticsearch@945d9e3811f602ab014a1280726b2e387b0d2fc3 --- .../resources/rest-api-spec/test/mixed_cluster/10_basic.yaml | 5 ++++- .../resources/rest-api-spec/test/old_cluster/10_basic.yaml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yaml b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yaml index 3791f75249a..226a35823ee 100644 --- a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yaml +++ b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yaml @@ -2,7 +2,10 @@ "Index data and search on the mixed cluster": - do: cluster.health: - wait_for_status: green + # if the primary shard of an index with (number_of_replicas > 0) ends up on the new node, the replica cannot be + # allocated to the old node (see NodeVersionAllocationDecider). x-pack automatically creates indices with + # replicas, for example monitoring-data-*. + wait_for_status: yellow wait_for_nodes: 2 timeout: 25s diff --git a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/10_basic.yaml b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/10_basic.yaml index f1f90cf9d22..6bd578dd96a 100644 --- a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/10_basic.yaml +++ b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/10_basic.yaml @@ -6,7 +6,7 @@ body: settings: index: - number_of_replicas: 0 + number_of_replicas: 1 - do: bulk: