kubernetes/kops · error

waiting for VMSS VM deletion completion: %w

Error message

waiting for VMSS VM deletion completion: %w

What it means

Wraps the PollUntilDone failure while waiting for an Azure VMSS VM deletion LRO (long-running operation) to finish. Fires when polling the operation fails or the operation itself ends in a failed state (e.g. the instance could not be deallocated/deleted).

Source

Thrown at upup/pkg/fi/cloudup/azure/vmscalesetvm.go:58

	var l []*compute.VirtualMachineScaleSetVM
	pager := c.c.NewListPager(resourceGroupName, vmssName, nil)
	for pager.More() {
		resp, err := pager.NextPage(ctx)
		if err != nil {
			return nil, fmt.Errorf("listing VMSS VMs: %w", err)
		}
		l = append(l, resp.Value...)
	}
	return l, nil
}

func (c *vmScaleSetVMsClientImpl) Delete(ctx context.Context, resourceGroupName, vmssName, instanceId string) error {
	future, err := c.c.BeginDelete(ctx, resourceGroupName, vmssName, instanceId, nil)
	if err != nil {
		return fmt.Errorf("deleting VMSS VM: %w", err)
	}
	if _, err = future.PollUntilDone(ctx, nil); err != nil {
		return fmt.Errorf("waiting for VMSS VM deletion completion: %w", err)
	}
	return nil
}

func newVMScaleSetVMsClientImpl(subscriptionID string, cred *azidentity.DefaultAzureCredential) (*vmScaleSetVMsClientImpl, error) {
	c, err := compute.NewVirtualMachineScaleSetVMsClient(subscriptionID, cred, nil)
	if err != nil {
		return nil, fmt.Errorf("creating VMSS VMs client: %w", err)
	}
	return &vmScaleSetVMsClientImpl{
		c: c,
	}, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check the operation error in the Azure portal / activity log for why deletion failed
  2. Resolve blocking dependencies (attached disks, leases) and retry the delete
  3. Verify quotas and permissions were not exceeded during deletion
  4. Retry the operation once the transient failure clears
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/azure/vmscalesetvm.go:58 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/c6c4acecef5b2377. Report an issue: GitHub.