Skip to content

Commit

Permalink
Fix for "Process repair-queue"
Browse files Browse the repository at this point in the history
Signed-off-by: morimoto-cybozu <[email protected]>
  • Loading branch information
morimoto-cybozu committed Jan 23, 2024
1 parent df3960e commit cfa2b32
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion op/repair_drain_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (o *repairDrainStartOp) NextCommand() cke.Commander {

attempts := 1
if o.config.EvictRetries != nil {
attempts = *o.config.EvictRetries
attempts = *o.config.EvictRetries + 1
}
interval := 0 * time.Second
if o.config.EvictInterval != nil {
Expand Down
4 changes: 2 additions & 2 deletions phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (
PhaseEtcdMaintain = OperationPhase("etcd-maintain")
PhaseK8sMaintain = OperationPhase("k8s-maintain")
PhaseStopCP = OperationPhase("stop-control-plane")
PhaseRepairNodes = OperationPhase("repair-nodes")
PhaseRepairMachines = OperationPhase("repair-machines")
PhaseUncordonNodes = OperationPhase("uncordon-nodes")
PhaseRebootNodes = OperationPhase("reboot-nodes")
PhaseCompleted = OperationPhase("completed")
Expand All @@ -37,7 +37,7 @@ var AllOperationPhases = []OperationPhase{
PhaseEtcdMaintain,
PhaseK8sMaintain,
PhaseStopCP,
PhaseRepairNodes,
PhaseRepairMachines,
PhaseUncordonNodes,
PhaseRebootNodes,
PhaseCompleted,
Expand Down
4 changes: 2 additions & 2 deletions server/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ func DecideOps(c *cke.Cluster, cs *cke.ClusterStatus, constraints *cke.Constrain
if ops, phaseRepair := repairOps(c, cs, constraints, rebootArgs, nf); phaseRepair {
if !nf.EtcdIsGood() {
log.Warn("cannot repair machines because etcd cluster is not responding and in-sync", nil)
return nil, cke.PhaseRepairNodes
return nil, cke.PhaseRepairMachines
}
return ops, cke.PhaseRepairNodes
return ops, cke.PhaseRepairMachines
}

// 11. Reboot nodes if reboot request has been arrived to the reboot queue, and the number of unreachable nodes is less than a threshold.
Expand Down

0 comments on commit cfa2b32

Please sign in to comment.