Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
If machine is in phase InPlaceUpdating it should not be moved to ne…
…w machine set
  • Loading branch information
acumino committed Jul 22, 2025
commit 43d128d7e5df9de99dc47e82ef884e0eeb7760a1
2 changes: 1 addition & 1 deletion pkg/controller/deployment_inplace.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (dc *controller) transferMachinesFromOldToNewMachineSet(ctx context.Context
}

cond := getMachineCondition(oldMachine, v1alpha1.NodeInPlaceUpdate)
if isUpdateNotSuccessful(cond, node.Labels) {
if isUpdateNotSuccessful(cond, node.Labels) || oldMachine.Status.CurrentStatus.Phase == v1alpha1.MachineInPlaceUpdating {
continue
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/deployment_inplace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ var _ = Describe("deployment_inplace", func() {
controlMachineObjects = append(controlMachineObjects, oldMachineSet, newMachineSet)

machines := []*machinev1.Machine{}
machines = append(machines, newMachinesFromMachineSet(int(data.setup.oldMachineSetReplicas), oldMachineSet, &machinev1.MachineStatus{}, nil, map[string]string{"key": "value"})...)
machines = append(machines, newMachinesFromMachineSet(int(data.setup.oldMachineSetReplicas), oldMachineSet, &machinev1.MachineStatus{CurrentStatus: machinev1.CurrentStatus{Phase: machinev1.MachineInPlaceUpdateSuccessful}}, nil, map[string]string{"key": "value"})...)
machines = append(machines, newMachinesFromMachineSet(int(data.setup.newMachineSetReplicas), newMachineSet, &machinev1.MachineStatus{}, nil, nil)...)
machinesWithUpdateSuccessful := 0
for i := range machines {
Expand Down