{"record":{"id":"00861b8b1aa6c329","repo":"kubernetes/kops","slug":"creating-updating-route-table-w","errorCode":null,"errorMessage":"creating/updating route table: %w","messagePattern":"creating/updating route table: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/routetable.go","lineNumber":45,"sourceCode":")\n\n// RouteTablesClient is a client for managing route tables.\ntype RouteTablesClient interface {\n\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 {","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/routetable.go#L27-L63","documentation":"Wrapped error from network.RouteTablesClient.BeginCreateOrUpdate when starting the asynchronous create/update of an Azure route table. It means the initial PUT request to the Azure Resource Manager was rejected before the polling loop began. kOps uses this while reconciling route tables for cluster networking.","triggerScenarios":"c.c.BeginCreateOrUpdate(ctx, resourceGroupName, routeTableName, parameters, nil) returns an error: invalid resource group, bad RouteTable parameters, auth failures, throttling (429), or missing permissions (Microsoft.Network/routeTables/write).","commonSituations":"Service principal lacks Network Contributor role on the resource group; route table name conflicts with an existing object of a different type; resource group deleted mid-run; Azure API throttling.","solutions":["Inspect the wrapped error for HTTP status: 403 means grant Microsoft.Network/routeTables/write to the identity","Verify the resource group exists and is in the expected region","Validate the RouteTable parameters (location, properties) match the target resource group","Retry on 429/5xx per Azure throttling guidance"],"exampleFix":"// before\nnetwork.RouteTable{}\n// after\nnetwork.RouteTable{\n\tLocation: &location,\n\tProperties: &network.RouteTablePropertiesFormat{},\n}","handlingStrategy":"retry","validationCode":"if _, err := rgClient.Get(ctx, resourceGroupName, nil); err != nil {\n\treturn fmt.Errorf(\"resource group %q missing: %w\", resourceGroupName, err)\n}","typeGuard":"var respErr *azcore.ResponseError\nif errors.As(err, &respErr) {\n\tswitch respErr.StatusCode {\n\tcase http.StatusForbidden: // RBAC issue\n\tcase http.StatusTooManyRequests: // retry with backoff\n\t}\n}","tryCatchPattern":"err := doReconcile(ctx)\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, doReconcile)\n\t}\n\treturn err\n}","preventionTips":["Grant Microsoft.Network/routeTables/write to the cluster identity","Ensure only one reconciler mutates the route table at a time","Validate RouteTable parameters (location/properties) before submit"],"tags":["azure","network","route-table"],"backgroundTag":"azure-api-request-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"}