forked from hashicorp/nomad
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: non-service jobs on
job restart -reschedule
(hashicorp#19147)
The `-reschedule` flag stops allocations and assumes the Nomad scheduler will create new allocations to replace them. But this is only true for service and batch jobs. Restarting non-service jobs with the `-reschedule` flag causes the command to loop forever waiting for the allocations to be replaced, which never happens. Allocations for system jobs may be replaced by triggering an evaluation after each stop to cause the reconciler to run again. Sysbatch jobs should not be allowed to be rescheduled as they are never replaced by the scheduler.
- Loading branch information
Showing
4 changed files
with
272 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
cli: Fixed the `nomad job restart` command to create replacements for batch and system jobs and to prevent sysbatch jobs from being rescheduled since they never create replacements | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.