{"record":{"id":"9eb2a1a8ea90c6b3","repo":"hashicorp/nomad","slug":"can-t-resume-terminal-deployment","errorCode":null,"errorMessage":"can't resume terminal deployment","messagePattern":"can't resume terminal deployment","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/errors.go","lineNumber":82,"sourceCode":"\tErrNodeLacksRpc               = errors.New(errNodeLacksRpc)\n\tErrMissingAllocID             = errors.New(errMissingAllocID)\n\tErrIncompatibleFiltering      = errors.New(errIncompatibleFiltering)\n\tErrMalformedChooseParameter   = errors.New(errMalformedChooseParameter)\n\n\t// ErrResultPaginatorCreation is returned by list RPC handlers when the\n\t// result paginator cannot be built, for example when the server cannot\n\t// evaluate a requested filter expression. api.ResultPaginatorErrorContent\n\t// duplicates its message so the CLI can match it without importing structs.\n\t// Keep the two in sync.\n\tErrResultPaginatorCreation = errors.New(errResultPaginatorCreation)\n\n\tErrUnknownNode = errors.New(ErrUnknownNodePrefix)\n\n\tErrDeploymentTerminalNoCancel    = errors.New(errDeploymentTerminalNoCancel)\n\tErrDeploymentTerminalNoFail      = errors.New(errDeploymentTerminalNoFail)\n\tErrDeploymentTerminalNoPause     = errors.New(errDeploymentTerminalNoPause)\n\tErrDeploymentTerminalNoPromote   = errors.New(errDeploymentTerminalNoPromote)\n\tErrDeploymentTerminalNoResume    = errors.New(errDeploymentTerminalNoResume)\n\tErrDeploymentTerminalNoUnblock   = errors.New(errDeploymentTerminalNoUnblock)\n\tErrDeploymentTerminalNoRun       = errors.New(errDeploymentTerminalNoRun)\n\tErrDeploymentTerminalNoSetHealth = errors.New(errDeploymentTerminalNoSetHealth)\n\tErrDeploymentRunningNoUnblock    = errors.New(errDeploymentRunningNoUnblock)\n\n\tErrCSIClientRPCIgnorable  = errors.New(\"CSI client error (ignorable)\")\n\tErrCSIClientRPCRetryable  = errors.New(\"CSI client error (retryable)\")\n\tErrCSIVolumeMaxClaims     = errors.New(\"volume max claims reached\")\n\tErrCSIVolumeUnschedulable = errors.New(\"volume is currently unschedulable\")\n\tErrCSIPluginInUse         = errors.New(\"plugin in use\")\n)\n\n// IsErrNoLeader returns whether the error is due to there being no leader.\nfunc IsErrNoLeader(err error) bool {\n\treturn err != nil && strings.Contains(err.Error(), errNoLeader)\n}\n\n// IsErrNoRegionPath returns whether the error is due to there being no path to","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/errors.go#L64-L100","documentation":"ErrDeploymentTerminalNoResume: returned by the deployment RPC when a resume is requested for a deployment that is already terminal (not active) — there is nothing left to resume.","triggerScenarios":"Calling Deployment.Pause with Pause=false (resume) against a completed/failed/cancelled deployment, e.g. 'nomad deployment unblock/resume' on a stale ID.","commonSituations":"Operations runbooks resuming paused deployments after maintenance, but the deployment finished while paused or was cancelled.","solutions":["Verify the deployment is active (and paused) before resuming.","If the deployment finished successfully while paused, no action is needed.","If it failed, trigger a new deployment instead of resuming."],"exampleFix":"// before\nclient.Deployments().Pause(deployID, false, \"\", nil)\n// after\nd, _ := client.Deployments().Info(deployID, nil)\nif d.Status == \"running\" { client.Deployments().Pause(deployID, false, \"\", nil) }","handlingStrategy":"type-guard","validationCode":"d, err := client.Deployments().Info(deployID, nil)\nif err != nil { return err }\nif d.Status != \"running\" { return nil } // nothing to resume","typeGuard":"func deploymentActive(d *api.Deployment) bool {\n    return d.Status == \"running\" || d.Status == \"pending\"\n}","tryCatchPattern":"err := client.Deployments().Pause(deployID, false, \"\", nil)\nif err != nil && strings.Contains(err.Error(), \"terminal deployment\") {\n    return checkDeploymentOutcome(deployID) // finished while paused\n}","preventionTips":["Check status after maintenance windows before resuming.","Detect deployments that auto-resolved while paused.","Keep resume runbooks tied to live status queries, not stored assumptions."],"tags":["deployment","state","rpc","nomad"],"backgroundTag":"invalid-state-transition","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"}