{"record":{"id":"78b5cf483abf8cc6","repo":"kubernetes/kops","slug":"waiting-for-vmss-create-update-w","errorCode":null,"errorMessage":"waiting for VMSS create/update: %w","messagePattern":"waiting for VMSS create/update: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/vmscaleset.go","lineNumber":51,"sourceCode":"\tList(ctx context.Context, resourceGroupName string) ([]*compute.VirtualMachineScaleSet, error)\n\tGet(ctx context.Context, resourceGroupName string, vmssName string) (*compute.VirtualMachineScaleSet, error)\n\tDelete(ctx context.Context, resourceGroupName, vmssName string) error\n}\n\ntype vmScaleSetsClientImpl struct {\n\tc *compute.VirtualMachineScaleSetsClient\n}\n\nvar _ VMScaleSetsClient = (*vmScaleSetsClientImpl)(nil)\n\nfunc (c *vmScaleSetsClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, vmScaleSetName string, parameters compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error) {\n\tfuture, err := c.c.BeginCreateOrUpdate(ctx, resourceGroupName, vmScaleSetName, parameters, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating/updating VMSS: %w\", err)\n\t}\n\tresp, err := future.PollUntilDone(ctx, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"waiting for VMSS create/update: %w\", err)\n\t}\n\treturn &resp.VirtualMachineScaleSet, nil\n}\n\nfunc (c *vmScaleSetsClientImpl) List(ctx context.Context, resourceGroupName string) ([]*compute.VirtualMachineScaleSet, error) {\n\tif resourceGroupName == \"\" {\n\t\treturn nil, nil\n\t}\n\n\tvar l []*compute.VirtualMachineScaleSet\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":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/vmscaleset.go#L33-L69","documentation":"Wrapped when the long-running VMSS create/update fails during future.PollUntilDone — BeginCreateOrUpdate succeeded but the operation later entered a Failed/Cancelled state or the context ended. Azure-side provisioning problems (capacity, image, extensions) surface here rather than at Begin time.","triggerScenarios":"CreateOrUpdate's future.PollUntilDone(ctx, nil) returns an error: VMSS provisioning failed (capacity constraints, quota exceeded, invalid image rollout), the context was cancelled/timed out, or ARM throttling exhausted retries.","commonSituations":"Regional capacity restrictions for the chosen VM size; subscription vCPU quota exhausted; rolling-update of an existing VMSS interrupted by Ctrl-C; image download failures during provisioning.","solutions":["Check the VMSS provisioning state and the Azure Activity Log for the failed operation's error detail","Retry the kops command — long-running operations can be safely re-issued","If quota/capacity-related, choose a different vmSize/region or request a quota increase","Avoid cancelling kops mid-roll; increase timeouts for large scale sets"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Go: verify VM size quota/capacity in the target region before the long-running operation\nsku, err := skuClient.List(ctx, rg, \"location eq 'eastus'\", nil)\nif err == nil {\n    for _, s := range sku.Value {\n        if *s.Name == vmSize && len(s.Restrictions) > 0 {\n            return fmt.Errorf(\"vmSize %s restricted in region\", vmSize)\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"vmss, err := vmssClient.CreateOrUpdate(ctx, rg, name, parameters)\nif err != nil {\n    if ctx.Err() != nil {\n        return fmt.Errorf(\"VMSS update interrupted; re-run kops to resume rolling update\")\n    }\n    return fmt.Errorf(\"VMSS provisioning failed (quota/capacity/image?) — see Activity Log: %w\", err)\n}","preventionTips":["Check regional quota and capacity for the chosen vmSize before scaling","Avoid cancelling kops during rolling updates","Use a context timeout exceeding expected VMSS provisioning time","Retry failed operations — BeginCreateOrUpdate is idempotent for the same spec"],"tags":["azure","go","vmss","compute","long-running-operation"],"backgroundTag":"azure-long-running-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"}