{"record":{"id":"5b58268f575da589","repo":"kubernetes/kops","slug":"patching-node-q-w","errorCode":null,"errorMessage":"patching node %q: %w","messagePattern":"patching node %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"channels/pkg/nodelabeler/labeler.go","lineNumber":75,"sourceCode":"\t\t\tshouldPatch = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !shouldPatch {\n\t\treturn nil\n\t}\n\n\tklog.V(2).Infof(\"patching node %q to add labels %v\", nodeName, labels)\n\tpatch, err := json.Marshal(&nodePatch{\n\t\tMetadata: &nodePatchMetadata{Labels: labels},\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"building node patch: %w\", err)\n\t}\n\n\tklog.V(2).Infof(\"sending patch for node %q: %s\", node.Name, patch)\n\tif _, err := client.CoreV1().Nodes().Patch(ctx, node.Name, types.StrategicMergePatchType, patch, metav1.PatchOptions{FieldManager: \"kops-channels\"}); err != nil {\n\t\treturn fmt.Errorf(\"patching node %q: %w\", node.Name, err)\n\t}\n\treturn nil\n}\n","sourceCodeStart":57,"sourceCodeEnd":79,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/channels/pkg/nodelabeler/labeler.go#L57-L79","documentation":"BootstrapControlPlaneNodeLabels sends the strategic-merge patch to add control-plane labels to the Node object; this wraps the Nodes().Patch API call failing, e.g. because the node was modified concurrently, RBAC denied the patch, or the API server rejected the patch.","triggerScenarios":"Thrown at channels/pkg/nodelabeler/labeler.go:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped API error for the rejection reason","Check RBAC allows patching nodes with fieldManager kops-channels","Retry; conflicts from concurrent node updates are transient"],"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"}