From d4f6e956f26dac5db80ca2b2f029285b93910e7d Mon Sep 17 00:00:00 2001 From: willie-yao Date: Fri, 22 Nov 2024 19:05:16 +0000 Subject: [PATCH] Set node state to InstanceCreating to delete on CSE error --- .../cloudprovider/azure/azure_scale_set_instance_cache.go | 1 + 1 file changed, 1 insertion(+) 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 e186e1cf666b..0b58a36e57e5 100644 --- a/cluster-autoscaler/cloudprovider/azure/azure_scale_set_instance_cache.go +++ b/cluster-autoscaler/cloudprovider/azure/azure_scale_set_instance_cache.go @@ -251,6 +251,7 @@ func (scaleSet *ScaleSet) instanceStatusFromVM(vm *compute.VirtualMachineScaleSe if scaleSet.enableDetailedCSEMessage && vm.InstanceView != nil { if err, failed := scaleSet.cseErrors(vm.InstanceView.Extensions); failed { klog.V(3).Infof("VM %s reports CSE failure: %v, with provisioning state %s, power state %s", to.String(vm.ID), err, to.String(vm.ProvisioningState), powerState) + status.State = cloudprovider.InstanceCreating errorInfo := &cloudprovider.InstanceErrorInfo{ ErrorClass: cloudprovider.OtherErrorClass, ErrorCode: vmssExtensionProvisioningFailed,