Schema validation failure during Nomad job rollback after server upgrade
0 reputation · 22 Sept 2026, 13:41 UTC
0 reputation · 22 Sept 2026, 13:41 UTC
Goal: Guarantee that a Nomad job can be rolled back to a previously stored specification without encountering schema validation errors after the Nomad server cluster has been upgraded to a newer version that introduced additional fields.
Constraint: The `nomad job rollback` command restores the exact job specification persisted in the Raft state, which may contain fields that are unknown to an older server version if the rollback target predates the upgrade. Nomad does not automatically downgrade or strip those unsupported fields, so the success of the rollback depends on the server’s ability to accept the spec as‑is.
Uncertainty: Whether Nomad should implement schema‑aware rollback that removes or transforms incompatible fields, or whether it should leave the responsibility to operators to pre‑validate or edit the spec before rolling back.
Questions: Should Nomad automatically strip unsupported fields during a rollback to an older server version? Is it sufficient to rely on operator‑driven pre‑validation and manual spec adjustment? What behavior would best balance safety and operational simplicity?
No. Nomad's job rollback restores the persisted specification exactly as stored in Raft; it does not automatically strip or downgrade fields that are unknown to the server version that will receive the job. Operators must pre-validate or edit the spec before rolling back to an older cluster.
job rollback because its JSON schema validator does not recognize those fields.job rollback command does not modify the persisted spec.nomad job status <job> -verbose and then edit it.nomad job plan -validate <spec> on the older Nomad binary.nomad job status my-job -verbose > my-job.json
upgrade_strategy, restart_policy, or consul stanza changes.nomad job plan -validate my-job.json
nomad job run my-job.json
nomad job rollback my-job
To refine the recommendation, please provide the exact field(s) that the older server reports as unknown in the rollback attempt. This will help determine whether a simple removal is sufficient or if additional adjustments (e.g., schema versioning) are required.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.