Skip to content

Commit 83a2b64

Browse files
committed
Revert unneded changes from #7868 and #7820
1 parent a946d3d commit 83a2b64

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cluster-autoscaler/core/scaledown/actuation/actuator_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,9 +1302,7 @@ func runStartDeletionTest(t *testing.T, tc startDeletionTestCase, force bool) {
13021302
// Verify ScaleDownNodes looks as expected.
13031303
ignoreSdNodeOrder := cmpopts.SortSlices(func(a, b *status.ScaleDownNode) bool { return a.Node.Name < b.Node.Name })
13041304
cmpNg := cmp.Comparer(func(a, b *testprovider.TestNodeGroup) bool { return a.Id() == b.Id() })
1305-
// Nodes will have deletion taints, skipping them here since we check them later
1306-
ignoreTaints := cmpopts.IgnoreFields(apiv1.NodeSpec{}, "Taints")
1307-
statusCmpOpts := cmp.Options{ignoreSdNodeOrder, cmpNg, cmpopts.EquateEmpty(), ignoreTaints}
1305+
statusCmpOpts := cmp.Options{ignoreSdNodeOrder, cmpNg, cmpopts.EquateEmpty()}
13081306
if diff := cmp.Diff(wantScaleDownNodes, gotScaleDownNodes, statusCmpOpts); diff != "" {
13091307
t.Errorf("StartDeletion scaled down nodes diff (-want +got):\n%s", diff)
13101308
}

cluster-autoscaler/core/scaledown/actuation/delete_in_batch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ func CleanUpAndRecordFailedScaleDownEvent(ctx *context.AutoscalingContext, node
206206
klog.Errorf("Scale-down: "+logMsgFormat+", %v, status error: %v", node.Name, errMsg, status.Err)
207207
}
208208
ctx.Recorder.Eventf(node, apiv1.EventTypeWarning, "ScaleDownFailed", eventMsgFormat+": %v", status.Err)
209-
taints.CleanToBeDeleted(node.DeepCopy(), ctx.ClientSet, ctx.CordonNodeBeforeTerminate)
209+
taints.CleanToBeDeleted(node, ctx.ClientSet, ctx.CordonNodeBeforeTerminate)
210210
nodeDeletionTracker.EndDeletion(nodeGroupId, node.Name, status)
211211
}
212212

0 commit comments

Comments
 (0)