kubernetes/kops · error

listing network security groups: %w

Error message

listing network security groups: %w

What it means

Listing network security groups via the ARM pager failed with an error other than ResourceGroupNotFound (already handled as empty). Fires on authorization, throttling, or transient ARM errors.

Source

Thrown at upup/pkg/fi/cloudup/azure/networksecuritygroup.go:68

	}
	return &asg.SecurityGroup, err
}

func (c *NetworkSecurityGroupsClientImpl) List(ctx context.Context, resourceGroupName string) ([]*network.SecurityGroup, error) {
	if resourceGroupName == "" {
		return nil, nil
	}

	var l []*network.SecurityGroup
	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 network security groups: %w", err)
		}
		l = append(l, resp.Value...)
	}
	return l, nil
}

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

func newNetworkSecurityGroupsClientImpl(subscriptionID string, cred *azidentity.DefaultAzureCredential) (*NetworkSecurityGroupsClientImpl, error) {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify list permissions on the resource group
  2. Retry after transient ARM errors
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/azure/networksecuritygroup.go:68 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/0d5873ec6a816d36. Report an issue: GitHub.