Skip to content

Commit d3fcdb1

Browse files
Simplify rollout planner
1 parent 6d490b2 commit d3fcdb1

7 files changed

+207
-88
lines changed

internal/controllers/machinedeployment/machinedeployment_rollout_planner_test.go

Lines changed: 73 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"fmt"
2222
"math/rand"
2323
"os"
24+
"slices"
2425
"sort"
2526
"strconv"
2627
"strings"
@@ -505,13 +506,13 @@ func machineSetControllerMutator(log *fileLogger, ms *clusterv1.MachineSet, scop
505506
// TODO(in-place): when implementing in-place changes in the MachineSetController code make sure to:
506507
// - detect if there are replicas still pending AcknowledgeMove first, including also handling cleanup of the pendingAcknowledgeMoveAnnotationName on machines
507508
// - when deleting or moving
508-
// - first move if possible, then delete
509-
// - move machines should be capped to avoid unnecessary in-place upgrades (in case of scale down in the middle of rollouts); remaining part should be deleted
510-
// - do not move machines pending a move Acknowledge, with an in-place upgrade in progress, deleted or marked for deletion, unhealthy
509+
// - move or delete are mutually exclusive
510+
// - do not move machines pending a move Acknowledge, with an in-place upgrade in progress, deleted or marked for deletion (TBD if to be remediated)
511+
// - when deleting, machines updating in place should have higher priority than other machines (first get rid of not at the desired state/try to avoid unnecessary work; also those machines are unavailable).
511512

512513
// Sort machines to ensure stable results of move/delete operations during tests.
513514
// TODO(in-place): this should not be implemented in production code for the MachineSet controller
514-
sortMachineSetMachines(scope.machineSetMachines[ms.Name])
515+
sortMachineSetMachinesByName(scope.machineSetMachines[ms.Name])
515516

516517
// Removing updatingInPlaceAnnotation from machines after pendingAcknowledgeMove is gone in a previous reconcile (so inPlaceUpdating lasts one reconcile more)
517518
// NOTE: This is a testing workaround to simulate inPlaceUpdating being completed; it is implemented in the fake MachineSet controller
@@ -620,27 +621,21 @@ func machineSetControllerMutator(log *fileLogger, ms *clusterv1.MachineSet, scop
620621
return errors.Errorf("[MS controller] - PANIC! %s is set to send replicas to %s, which does not exists", ms.Name, targetMSName)
621622
}
622623

623-
// Limit the number of machines to be moved to avoid to exceed the final number of replicas for the target MS.
624-
// TODO(in-place): consider using the DesiredReplicasAnnotation which is propagated together with the other decisions of the rollout planner
625-
// another option to consider is to shift this check on the newMS (so we perform move, but we don't start the in-place upgrade).
626-
machinesToMove := min(machinesToDeleteOrMove, ptr.Deref(scope.machineDeployment.Spec.Replicas, 0)-ptr.Deref(targetMS.Spec.Replicas, 0))
627-
if machinesToMove != machinesToDeleteOrMove {
628-
log.Logf("[MS controller] - Move capped to %d replicas to avoid unnecessary in-place upgrades", machinesToMove)
629-
}
630-
machinesToDeleteOrMove -= machinesToMove
631-
632624
validSourceMSs := targetMS.Annotations[clusterv1.MachineSetReceiveMachinesFromMachineSetsAnnotation]
633625
sourcesSet := sets.Set[string]{}
634626
sourcesSet.Insert(strings.Split(validSourceMSs, ",")...)
635627
if !sourcesSet.Has(ms.Name) {
636628
return errors.Errorf("[MS controller] - PANIC! %s is set to send replicas to %s, but %[2]s only accepts machines from %s", ms.Name, targetMS.Name, validSourceMSs)
637629
}
638630

631+
// Always move all the machine that can be moved.
632+
// In case the target machine set will end up with more machines than its target replica number, it will take care of this.
633+
machinesToMove := machinesToDeleteOrMove
639634
machinesMoved := []string{}
640635
machinesSetMachines := []*clusterv1.Machine{}
641636
for i, m := range scope.machineSetMachines[ms.Name] {
642-
// Make sure we are not moving machines still pending AcknowledgeMove
643-
if notAcknowledgeMoveReplicas.Has(m.Name) {
637+
// Make sure we are not moving machines still updating in place (this includes also machines still pending AcknowledgeMove).
638+
if _, ok := m.Annotations[clusterv1.UpdateInProgressAnnotation]; ok {
644639
machinesSetMachines = append(machinesSetMachines, m)
645640
continue
646641
}
@@ -672,31 +667,39 @@ func machineSetControllerMutator(log *fileLogger, ms *clusterv1.MachineSet, scop
672667

673668
// Sort machines of the target MS to ensure consistent reporting during tests.
674669
// Note: this is required because a machine can be moved to a target MachineSet that has been already reconciled before the source MachineSet (it won't sort machine by itself until the next reconcile).
675-
sortMachineSetMachines(scope.machineSetMachines[targetMS.Name])
670+
sortMachineSetMachinesByName(scope.machineSetMachines[targetMS.Name])
676671
}
677-
}
678-
}
679-
680-
if machinesToDeleteOrMove > 0 {
681-
machinesToDelete := machinesToDeleteOrMove
682-
machinesDeleted := []string{}
683-
machinesSetMachines := []*clusterv1.Machine{}
684-
for i, m := range scope.machineSetMachines[ms.Name] {
685-
// Prevent deletion of machines not yet acknowledged after a move operation.
686-
// Note: as soon as an in-place upgrade is started, CAPI Should always try to complete it
687-
// before taking further actions on the same machine.
688-
if notAcknowledgeMoveReplicas.Has(m.Name) {
689-
machinesSetMachines = append(machinesSetMachines, m)
690-
continue
691-
}
692-
if int32(len(machinesDeleted)) >= machinesToDelete {
693-
machinesSetMachines = append(machinesSetMachines, scope.machineSetMachines[ms.Name][i:]...)
694-
break
672+
} else {
673+
machinesToDelete := machinesToDeleteOrMove
674+
machinesDeleted := []string{}
675+
676+
// Note: in the test code exceeding machines are deleted in predictable order, so it is easier to write test case and validate rollout sequences.
677+
// e.g. if a ms has m1,m2,m3 created in this order, m1 will be deleted first, then m2 and finally m3.
678+
// note: In case the system has to delete some replicas, and those replicas are still updating in place, they gets deleted first.
679+
//
680+
// This prevents the system to perform unnecessary in-place updates. e.g.
681+
// - In place rollout of MD with 3 Replicas, maxSurge 1, MaxUnavailable 0
682+
// - First create m4 to create a buffer for doing in place
683+
// - Move old machines (m1, m2, m3)
684+
// - Resulting new MS at this point has 4 replicas m1, m2, m3 (updating in place) and (m4).
685+
// - The system scales down MS, and the system does this getting rid of m3 - the last replica that started in place.
686+
machinesSetMachinesSortedByDeletePriority := sortMachineSetMachinesByDeletionPriorityAndName(scope.machineSetMachines[ms.Name])
687+
machinesSetMachines := []*clusterv1.Machine{}
688+
for i, m := range machinesSetMachinesSortedByDeletePriority {
689+
if int32(len(machinesDeleted)) >= machinesToDelete {
690+
machinesSetMachines = append(machinesSetMachines, machinesSetMachinesSortedByDeletePriority[i:]...)
691+
break
692+
}
693+
machinesDeleted = append(machinesDeleted, m.Name)
695694
}
696-
machinesDeleted = append(machinesDeleted, m.Name)
695+
scope.machineSetMachines[ms.Name] = machinesSetMachines
696+
697+
// Sort machines of the target MS to ensure consistent reporting during tests.
698+
// Note: this is required specifically by the test code because a machine can be moved to a target MachineSet that has been already
699+
// reconciled before the source MachineSet (it won't sort machine by itself until the next reconcile), and test machinery assumes machine are sorted.
700+
sortMachineSetMachinesByName(scope.machineSetMachines[ms.Name])
701+
log.Logf("[MS controller] - %s scale down to %d/%[2]d replicas (%s deleted)", ms.Name, ptr.Deref(ms.Spec.Replicas, 0), strings.Join(machinesDeleted, ","))
697702
}
698-
scope.machineSetMachines[ms.Name] = machinesSetMachines
699-
log.Logf("[MS controller] - %s scale down to %d/%[2]d replicas (%s deleted)", ms.Name, ptr.Deref(ms.Spec.Replicas, 0), strings.Join(machinesDeleted, ","))
700703
}
701704

702705
// Update counters
@@ -1041,12 +1044,41 @@ func (l *fileLogger) WriteLogAndCompareWithGoldenFile() (string, string, error)
10411044
return current, golden, nil
10421045
}
10431046

1044-
func sortMachineSetMachines(machines []*clusterv1.Machine) {
1047+
func sortMachineSetMachinesByName(machines []*clusterv1.Machine) {
10451048
sort.Slice(machines, func(i, j int) bool {
1046-
iIndex, _ := strconv.Atoi(strings.TrimPrefix(machines[i].Name, "m"))
1047-
jiIndex, _ := strconv.Atoi(strings.TrimPrefix(machines[j].Name, "m"))
1048-
return iIndex < jiIndex
1049+
iNameIndex, _ := strconv.Atoi(strings.TrimPrefix(machines[i].Name, "m"))
1050+
jNameIndex, _ := strconv.Atoi(strings.TrimPrefix(machines[j].Name, "m"))
1051+
return iNameIndex < jNameIndex
1052+
})
1053+
}
1054+
1055+
func sortMachineSetMachinesByDeletionPriorityAndName(machines []*clusterv1.Machine) []*clusterv1.Machine {
1056+
machinesSetMachinesSortedByDeletePriority := slices.Clone(machines)
1057+
1058+
// Note: machines updating in place must be deleted first.
1059+
// in case of ties:
1060+
// - if both machines are updating in place, delete first the machine with the highest machine NameIndex (e.g. between m3 and m4, pick m4, aka the last machine being moved)
1061+
// - if both machines are not updating in place, delete first the machine with the lowest machine NameIndex (e.g. between m3 and m4, pick m3)
1062+
sort.Slice(machinesSetMachinesSortedByDeletePriority, func(i, j int) bool {
1063+
iPriority := 100
1064+
if _, ok := machinesSetMachinesSortedByDeletePriority[i].Annotations[clusterv1.UpdateInProgressAnnotation]; ok {
1065+
iPriority = 1
1066+
}
1067+
jPriority := 100
1068+
if _, ok := machinesSetMachinesSortedByDeletePriority[j].Annotations[clusterv1.UpdateInProgressAnnotation]; ok {
1069+
jPriority = 1
1070+
}
1071+
if iPriority == jPriority {
1072+
iNameIndex, _ := strconv.Atoi(strings.TrimPrefix(machinesSetMachinesSortedByDeletePriority[i].Name, "m"))
1073+
jNameIndex, _ := strconv.Atoi(strings.TrimPrefix(machinesSetMachinesSortedByDeletePriority[j].Name, "m"))
1074+
if iPriority == 1 {
1075+
return iNameIndex > jNameIndex
1076+
}
1077+
return iNameIndex < jNameIndex
1078+
}
1079+
return iPriority < jPriority
10491080
})
1081+
return machinesSetMachinesSortedByDeletePriority
10501082
}
10511083

10521084
// default task order ensure the controllers are run in a consistent and predictable way: md, ms1, ms2 and so on.

internal/controllers/machinedeployment/testdata/rollingupdate/in-place rollout, 12 replicas, maxsurge 3, maxunavailable 1, scale down to 6, random(0).test.log.golden

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,19 @@
1818
- ms2, 3/3 replicas (m1,m2,m3 <= ms1)
1919
[Toleration] tolerate maxSurge breach
2020
[MS controller] Iteration 2, Reconcile ms1, 9/2 replicas (m4,m5,m6,m7,m8,m9,m10,m11,m12 => ms2)
21-
[MS controller] - Move capped to 3 replicas to avoid unnecessary in-place upgrades
22-
[MS controller] - ms1 scale down to 6/2 replicas (m4,m5,m6 moved to ms2)
23-
[MS controller] - ms1 scale down to 2/2 replicas (m7,m8,m9,m10 deleted)
21+
[MS controller] - ms1 scale down to 2/2 replicas (m4,m5,m6,m7,m8,m9,m10 moved to ms2)
2422
[MS controller] Iteration 2, Reconcile ms1, 2/2 replicas (m11,m12 => ms2)
2523
[MD controller] Iteration 3, Reconcile md
2624
[MD controller] - Input to rollout planner
2725
md, 12/6 replicas
2826
- ms1, 2/2 replicas (m11,m12 => ms2)
29-
- ms2, 3/3 replicas (m1,m2,m3,m4🟠🟡,m5🟠🟡,m6🟠🟡 <= ms1)
27+
- ms2, 3/3 replicas (m1,m2,m3,m4🟠🟡,m5🟠🟡,m6🟠🟡,m7🟠🟡,m8🟠🟡,m9🟠🟡,m10🟠🟡 <= ms1)
3028
[MD controller] - Result of rollout planner
3129
md, 5/6 replicas
3230
- ms1, 2/2 replicas (m11,m12 => ms2)
33-
- ms2, 3/6 replicas (m1,m2,m3,m4🟡,m5🟡,m6🟡 <= ms1)
34-
[MS controller] Iteration 3, Reconcile ms2, 3/6 replicas (m1,m2,m3,m4🟡,m5🟡,m6🟡 <= ms1)
31+
- ms2, 3/6 replicas (m1,m2,m3,m4🟡,m5🟡,m6🟡,m7🟡,m8🟡,m9🟡,m10🟡 <= ms1)
32+
[MS controller] Iteration 3, Reconcile ms2, 3/6 replicas (m1,m2,m3,m4🟡,m5🟡,m6🟡,m7🟡,m8🟡,m9🟡,m10🟡 <= ms1)
33+
[MS controller] - ms2 scale down to 6/6 replicas (m10,m9,m8,m7 deleted)
3534
[MD controller] Iteration 4, Reconcile md
3635
[MD controller] - Input to rollout planner
3736
md, 5/6 replicas
@@ -75,12 +74,24 @@
7574
- ms1, 2/0 replicas (m11,m12 => ms2)
7675
- ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6 <= ms1)
7776
[MS controller] Iteration 8, Reconcile ms1, 2/0 replicas (m11,m12 => ms2)
78-
[MS controller] - Move capped to 0 replicas to avoid unnecessary in-place upgrades
79-
[MS controller] - ms1 scale down to 2/0 replicas ( moved to ms2)
80-
[MS controller] - ms1 scale down to 0/0 replicas (m11,m12 deleted)
81-
[MS controller] Iteration 9, Reconcile ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6 <= ms1)
77+
[MS controller] - ms1 scale down to 0/0 replicas (m11,m12 moved to ms2)
78+
[MS controller] Iteration 9, Reconcile ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6,m11🟠🟡,m12🟠🟡 <= ms1)
79+
[MS controller] - Replicas m11,m12 moved from an old MachineSet still pending acknowledge from machine deployment md
8280
[MS controller] Iteration 9, Reconcile ms1, 0/0 replicas ( => ms2)
8381
[MD controller] Iteration 9, Reconcile md
82+
[MD controller] - Input to rollout planner
83+
md, 8/6 replicas
84+
- ms1, 0/0 replicas ( => ms2)
85+
- ms2, 8/6 replicas (m1,m2,m3,m4,m5,m6,m11🟠🟡,m12🟠🟡 <= ms1)
86+
[MD controller] - Result of rollout planner
87+
md, 8/6 replicas
88+
- ms1, 0/0 replicas ( => ms2)
89+
- ms2, 8/6 replicas (m1,m2,m3,m4,m5,m6,m11🟡,m12🟡 <= ms1)
90+
[MS controller] Iteration 10, Reconcile ms2, 8/6 replicas (m1,m2,m3,m4,m5,m6,m11🟡,m12🟡 <= ms1)
91+
[MS controller] - ms2 scale down to 6/6 replicas (m12,m11 deleted)
92+
[MS controller] Iteration 10, Reconcile ms1, 0/0 replicas ( => ms2)
93+
[MS controller] Iteration 11, Reconcile ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6 <= ms1)
94+
[MD controller] Iteration 11, Reconcile md
8495
[MD controller] - Input to rollout planner
8596
md, 8/6 replicas
8697
- ms1, 0/0 replicas ( => ms2)

internal/controllers/machinedeployment/testdata/rollingupdate/in-place rollout, 12 replicas, maxsurge 3, maxunavailable 1, scale down to 6.test.log.golden

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@
1616
- ms2, 3/3 replicas (m1,m2,m3 <= ms1)
1717
[Toleration] tolerate maxSurge breach
1818
[MS controller] Iteration 1, Reconcile ms1, 9/2 replicas (m4,m5,m6,m7,m8,m9,m10,m11,m12 => ms2)
19-
[MS controller] - Move capped to 3 replicas to avoid unnecessary in-place upgrades
20-
[MS controller] - ms1 scale down to 6/2 replicas (m4,m5,m6 moved to ms2)
21-
[MS controller] - ms1 scale down to 2/2 replicas (m7,m8,m9,m10 deleted)
22-
[MS controller] Iteration 1, Reconcile ms2, 3/3 replicas (m1,m2,m3,m4🟠🟡,m5🟠🟡,m6🟠🟡 <= ms1)
23-
[MS controller] - Replicas m4,m5,m6 moved from an old MachineSet still pending acknowledge from machine deployment md
19+
[MS controller] - ms1 scale down to 2/2 replicas (m4,m5,m6,m7,m8,m9,m10 moved to ms2)
20+
[MS controller] Iteration 1, Reconcile ms2, 3/3 replicas (m1,m2,m3,m4🟠🟡,m5🟠🟡,m6🟠🟡,m7🟠🟡,m8🟠🟡,m9🟠🟡,m10🟠🟡 <= ms1)
21+
[MS controller] - Replicas m10,m4,m5,m6,m7,m8,m9 moved from an old MachineSet still pending acknowledge from machine deployment md
2422
[MD controller] Iteration 2, Reconcile md
2523
[MD controller] - Input to rollout planner
2624
md, 12/6 replicas
2725
- ms1, 2/2 replicas (m11,m12 => ms2)
28-
- ms2, 6/3 replicas (m1,m2,m3,m4🟠🟡,m5🟠🟡,m6🟠🟡 <= ms1)
26+
- ms2, 10/3 replicas (m1,m2,m3,m4🟠🟡,m5🟠🟡,m6🟠🟡,m7🟠🟡,m8🟠🟡,m9🟠🟡,m10🟠🟡 <= ms1)
2927
[MD controller] - Result of rollout planner
30-
md, 8/6 replicas
28+
md, 12/6 replicas
3129
- ms1, 2/2 replicas (m11,m12 => ms2)
32-
- ms2, 6/6 replicas (m1,m2,m3,m4🟡,m5🟡,m6🟡 <= ms1)
30+
- ms2, 10/6 replicas (m1,m2,m3,m4🟡,m5🟡,m6🟡,m7🟡,m8🟡,m9🟡,m10🟡 <= ms1)
31+
[Toleration] tolerate maxSurge breach
3332
[MS controller] Iteration 2, Reconcile ms1, 2/2 replicas (m11,m12 => ms2)
34-
[MS controller] Iteration 2, Reconcile ms2, 6/6 replicas (m1,m2,m3,m4🟡,m5🟡,m6🟡 <= ms1)
33+
[MS controller] Iteration 2, Reconcile ms2, 10/6 replicas (m1,m2,m3,m4🟡,m5🟡,m6🟡,m7🟡,m8🟡,m9🟡,m10🟡 <= ms1)
34+
[MS controller] - ms2 scale down to 6/6 replicas (m10,m9,m8,m7 deleted)
3535
[MD controller] Iteration 3, Reconcile md
3636
[MD controller] - Input to rollout planner
37-
md, 8/6 replicas
37+
md, 12/6 replicas
3838
- ms1, 2/2 replicas (m11,m12 => ms2)
3939
- ms2, 6/6 replicas (m1,m2,m3,m4🟡,m5🟡,m6🟡 <= ms1)
4040
[MD controller] - Result of rollout planner
@@ -54,11 +54,22 @@
5454
- ms1, 2/0 replicas (m11,m12 => ms2)
5555
- ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6 <= ms1)
5656
[MS controller] Iteration 4, Reconcile ms1, 2/0 replicas (m11,m12 => ms2)
57-
[MS controller] - Move capped to 0 replicas to avoid unnecessary in-place upgrades
58-
[MS controller] - ms1 scale down to 2/0 replicas ( moved to ms2)
59-
[MS controller] - ms1 scale down to 0/0 replicas (m11,m12 deleted)
60-
[MS controller] Iteration 4, Reconcile ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6 <= ms1)
57+
[MS controller] - ms1 scale down to 0/0 replicas (m11,m12 moved to ms2)
58+
[MS controller] Iteration 4, Reconcile ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6,m11🟠🟡,m12🟠🟡 <= ms1)
59+
[MS controller] - Replicas m11,m12 moved from an old MachineSet still pending acknowledge from machine deployment md
6160
[MD controller] Iteration 5, Reconcile md
61+
[MD controller] - Input to rollout planner
62+
md, 8/6 replicas
63+
- ms1, 0/0 replicas ( => ms2)
64+
- ms2, 8/6 replicas (m1,m2,m3,m4,m5,m6,m11🟠🟡,m12🟠🟡 <= ms1)
65+
[MD controller] - Result of rollout planner
66+
md, 8/6 replicas
67+
- ms1, 0/0 replicas ( => ms2)
68+
- ms2, 8/6 replicas (m1,m2,m3,m4,m5,m6,m11🟡,m12🟡 <= ms1)
69+
[MS controller] Iteration 5, Reconcile ms1, 0/0 replicas ( => ms2)
70+
[MS controller] Iteration 5, Reconcile ms2, 8/6 replicas (m1,m2,m3,m4,m5,m6,m11🟡,m12🟡 <= ms1)
71+
[MS controller] - ms2 scale down to 6/6 replicas (m12,m11 deleted)
72+
[MD controller] Iteration 6, Reconcile md
6273
[MD controller] - Input to rollout planner
6374
md, 8/6 replicas
6475
- ms1, 0/0 replicas ( => ms2)
@@ -67,8 +78,8 @@
6778
md, 6/6 replicas
6879
- ms1, 0/0 replicas ( => ms2)
6980
- ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6 <= ms1)
70-
[MS controller] Iteration 5, Reconcile ms1, 0/0 replicas ( => ms2)
71-
[MS controller] Iteration 5, Reconcile ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6 <= ms1)
81+
[MS controller] Iteration 6, Reconcile ms1, 0/0 replicas ( => ms2)
82+
[MS controller] Iteration 6, Reconcile ms2, 6/6 replicas (m1,m2,m3,m4,m5,m6 <= ms1)
7283
[Test] Final state
7384
md, 6/6 replicas
7485
- ms1, 0/0 replicas ( => ms2)

internal/controllers/machinedeployment/testdata/rollingupdate/in-place rollout, 3 replicas, maxsurge 1, maxunavailable 0, random(0).test.log.golden

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,28 @@
128128
[MS controller] Iteration 16, Reconcile ms2, 3/3 replicas (m1,m2,m4 <= ms1)
129129
[MS controller] Iteration 16, Reconcile ms2, 3/3 replicas (m1,m2,m4 <= ms1)
130130
[MS controller] Iteration 16, Reconcile ms1, 1/0 replicas (m3 => ms2)
131-
[MS controller] - Move capped to 0 replicas to avoid unnecessary in-place upgrades
132-
[MS controller] - ms1 scale down to 1/0 replicas ( moved to ms2)
133-
[MS controller] - ms1 scale down to 0/0 replicas (m3 deleted)
131+
[MS controller] - ms1 scale down to 0/0 replicas (m3 moved to ms2)
134132
[MD controller] Iteration 16, Reconcile md
135133
[MD controller] - Input to rollout planner
136134
md, 4/3 replicas
137135
- ms1, 0/0 replicas ( => ms2)
138-
- ms2, 3/3 replicas (m1,m2,m4 <= ms1)
136+
- ms2, 3/3 replicas (m1,m2,m3🟠🟡,m4 <= ms1)
139137
[MD controller] - Result of rollout planner
140138
md, 3/3 replicas
141139
- ms1, 0/0 replicas ( => ms2)
142-
- ms2, 3/3 replicas (m1,m2,m4 <= ms1)
140+
- ms2, 3/3 replicas (m1,m2,m3🟡,m4 <= ms1)
141+
[MD controller] Iteration 17, Reconcile md
142+
[MD controller] - Input to rollout planner
143+
md, 3/3 replicas
144+
- ms1, 0/0 replicas ( => ms2)
145+
- ms2, 3/3 replicas (m1,m2,m3🟡,m4 <= ms1)
146+
[MD controller] - Result of rollout planner
147+
md, 3/3 replicas
148+
- ms1, 0/0 replicas ( => ms2)
149+
- ms2, 3/3 replicas (m1,m2,m3🟡,m4 <= ms1)
150+
[MS controller] Iteration 17, Reconcile ms2, 3/3 replicas (m1,m2,m3🟡,m4 <= ms1)
151+
[MS controller] - ms2 scale down to 3/3 replicas (m3 deleted)
152+
[MS controller] Iteration 17, Reconcile ms1, 0/0 replicas ( => ms2)
143153
[Test] Final state
144154
md, 3/3 replicas
145155
- ms1, 0/0 replicas ( => ms2)

0 commit comments

Comments
 (0)