{"record":{"id":"7d3535876f6b52c5","repo":"hashicorp/nomad","slug":"enterprise-only","errorCode":null,"errorMessage":"Enterprise only","messagePattern":"Enterprise only","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/alloc_runner_ce.go","lineNumber":15,"sourceCode":"// Copyright IBM Corp. 2015, 2026\n// SPDX-License-Identifier: BUSL-1.1\n\n//go:build !ent\n\npackage allocrunner\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/hashicorp/nomad/nomad/structs\"\n)\n\nfunc (ar *allocRunner) SetTaskPauseState(string, structs.TaskScheduleState) error {\n\treturn fmt.Errorf(\"Enterprise only\")\n}\n\nfunc (ar *allocRunner) GetTaskPauseState(taskName string) (structs.TaskScheduleState, error) {\n\treturn \"\", fmt.Errorf(\"Enterprise only\")\n}\n","sourceCodeStart":1,"sourceCodeEnd":21,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/alloc_runner_ce.go#L1-L21","documentation":"The community (OSS) build of Nomad stubs SetTaskPauseState in alloc_runner_ce.go so that the task scheduling pause/resume API always fails with \"Enterprise only\". Pausing a task's schedule is a Nomad Enterprise feature; the OSS binary cannot perform it.","triggerScenarios":"Calling SetTaskPauseState (task pause/resume endpoint or API) against an open-source Nomad agent build.","commonSituations":"Running `nomad alloc signal`-style pause workflows or automation that assumes Enterprise; scripts copied from Enterprise environments run against OSS clusters.","solutions":["Use Nomad Enterprise if task pause/schedule-state control is required","On OSS, achieve pausing by stopping the job (`nomad job stop`) or using lifecycle/kill-timeout controls instead","Guard automation: check the Nomad build/edition before invoking pause APIs"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := pauseTask(allocID, task); err != nil && strings.Contains(err.Error(), \"Enterprise only\") {\n  // fall back to OSS-compatible behavior\n  return stopOrDrainInstead(allocID, task)\n}","preventionTips":["Detect the Nomad edition (Enterprise vs OSS) before using pause APIs","Design automation with an OSS-compatible fallback (job stop / drain)"],"tags":["nomad","enterprise","feature-gate","task-pause"],"backgroundTag":"enterprise-only-feature","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"}