kubernetes/kops · error

deleting application security group: %w

Error message

deleting application security group: %w

What it means

BeginDelete for the application security group failed to start the deletion LRO; fires on authorization failure, an already-deleted/missing ASG, or ARM API errors.

Source

Thrown at upup/pkg/fi/cloudup/azure/applicationsecuritygroup.go:78

	pager := c.c.NewListPager(resourceGroupName, nil)
	for pager.More() {
		resp, err := pager.NextPage(ctx)
		if err != nil {
			var respErr *azcore.ResponseError
			if errors.As(err, &respErr) && respErr.ErrorCode == "ResourceGroupNotFound" {
				return nil, nil
			}
			return nil, fmt.Errorf("listing application security groups: %w", err)
		}
		l = append(l, resp.Value...)
	}
	return l, nil
}

func (c *ApplicationSecurityGroupsClientImpl) Delete(ctx context.Context, resourceGroupName, applicationSecurityGroupName string) error {
	future, err := c.c.BeginDelete(ctx, resourceGroupName, applicationSecurityGroupName, nil)
	if err != nil {
		return fmt.Errorf("deleting application security group: %w", err)
	}
	if _, err = future.PollUntilDone(ctx, nil); err != nil {
		return fmt.Errorf("waiting for application security group deletion completion: %w", err)
	}
	return nil
}

func newApplicationSecurityGroupsClientImpl(subscriptionID string, cred *azidentity.DefaultAzureCredential) (*ApplicationSecurityGroupsClientImpl, error) {
	c, err := network.NewApplicationSecurityGroupsClient(subscriptionID, cred, nil)
	if err != nil {
		return nil, fmt.Errorf("creating application security groups client: %w", err)
	}
	return &ApplicationSecurityGroupsClientImpl{
		c: c,
	}, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check the wrapped error code; NotFound means the ASG is already gone and can be ignored
  2. Verify delete permissions on the resource group
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/azure/applicationsecuritygroup.go:78 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/6c31babdada71b76. Report an issue: GitHub.