Cannot allocate replica shard to a node with version [7.10.2] since this is older than the primary version [1.2.4]

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
When we upgrade our application from elastic search to opensearch this error is thrown in logs and there is the delay in upgrade.

Describe the issue:

helm upgrade get successful result, we have one of the data pods gets hanging on until its restarted to complete upgrade

Configuration:

Relevant Logs or Screenshots:

OpenSearch status: “yellow”
Unassigned/Initializing shards:
app-debug-logs-2022.10.18 1 r UNASSIGNED INDEX_CREATED
app-debug-logs-2022.10.18 4 r UNASSIGNED INDEX_CREATED
app-debug-logs-2022.10.18 2 r UNASSIGNED INDEX_CREATED
app-debug-logs-2022.10.18 0 r UNASSIGNED INDEX_CREATED
There are still some UNASSIGNED/INITIALIZING shards: 4
above r shards can not be allocated, and the reason is because:

{
“index” : “logs-2022.10.18”,
“shard” : 1,
“primary” : false,
“current_state” : “unassigned”,
“unassigned_info” : {
“reason” : “INDEX_CREATED”,
“at” : “2022-10-18T03:14:50.840Z”,
“last_allocation_status” : “no_attempt”
},
“can_allocate” : “no”,
“allocate_explanation” : “cannot allocate because allocation is not permitted to any of the nodes”,
“node_allocation_decisions” : [
{
“node_id” : “zzzzzzzzzzzzzg”,
“node_name” : “cvsdsdddfdfdata-0”,
“transport_address” : “zzzzz:1111”,
“node_decision” : “no”,
“weight_ranking” : 1,
“deciders” : [
{
“decider” : “node_version”,
“decision” : “NO”,
“explanation” : “cannot allocate replica shard to a node with version [7.10.2] since this is older than the primary version [1.2.4]”
}
]
},
{
“node_id” : “zzzzzzzzzzzQ”,
“node_name” : “aaaaaa1”,
“transport_address” : “aaaaaa:0000”,
“node_attributes” : {
“shard_indexing_pressure_enabled” : “true”
},
“node_decision” : “no”,
“weight_ranking” : 2,
“deciders” : [
{
“decider” : “same_shard”,
“decision” : “NO”,
“explanation” : “a copy of this shard is already allocated to this node [[logs-2022.10.18][1], node[LGWgkymERFG2jD-q-sjpAQ], [P], s[STARTED], a[id=I9i3fyapSwKK0MqrFDXpMQ]]”
}
]
}
]
}