Fix: Align auto-preservation eviction order with scale-down deletion priority - #1138
Conversation
df4a97a to
957b790
Compare
thiyyakat
left a comment
There was a problem hiding this comment.
Thanks for the quick fix, @aaronfern, and for updating the FAQ! Just a few nits from me.
Also, if it's not too much trouble, could you please add a similar test for the sorting performed in the case of mcd replica reduction as well?
|
Thanks for reviewing @thiyyakat |
|
Thanks! The changes look good to me. Just wanted to add a comment here for completeness: When autoPreserveFailedMachineMax is reduced, we stop auto-preservation based solely on PreserveExpiryTime (removing the machine whose preservation expires soonest first), unlike the more general ActiveMachine sort. There's no value in considering other criteria such as MachinePriority here because when PreserveExpiryTime values differ by only milliseconds, and we choose the machine with the earlier PreserveExpiryTime the choice is effectively arbitrary. /lgtm |
|
LGTM label has been added. DetailsGit tree hash: e812c9df4139341aebda490726c9493e8529b893 |
…PreserveExpiryTime instead of CreationTimestamp Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
d876f88 to
a62e1c9
Compare
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 932259ec620c29380ce68120f35073c4c7b88f95 |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: thiyyakat The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
We noticed an inconsistency between how auto-preserved failed machines are chosen for termination due to
mcs'sspec.replicareduction and how auto-preserve failed machines are chosen for termination due tomcs'sspec.autoPreserveFailedMachineMaxreduction.Currently when
spec.autoPreserveFailedMachineMaxis reduced, auto-preserved failed machines that have a nearerPreserveExpiryTimeare chosen for deletion, whereas whenspec.replicais reduced auto-preserved failed machines that have an earlierCreationTimestampare chosen for deletion.This PR aligns both these orderings to ensure that now auto-preserved failed machines are only ordered based on their
PreserveExpiryTimesWhich issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: