Hello @Leo Walker
Yes, a yellow OpenSearch cluster means the primary shards are allocated, but one or more replicas are unassigned. The cluster remains operational, but you don't currently have the intended replica redundancy.
Don't force the replica allocation as the first step. Start by identifying the unassigned shards:
GET /_cat/shards?v&h=index,shard,prirep,state,node,unassigned.reason
Then ask OpenSearch why one of them cannot be allocated:
POST /_cluster/allocation/explain?include_disk_info=true
{
"index": "<index-name>",
"shard": 0,
"primary": false
}
The Cluster Allocation Explain API will tell you which allocation decider is blocking that replica and why. Common causes include insufficient eligible data nodes, disk watermarks, allocation filters, shard limits, allocation awareness/forced awareness, or a disabled allocation.
A very common case is a single-data-node cluster with number_of_replicas: 1. OpenSearch won't place a primary and its replica on the same node, so that replica will intentionally remain unassigned. You cannot safely force it onto that same node.
In that situation, you either add another eligible data node or, if this is intentionally a single-node/non-HA environment, change the index replica count:
PUT /<index-name>/_settings
{
"index": {
"number_of_replicas": 0
}
}
If the allocation explanation instead shows something such as disk_threshold, filter, awareness, or shards_limit, fix that underlying condition rather than overriding it.
There is a manual /_cluster/reroute API, but OpenSearch describes it as an advanced mechanism. If you eventually need it, first test with:
POST /_cluster/reroute?dry_run=true&explain=true
If the shard previously failed allocation and you've corrected the underlying problem, you can also ask OpenSearch to retry failed allocations:
POST /_cluster/reroute?retry_failed=true
OpenSearch specifically recommends using dry_run=true before applying manual reroute commands in production.
If you can share the output of /_cluster/allocation/explain with host/index-sensitive information removed, we should be able to identify exactly why those replicas remain unassigned.
References:
OpenSearch - Cluster Allocation Explain API
OpenSearch - Cluster Reroute API
OpenSearch - Cluster Health API
Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.