{"record":{"id":"1dfd556affff1b2c","repo":"kubernetes/kops","slug":"waiting-for-route-table-create-update-completion","errorCode":null,"errorMessage":"waiting for route table create/update completion: %w","messagePattern":"waiting for route table create/update completion: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/routetable.go","lineNumber":49,"sourceCode":"\tCreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters network.RouteTable) (*network.RouteTable, error)\n\tList(ctx context.Context, resourceGroupName string) ([]*network.RouteTable, error)\n\tDelete(ctx context.Context, resourceGroupName, vnetName string) error\n}\n\ntype routeTablesClientImpl struct {\n\tc *network.RouteTablesClient\n}\n\nvar _ RouteTablesClient = (*routeTablesClientImpl)(nil)\n\nfunc (c *routeTablesClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters network.RouteTable) (*network.RouteTable, error) {\n\tfuture, err := c.c.BeginCreateOrUpdate(ctx, resourceGroupName, routeTableName, parameters, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating/updating route table: %w\", err)\n\t}\n\trt, err := future.PollUntilDone(ctx, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"waiting for route table create/update completion: %w\", err)\n\t}\n\treturn &rt.RouteTable, err\n}\n\nfunc (c *routeTablesClientImpl) List(ctx context.Context, resourceGroupName string) ([]*network.RouteTable, error) {\n\tif resourceGroupName == \"\" {\n\t\treturn nil, nil\n\t}\n\n\tvar l []*network.RouteTable\n\tpager := c.c.NewListPager(resourceGroupName, nil)\n\tfor pager.More() {\n\t\tresp, err := pager.NextPage(ctx)\n\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}","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/routetable.go#L31-L67","documentation":"Wrapped error from future.PollUntilDone after BeginCreateOrUpdate succeeded, meaning the route table create/update operation started but failed or the polling was interrupted (including context cancellation). The resource was not confirmed created/updated.","triggerScenarios":"PollUntilDone(ctx, nil) returns error when the long-running PUT ultimately fails (e.g., conflict, quota, provisioning error), or ctx is cancelled/times out while polling.","commonSituations":"Slow Azure control plane exceeding the caller's context deadline; concurrent modification conflicts; region outage causing provisioning failure.","solutions":["Check the wrapped error for the ARM operation failure detail","Increase the context timeout for the reconcile operation","Avoid concurrent writers to the same route table (e.g., two kOps runs)","Verify the route table state in the Azure portal after the failure and re-run reconciliation"],"exampleFix":"// before\nctx := context.Background()\n// after\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()","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// inspect respErr.ErrorCode / StatusCode for conflict vs transient\n}","tryCatchPattern":"rt, err := client.CreateOrUpdate(ctx, rg, name, params)\nif errors.Is(err, context.DeadlineExceeded) {\n\t// re-poll or verify current state before retrying the PUT\n}","preventionTips":["Use generous context timeouts for long-running ARM operations","Avoid overlapping kOps runs on the same cluster","Check operation state in Azure before blindly retrying"],"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-12T07:17:12.445Z"}