{"record":{"id":"71a02a69e0158882","repo":"rancher/rancher","slug":"failed-to-add-tolerations-for-cp-nodes-w","errorCode":null,"errorMessage":"failed to add tolerations for CP nodes: %w","messagePattern":"failed to add tolerations for CP nodes: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/catalogv2/helmop/operation.go","lineNumber":146,"sourceCode":"\t\troles:             rbac.Role(),\n\t\tnodes:             nodes,\n\t\tsecretCache:       secrets.Cache(),\n\t\tsecrets:           secrets,\n\t}\n}\n\n// Uninstall gets the uninstall commands using the given namespace, name and options and gets the user information using the isApp flag as true.\n// Returns a catalog.Operation that represents the helm operation to be created\nfunc (s *Operations) Uninstall(ctx context.Context, user user.Info, namespace, name string, options io.Reader, imageOverride string) (*catalog.Operation, error) {\n\tstatus, cmds, err := s.getUninstallArgs(namespace, name, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif status.AutomaticCPTolerations {\n\t\tstatus.Tolerations, err = s.AddCpTaintsToTolerations(status.Tolerations)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to add tolerations for CP nodes: %w\", err)\n\t\t}\n\t}\n\n\tuser, err = s.getUser(user, namespace, name, true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn s.createOperation(ctx, user, status, cmds, imageOverride, name)\n}\n\n// Upgrade gets the upgrade commands using the given namespace, name and options and gets the user using the isApp flag as false.\n// Returns a catalog.Operation that represents the helm operation to be created\nfunc (s *Operations) Upgrade(ctx context.Context, user user.Info, namespace, name string, options io.Reader, imageOverride string) (*catalog.Operation, error) {\n\tstatus, cmds, err := s.getUpgradeCommand(namespace, name, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/rancher/rancher/blob/932558d4e68565aff2d2f36e89ec4a391b06e7c5/pkg/catalogv2/helmop/operation.go#L128-L164","documentation":"Error \"failed to add tolerations for CP nodes: %w\" thrown in rancher/rancher.","triggerScenarios":"Thrown at pkg/catalogv2/helmop/operation.go:146 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"932558d4e68565aff2d2f36e89ec4a391b06e7c5","analyzedAt":"2026-08-16T04:37:02.125Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}