From 03e6b2797d6819dbb69fb4e4c408ae9311a33610 Mon Sep 17 00:00:00 2001
From: "Robin D." <rdeeboonchai@microsoft.com>
Date: Wed, 22 Jan 2025 13:20:38 -0800
Subject: [PATCH] chore: remove unnecessary logs on fast delete and add a
 relevant note (#7736)

---
 .../cloudprovider/azure/azure_scale_set_instance_cache.go     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cluster-autoscaler/cloudprovider/azure/azure_scale_set_instance_cache.go b/cluster-autoscaler/cloudprovider/azure/azure_scale_set_instance_cache.go
index 0b58a36e57..4bbcdb06f0 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_scale_set_instance_cache.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_scale_set_instance_cache.go
@@ -231,7 +231,8 @@ func (scaleSet *ScaleSet) instanceStatusFromVM(vm *compute.VirtualMachineScaleSe
 			// ProvisioningState represents the most recent provisioning state, therefore only report
 			// InstanceCreating errors when the power state indicates the instance has not yet started running
 			if !isRunningVmPowerState(powerState) {
-				klog.V(4).Infof("VM %s reports failed provisioning state with non-running power state: %s", *vm.ID, powerState)
+				// This fast deletion relies on the fact that InstanceCreating + ErrorInfo will subsequently trigger a deletion.
+				// Could be revisited to rely on something more stable/explicit.
 				status.State = cloudprovider.InstanceCreating
 				status.ErrorInfo = &cloudprovider.InstanceErrorInfo{
 					ErrorClass:   cloudprovider.OutOfResourcesErrorClass,
@@ -239,7 +240,6 @@ func (scaleSet *ScaleSet) instanceStatusFromVM(vm *compute.VirtualMachineScaleSe
 					ErrorMessage: "Azure failed to provision a node for this node group",
 				}
 			} else {
-				klog.V(5).Infof("VM %s reports a failed provisioning state but is running (%s)", *vm.ID, powerState)
 				status.State = cloudprovider.InstanceRunning
 			}
 		}
-- 
GitLab