{"record":{"id":"0d9c3fdc48dc13e1","repo":"hashicorp/nomad","slug":"invalid-node-pool-configuration-v","errorCode":null,"errorMessage":"invalid node pool configuration: %v","messagePattern":"invalid node pool configuration: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/structs.go","lineNumber":5671,"sourceCode":"\nfunc (n *Namespace) Validate() error {\n\tvar mErr multierror.Error\n\n\t// Validate the name and description\n\tif !validNamespaceName.MatchString(n.Name) {\n\t\terr := fmt.Errorf(\"invalid name %q. Must match regex %s\", n.Name, validNamespaceName)\n\t\tmErr.Errors = append(mErr.Errors, err)\n\t}\n\tif len(n.Description) > maxNamespaceDescriptionLength {\n\t\terr := fmt.Errorf(\"description longer than %d\", maxNamespaceDescriptionLength)\n\t\tmErr.Errors = append(mErr.Errors, err)\n\t}\n\n\terr := n.NodePoolConfiguration.Validate()\n\tswitch e := err.(type) {\n\tcase *multierror.Error:\n\t\tfor _, npErr := range e.Errors {\n\t\t\tmErr.Errors = append(mErr.Errors, fmt.Errorf(\"invalid node pool configuration: %v\", npErr))\n\t\t}\n\tcase error:\n\t\tmErr.Errors = append(mErr.Errors, fmt.Errorf(\"invalid node pool configuration: %v\", e))\n\t}\n\n\terr = n.VaultConfiguration.Validate()\n\tswitch e := err.(type) {\n\tcase *multierror.Error:\n\t\tfor _, vErr := range e.Errors {\n\t\t\tmErr.Errors = append(mErr.Errors, fmt.Errorf(\"invalid vault configuration: %v\", vErr))\n\t\t}\n\tcase error:\n\t\tmErr.Errors = append(mErr.Errors, fmt.Errorf(\"invalid vault configuration: %v\", e))\n\t}\n\n\terr = n.ConsulConfiguration.Validate()\n\tswitch e := err.(type) {\n\tcase *multierror.Error:","sourceCodeStart":5653,"sourceCodeEnd":5689,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/structs.go#L5653-L5689","documentation":"Wrapper error emitted by Namespace.Validate() when NodePoolConfiguration.Validate() returns a *multierror.Error: each underlying validation failure is re-wrapped as 'invalid node pool configuration: %v' and appended to the namespace's multierror. The real cause is in the inner npErr text.","triggerScenarios":"Creating/updating a namespace whose NodePoolConfiguration (e.g. scheduler configuration or node pool settings) fails its own Validate, via `nomad namespace apply` or the namespace API.","commonSituations":"Invalid SchedulerConfiguration values inside a namespace's node pool config; malformed HCL/JSON when defining namespace node pool settings; API version mismatch producing unknown fields.","solutions":["Read the inner '%v' text after the prefix — it names the actual failing field","Fix the offending NodePoolConfiguration field per the inner message","Validate the node pool config standalone (NodePoolConfiguration.Validate()) before submitting","Check Nomad version: node pool names must also satisfy the node pool name regex"],"exampleFix":"// before\nns.NodePoolConfiguration = &structs.NodePoolConfiguration{Cluster: \"\"} // missing required field\n// after\nns.NodePoolConfiguration = &structs.NodePoolConfiguration{Cluster: \"default\"}","handlingStrategy":"validation","validationCode":"if err := ns.NodePoolConfiguration.Validate(); err != nil {\n    return fmt.Errorf(\"namespace node pool config invalid: %w\", err)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate sub-configs independently before assembling the Namespace","Keep node pool config fields aligned with your Nomad agent version","Use `nomad job validate` / API dry-run in CI","Parse the wrapped inner error text to locate the failing field"],"tags":["nomad","validation","node-pool"],"backgroundTag":"nested-config-validation-failed","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"}