{"record":{"id":"b85a25fb2ec49d2d","repo":"kubernetes/kops","slug":"waiting-for-route-table-deletion-completion-w","errorCode":null,"errorMessage":"waiting for route table deletion completion: %w","messagePattern":"waiting for route table deletion completion: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/routetable.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 route tables: %w\", err)\n\t\t}\n\t\tl = append(l, resp.Value...)\n\t}\n\treturn l, nil\n}\n\nfunc (c *routeTablesClientImpl) Delete(ctx context.Context, resourceGroupName, vnetName string) error {\n\tfuture, err := c.c.BeginDelete(ctx, resourceGroupName, vnetName, nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"deleting route table: %w\", err)\n\t}\n\tif _, err := future.PollUntilDone(ctx, nil); err != nil {\n\t\treturn fmt.Errorf(\"waiting for route table deletion completion: %w\", err)\n\t}\n\treturn nil\n}\n\nfunc newRouteTablesClientImpl(subscriptionID string, cred *azidentity.DefaultAzureCredential) (*routeTablesClientImpl, error) {\n\tc, err := network.NewRouteTablesClient(subscriptionID, cred, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating route tables client: %w\", err)\n\t}\n\treturn &routeTablesClientImpl{\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/routetable.go#L63-L95","documentation":"Wrapped error from future.PollUntilDone while waiting for a route table DELETE to complete. The delete operation started but finished with failure or the polling context was cancelled before completion.","triggerScenarios":"PollUntilDone(ctx, nil) returns error when the ARM DELETE operation reports failure (e.g., resource locked, association conflict) or ctx is cancelled/timed out during polling.","commonSituations":"Route table still associated with subnets in another operation's scope; Azure ResourceManager locks on the resource group; short context deadline against slow deletes.","solutions":["Read the wrapped error for the ARM delete failure reason","Remove any resource locks or subnet associations blocking deletion","Increase the polling context timeout","Verify deletion state in the portal; re-run delete if it is stuck"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"ctx, cancel := context.WithTimeout(ctx, 5*time.Minute)\ndefer cancel()","typeGuard":"var respErr *azcore.ResponseError\nif errors.As(err, &respErr) {\n\t// Conflict/InUseErrorCode indicates association still present\n}","tryCatchPattern":"err := client.Delete(ctx, rg, name)\nif err != nil {\n\tvar respErr *azcore.ResponseError\n\tif errors.As(err, &respErr) && (respErr.StatusCode == 429 || respErr.StatusCode >= 500) {\n\t\treturn retryWithBackoff(ctx, func() error { return client.Delete(ctx, rg, name) })\n\t}\n\treturn err\n}","preventionTips":["Dissociate route table from subnets before delete","Remove Azure resource locks prior to teardown","Allow ample polling time; deletes can be slow"],"tags":["azure","network","route-table","long-running-operation"],"backgroundTag":"azure-polling-operation-failed","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"}