{"record":{"id":"92fbd3bb2f83be02","repo":"hashicorp/nomad","slug":"node-is-not-allowed-to-register-in-node-pool-q","errorCode":null,"errorMessage":"node is not allowed to register in node pool %q","messagePattern":"node is not allowed to register in node pool %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/node.go","lineNumber":622,"sourceCode":"\t}\n\tif n.Node.Datacenter == \"\" {\n\t\treturn errors.New(\"missing datacenter for client registration\")\n\t}\n\tif n.Node.Name == \"\" {\n\t\treturn errors.New(\"missing node name for client registration\")\n\t}\n\tif len(n.Node.Attributes) == 0 {\n\t\treturn errors.New(\"missing attributes for client registration\")\n\t}\n\tif n.Node.SecretID == \"\" {\n\t\treturn errors.New(\"missing node secret ID for client registration\")\n\t}\n\tif n.Node.NodePool != \"\" {\n\t\tif err := ValidateNodePoolName(n.Node.NodePool); err != nil {\n\t\t\treturn fmt.Errorf(\"invalid node pool: %v\", err)\n\t\t}\n\t\tif n.Node.NodePool == NodePoolAll {\n\t\t\treturn fmt.Errorf(\"node is not allowed to register in node pool %q\", NodePoolAll)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// ShouldGenerateNodeIdentity compliments the functionality within\n// AuthenticateNodeIdentityGenerator to determine whether a new node identity\n// should be generated within the RPC handler.\nfunc (n *NodeRegisterRequest) ShouldGenerateNodeIdentity(\n\tauthErr error,\n\tnow time.Time,\n\tttl time.Duration,\n) bool {\n\n\t// In the event the error is because the node identity is expired, we should\n\t// generate a new identity. Without this, a disconnected node would never be\n\t// able to re-register. Any other error is not a reason to generate a new","sourceCodeStart":604,"sourceCodeEnd":640,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/node.go#L604-L640","documentation":"NodeRegisterRequest.Validate rejected registration because the node targets the reserved `all` node pool; `all` is a selector keyword, not a pool nodes may join.","triggerScenarios":"Thrown at nomad/structs/node.go:622 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the client's node_pool to a real pool such as `default`","Remove the `all` value from node_pool config"],"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"}