{"record":{"id":"f44e9a85d4343aaa","repo":"hashicorp/nomad","slug":"invalid-scheduler-algorithm-v","errorCode":null,"errorMessage":"invalid scheduler algorithm: %v","messagePattern":"invalid scheduler algorithm: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/operator.go","lineNumber":310,"sourceCode":"\n\treturn schedConfig\n}\n\nfunc (s *SchedulerConfiguration) Canonicalize() {\n\tif s != nil && s.SchedulerAlgorithm == \"\" {\n\t\ts.SchedulerAlgorithm = SchedulerAlgorithmBinpack\n\t}\n}\n\nfunc (s *SchedulerConfiguration) Validate() error {\n\tif s == nil {\n\t\treturn nil\n\t}\n\n\tswitch s.SchedulerAlgorithm {\n\tcase \"\", SchedulerAlgorithmBinpack, SchedulerAlgorithmSpread:\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid scheduler algorithm: %v\", s.SchedulerAlgorithm)\n\t}\n\n\treturn nil\n}\n\n// SchedulerConfigurationResponse is the response object that wraps SchedulerConfiguration\ntype SchedulerConfigurationResponse struct {\n\t// SchedulerConfig contains scheduler config options\n\tSchedulerConfig *SchedulerConfiguration\n\n\tQueryMeta\n}\n\n// SchedulerSetConfigurationResponse is the response object used\n// when updating scheduler configuration\ntype SchedulerSetConfigurationResponse struct {\n\t// Updated returns whether the config was actually updated\n\t// Only set when the request uses CAS","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/operator.go#L292-L328","documentation":"SchedulerConfiguration.Validate found a scheduler_algorithm outside the supported values; only \"binpack\" and \"spread\" (or empty for the default) are accepted.","triggerScenarios":"Thrown at nomad/structs/operator.go:310 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set scheduler_algorithm to \"binpack\" or \"spread\"","Leave it empty to keep the canonicalized default"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}