Skip to content

Commit

Permalink
change priority of RebootRebootOp
Browse files Browse the repository at this point in the history
  • Loading branch information
YZ775 committed Apr 18, 2024
1 parent 4f48336 commit 5798f89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,10 @@ func rebootOps(c *cke.Cluster, constraints *cke.Constraints, rebootArgs DecideOp
ops = append(ops, op.RebootCancelOp(rebootArgs.RebootCancelled))
return ops, phaseReboot
}
if len(rebootArgs.DrainCompleted) > 0 {
phaseReboot = true
ops = append(ops, op.RebootRebootOp(nf.HealthyAPIServer(), rebootArgs.DrainCompleted, &c.Reboot))
}
if len(rebootArgs.NewlyDrained) > 0 {
phaseReboot = true
sshCheckNodes := make([]*cke.Node, 0, len(nf.cluster.Nodes))
Expand All @@ -903,10 +907,6 @@ func rebootOps(c *cke.Cluster, constraints *cke.Constraints, rebootArgs DecideOp
ops = append(ops, op.RebootDrainStartOp(nf.HealthyAPIServer(), rebootArgs.NewlyDrained, &c.Reboot))
}
}
if len(rebootArgs.DrainCompleted) > 0 {
phaseReboot = true
ops = append(ops, op.RebootRebootOp(nf.HealthyAPIServer(), rebootArgs.DrainCompleted, &c.Reboot))
}
if len(rebootArgs.DrainTimedout) > 0 {
phaseReboot = true
ops = append(ops, op.RebootDrainTimeoutOp(rebootArgs.DrainTimedout))
Expand Down

0 comments on commit 5798f89

Please sign in to comment.