{"record":{"id":"b150600c0f956b4e","repo":"kubernetes/kops","slug":"rendering-server-group-adding-update-tag-to-serve","errorCode":null,"errorMessage":"rendering server group: adding update tag to server %q (%s): %w","messagePattern":"rendering server group: adding update tag to server %q \\((.+?)\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scalewaytasks/instance.go","lineNumber":204,"sourceCode":"\tnewInstanceCount := expected.Count\n\tif actual != nil {\n\n\t\t// Add \"kops.k8s.io/needs-update\" label to servers needing update\n\t\tfor _, serverID := range actual.NeedsUpdate {\n\t\t\tserver, err := instanceService.GetServer(&instance.GetServerRequest{\n\t\t\t\tZone:     zone,\n\t\t\t\tServerID: serverID,\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"rendering server group: listing existing servers: %w\", err)\n\t\t\t}\n\t\t\t_, err = instanceService.UpdateServer(&instance.UpdateServerRequest{\n\t\t\t\tZone:     zone,\n\t\t\t\tServerID: serverID,\n\t\t\t\tTags:     scw.StringsPtr(append(server.Server.Tags, scaleway.TagNeedsUpdate)),\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"rendering server group: adding update tag to server %q (%s): %w\", server.Server.Name, serverID, err)\n\t\t\t}\n\t\t}\n\n\t\tif expected.Count == actual.Count {\n\t\t\treturn nil\n\t\t}\n\t\tnewInstanceCount = expected.Count - actual.Count\n\n\t}\n\n\t// If newInstanceCount > 0, we need to create new instances for this group\n\tfor i := 0; i < newInstanceCount; i++ {\n\t\t// We create a unique name for each server\n\t\tuniqueName, err := uniqueName(t.Cloud, scaleway.ClusterNameFromTags(expected.Tags), fi.ValueOf(expected.Name))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error rendering server group %s: computing unique name for server: %w\", fi.ValueOf(expected.Name), err)\n\t\t}\n","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scalewaytasks/instance.go#L186-L222","documentation":"In RenderScw, UpdateServer failed while appending the 'kops.k8s.io/needs-update' tag to a server listed in actual.NeedsUpdate. The server was fetched fine but could not be modified — concurrent modification, permission, or API error; the server name and ID identify the machine.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scalewaytasks/instance.go:204 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the update failure reason","Avoid concurrent kOps/Scaleway operations mutating the same server","Re-run the apply to retry tagging"],"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-12T07:17:12.445Z"}