{"record":{"id":"f0f27bb0cafbe46d","repo":"kubernetes/kubernetes","slug":"concurrent-job-syncs-must-be-greater-than-0-but-g","errorCode":null,"errorMessage":"concurrent-job-syncs must be greater than 0, but got %d","messagePattern":"concurrent-job-syncs must be greater than 0, but got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kube-controller-manager/app/options/jobcontroller.go","lineNumber":60,"sourceCode":"func (o *JobControllerOptions) ApplyTo(cfg *jobconfig.JobControllerConfiguration) error {\n\tif o == nil {\n\t\treturn nil\n\t}\n\n\tcfg.ConcurrentJobSyncs = o.ConcurrentJobSyncs\n\n\treturn nil\n}\n\n// Validate checks validation of JobControllerOptions.\nfunc (o *JobControllerOptions) Validate() []error {\n\tif o == nil {\n\t\treturn nil\n\t}\n\n\terrs := []error{}\n\tif o.ConcurrentJobSyncs < 1 {\n\t\terrs = append(errs, fmt.Errorf(\"concurrent-job-syncs must be greater than 0, but got %d\", o.ConcurrentJobSyncs))\n\t}\n\treturn errs\n}\n","sourceCodeStart":42,"sourceCodeEnd":64,"githubUrl":"https://github.com/kubernetes/kubernetes/blob/b882c60b4023bdf09264c2d5d30a2cadebc240fb/cmd/kube-controller-manager/app/options/jobcontroller.go#L42-L64","documentation":"Thrown by JobControllerOptions.Validate() when --concurrent-job-syncs (Int32) is less than 1. The job controller reconciles Job objects (and their tracked Pods) across N workers; zero means batch Jobs never get processed for completion/failure handling. Returned in the validation error slice aggregated by KubeControllerManagerOptions.Validate().","triggerScenarios":"Starting KCM with --concurrent-job-syncs=0 or negative. Equivalently a JobControllerConfiguration component-config with concurrentJobSyncs: 0.","commonSituations":"Clusters derived from autoscaled node counts where a concurrency formula yields 0; disabling the job controller by zeroing syncs instead of using --controllers=-job; stale config maps left over from a cluster restore.","solutions":["Set --concurrent-job-syncs to >=1 (default is 5) or remove the flag.","Disable the controller properly with --controllers=-job if batch processing is unwanted.","Clamp any programmatically computed value to a minimum of 1."],"exampleFix":"// before\n--concurrent-job-syncs=0\n// after\n--concurrent-job-syncs=5","handlingStrategy":"validation","validationCode":"if opts.JobController.ConcurrentJobSyncs < 1 {\n    return fmt.Errorf(\"concurrent-job-syncs must be >= 1\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Disable the job controller via --controllers=-job instead of setting syncs to 0.","Clamp formula-derived worker counts to >=1.","Validate component-config YAML in CI before applying."],"tags":["kubernetes","go","kube-controller-manager","configuration","validation","job-controller","batch"],"analyzedSha":"b882c60b4023bdf09264c2d5d30a2cadebc240fb","analyzedAt":"2026-08-07T04:07:48.144Z","schemaVersion":2},"datasetVersion":"2026-08-07T07:17:06.508Z"}