1 "bad cluster shard allocation explanation request": 2 - skip: 3 version: " - 5.5.99" 4 reason: response status on bad request was changed starting in 5.6.0 5 6 - do: 7 # there aren't any unassigned shards to explain 8 catch: /illegal_argument_exception/ 9 cluster.allocation_explain: {} 10 11 --- 12 "cluster shard allocation explanation test": 13 - skip: 14 version: " - 5.1.99" 15 reason: explain API response output was changed starting in 5.2.0 16 17 - do: 18 indices.create: 19 index: test 20 21 - match: { acknowledged: true } 22 23 - do: 24 cluster.state: 25 metric: [ master_node ] 26 27 - do: 28 cluster.allocation_explain: 29 body: { "index": "test", "shard": 0, "primary": true } 30 31 - match: { current_state: "started" } 32 - is_true: current_node.id 33 - match: { index: "test" } 34 - match: { shard: 0 } 35 - match: { primary: true } 36 - is_true: can_remain_on_current_node 37 - is_true: can_rebalance_cluster 38 - is_true: can_rebalance_to_other_node 39 - is_true: rebalance_explanation 40 41 --- 42 "cluster shard allocation explanation test with empty request": 43 - skip: 44 version: " - 5.1.99" 45 reason: explain API response output was changed starting in 5.2.0 46 47 - do: 48 indices.create: 49 index: test 50 body: { "index.number_of_shards": 1, "index.number_of_replicas": 9 } 51 52 - do: 53 cluster.state: 54 metric: [ master_node ] 55 56 - do: 57 cluster.allocation_explain: 58 include_disk_info: true 59 60 - match: { current_state: "unassigned" } 61 - match: { unassigned_info.reason: "INDEX_CREATED" } 62 - is_true: unassigned_info.at 63 - match: { index: "test" } 64 - match: { shard: 0 } 65 - match: { primary: false } 66 - is_true: cluster_info 67 - is_true: can_allocate