{"record":{"id":"7deab7fa2dfe3562","repo":"hashicorp/nomad","slug":"node-pools-governance-is-unlicensed-7deab7","errorCode":null,"errorMessage":"Node Pools Governance is unlicensed.","messagePattern":"Node Pools Governance is unlicensed\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/structs_ce.go","lineNumber":21,"sourceCode":"\n//go:build !ent\n\npackage structs\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\tmultierror \"github.com/hashicorp/go-multierror\"\n)\n\nfunc (n *Namespace) Canonicalize() {}\n\nfunc (n *NamespaceNodePoolConfiguration) Canonicalize() {}\n\nfunc (n *NamespaceNodePoolConfiguration) Validate() error {\n\tif n != nil {\n\t\treturn errors.New(\"Node Pools Governance is unlicensed.\")\n\t}\n\treturn nil\n}\n\nfunc (n *NamespaceVaultConfiguration) Canonicalize() {}\n\nfunc (n *NamespaceVaultConfiguration) Validate() error {\n\tif n != nil {\n\t\treturn errors.New(\"Multi-Cluster Vault is unlicensed.\")\n\t}\n\treturn nil\n}\n\nfunc (n *NamespaceConsulConfiguration) Canonicalize() {}\n\nfunc (n *NamespaceConsulConfiguration) Validate() error {\n\tif n != nil {\n\t\treturn errors.New(\"Multi-Cluster Consul is unlicensed.\")","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/structs_ce.go#L3-L39","documentation":"In Nomad's CE (community edition) build, NamespaceNodePoolConfiguration.Validate unconditionally rejects any non-nil node-pool namespace configuration because Node Pools Governance is an enterprise-only feature. The check is a stub: the CE binary simply has no license for this capability, so any namespace carrying this block fails validation.","triggerScenarios":"Submitting or validating a namespace (POST /v1/namespaces or nomad namespace apply) whose NamespaceNodePoolConfiguration is non-nil on a community-edition Nomad agent.","commonSituations":"Configs exported from an Enterprise cluster and applied to an OSS cluster; following Enterprise docs while running the OSS binary; tooling that always emits the node_pool_configuration block even when empty but present.","solutions":["Remove the node pool configuration block from the namespace specification before applying it on the CE binary.","Upgrade to HashiCorp Nomad Enterprise and apply a license that includes Node Pools Governance.","Nil out the NamespaceNodePoolConfiguration field programmatically if your automation constructs the namespace struct."],"exampleFix":"// before\nns.NodePoolConfiguration = &structs.NamespaceNodePoolConfiguration{}\n// after\nns.NodePoolConfiguration = nil // feature requires Nomad Enterprise","handlingStrategy":"validation","validationCode":"if ns.NodePoolConfiguration != nil {\n\treturn errors.New(\"node pool configuration requires Nomad Enterprise\")\n}","typeGuard":"func nodePoolLicensed(cfg *structs.NamespaceNodePoolConfiguration) bool { return cfg == nil }","tryCatchPattern":"if err := ns.Validate(); err != nil && strings.Contains(err.Error(), \"unlicensed\") {\n\t// strip enterprise-only blocks or route to enterprise cluster\n}","preventionTips":["Know which edition (OSS vs Enterprise) you are targeting before applying namespace specs","Keep separate OSS/Enterprise namespace templates","Strip enterprise-only blocks when exporting configs from Enterprise clusters"],"tags":["nomad","licensing","enterprise","namespaces"],"backgroundTag":"feature-unlicensed","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"}