Skip to content

Commit

Permalink
Fix not to change status of repair-queue's finished entry
Browse files Browse the repository at this point in the history
This commit is for the following situation:
* there is a finished entry in the repair queue, especially failed one
* a new entry with the same target address is queued
* the target machine becomes healthy

The results of health check are indexed by the target machine's address,
not by the entry ID.
Though health check is not executed for a finished entry, check for
another entry with the same target address can change the status of
the failed entry into "succeeded."
This commit prevents it.

Signed-off-by: morimoto-cybozu <[email protected]>
  • Loading branch information
morimoto-cybozu committed Apr 25, 2024
1 parent c78c22e commit a28e697
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,9 @@ func repairOps(c *cke.Cluster, cs *cke.ClusterStatus, constraints *cke.Constrain
ops = append(ops, op.RepairDequeueOp(entry))
continue
}
if entry.HasFinished() {
continue
}
if rqs.RepairCompleted[entry.Address] {
ops = append(ops, op.RepairFinishOp(entry, true))
continue
Expand Down

0 comments on commit a28e697

Please sign in to comment.