{"record":{"id":"bd5737df36d48abc","repo":"hashicorp/nomad","slug":"autopilot-config-not-initialized-yet","errorCode":null,"errorMessage":"autopilot config not initialized yet","messagePattern":"autopilot config not initialized yet","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/operator_endpoint.go","lineNumber":333,"sourceCode":"\tif authErr != nil {\n\t\treturn structs.ErrPermissionDenied\n\t}\n\n\t// This action requires operator read access.\n\taclObj, err := op.srv.ResolveACL(args)\n\tif err != nil {\n\t\treturn err\n\t} else if !aclObj.AllowOperatorRead() {\n\t\treturn structs.ErrPermissionDenied\n\t}\n\n\tstate := op.srv.fsm.State()\n\t_, config, err := state.AutopilotConfig()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif config == nil {\n\t\treturn fmt.Errorf(\"autopilot config not initialized yet\")\n\t}\n\n\t*reply = *config\n\n\treturn nil\n}\n\n// AutopilotSetConfiguration is used to set the current Autopilot configuration.\nfunc (op *Operator) AutopilotSetConfiguration(args *structs.AutopilotSetConfigRequest, reply *bool) error {\n\n\tauthErr := op.srv.Authenticate(op.ctx, args)\n\tif done, err := op.srv.forward(\"Operator.AutopilotSetConfiguration\", args, args, reply); done {\n\t\treturn err\n\t}\n\top.srv.MeasureRPCRate(\"operator\", structs.RateMetricWrite, args)\n\tif authErr != nil {\n\t\treturn structs.ErrPermissionDenied\n\t}","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/operator_endpoint.go#L315-L351","documentation":"AutopilotGetConfiguration found no autopilot config in the state store yet; on a freshly started or not-yet-initialized cluster the config has not been applied via Raft, so there is nothing to return.","triggerScenarios":"Thrown at nomad/operator_endpoint.go:333 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the cluster (especially a new leader) to initialize and apply the autopilot config, then retry","Check server logs and Raft health if the condition persists","Set the autopilot configuration explicitly to initialize it"],"exampleFix":null,"handlingStrategy":"retry","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"}