Skip to content

Commit

Permalink
Force the shard on node1.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Sep 5, 2024
1 parent 119d07c commit 6a91120
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tests/routing/cluster/reroute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,28 @@ prologues:
- {director: Bennett Miller, title: Moneyball, year: 2011}
- {create: {_index: movies}}
- {director: Nicolas Winding Refn, title: Drive, year: 1960}
# force the shard on node1 in case it was created on node2
- path: /_cluster/reroute
method: POST
request:
payload:
commands:
- move:
index: movies
shard: 0
from_node: opensearch-node2
to_node: opensearch-node1
status: [200, 400]
epilogues:
- path: /movies
method: DELETE
status: [200, 404]
chapters:
- synopsis: Shows the allocation of shards in a cluster.
id: shard
path: /_cluster/reroute
method: POST
response:
status: 200
output:
node: payload.state.routing_table.indices.movies.shards.0[0].node
- synopsis: Shows the allocation of shards in a cluster with parameters.
path: /_cluster/reroute
method: POST
Expand All @@ -52,7 +61,7 @@ chapters:
- move:
index: movies
shard: 0
from_node: ${shard.node}
from_node: opensearch-node1
to_node: opensearch-node2
response:
status: 200

0 comments on commit 6a91120

Please sign in to comment.