Skip to content

Commit

Permalink
scheduler: Disable failed replica reusage for SPDK
Browse files Browse the repository at this point in the history
Longhorn 7199

Signed-off-by: Shuo Wu <[email protected]>
  • Loading branch information
shuo-wu committed May 22, 2024
1 parent f056251 commit 2487388
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scheduler/replica_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,10 @@ func filterActiveReplicas(replicas map[string]*longhorn.Replica) map[string]*lon
}

func (rcs *ReplicaScheduler) CheckAndReuseFailedReplica(replicas map[string]*longhorn.Replica, volume *longhorn.Volume, hardNodeAffinity string) (*longhorn.Replica, error) {
if types.IsDataEngineV2(volume.Spec.DataEngine) {
return nil, nil
}

replicas = filterActiveReplicas(replicas)

allNodesInfo, err := rcs.getNodeInfo()
Expand Down Expand Up @@ -591,6 +595,10 @@ func (rcs *ReplicaScheduler) RequireNewReplica(replicas map[string]*longhorn.Rep
return 0
}

if types.IsDataEngineV2(volume.Spec.DataEngine) {
return 0
}

timeUntilNext, timeOfNext, err := rcs.timeToReplacementReplica(volume)
if err != nil {
msg := "Failed to get time until replica replacement, will directly replenish a new replica"
Expand Down

0 comments on commit 2487388

Please sign in to comment.