{"record":{"id":"f5a2b9a40f81c629","repo":"kubernetes/kops","slug":"waiting-for-nat-gateway-deletion-completion-w","errorCode":null,"errorMessage":"waiting for nat gateway deletion completion: %w","messagePattern":"waiting for nat gateway deletion completion: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/natgateway.go","lineNumber":81,"sourceCode":"\t\tif err != nil {\n\t\t\tvar respErr *azcore.ResponseError\n\t\t\tif errors.As(err, &respErr) && respErr.ErrorCode == \"ResourceGroupNotFound\" {\n\t\t\t\treturn nil, nil\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"listing nat gateways: %w\", err)\n\t\t}\n\t\tl = append(l, resp.Value...)\n\t}\n\treturn l, nil\n}\n\nfunc (c *NatGatewaysClientImpl) Delete(ctx context.Context, resourceGroupName, natGatewayName string) error {\n\tfuture, err := c.c.BeginDelete(ctx, resourceGroupName, natGatewayName, nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"deleting nat gateway: %w\", err)\n\t}\n\tif _, err := future.PollUntilDone(ctx, nil); err != nil {\n\t\treturn fmt.Errorf(\"waiting for nat gateway deletion completion: %w\", err)\n\t}\n\treturn nil\n}\n\nfunc newNatGatewaysClientImpl(subscriptionID string, cred *azidentity.DefaultAzureCredential) (*NatGatewaysClientImpl, error) {\n\tc, err := network.NewNatGatewaysClient(subscriptionID, cred, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating nat gateways client: %w\", err)\n\t}\n\treturn &NatGatewaysClientImpl{\n\t\tc: c,\n\t}, nil\n}\n","sourceCodeStart":63,"sourceCodeEnd":95,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/natgateway.go#L63-L95","documentation":"PollUntilDone failed while waiting for the NAT gateway deletion LRO; the delete was accepted but the operation failed (commonly because subnets still reference the NAT gateway).","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/azure/natgateway.go:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Detach subnets using the NAT gateway and retry deletion","Inspect the wrapped error for the failure reason"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}