mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
Update the scaling policies when deregistering a job (#25911)
* func: Update the scaling policies when deregistering a job * func: Add tests for updating the policy * docs: add changelog * func: set back the old order * style: rearrange for clarity and to reuse the watchset * func: set the policies to teh last submitted when starting a job * func: expand tests of teh start job command to include job submission * func: Expand the tests to verify the correct state of the scaling policy after job start * Update command/job_start.go Co-authored-by: Tim Gross <tgross@hashicorp.com> * Update nomad/fsm_test.go Co-authored-by: Tim Gross <tgross@hashicorp.com> * func: add warning when there is no previous job submission --------- Co-authored-by: Tim Gross <tgross@hashicorp.com>
This commit is contained in:
committed by
GitHub
parent
ae3eaf80d1
commit
bdfd573fc4
@@ -74,7 +74,11 @@ func testJob(jobID string) *api.Job {
|
||||
AddTask(task).
|
||||
RequireDisk(&api.EphemeralDisk{
|
||||
SizeMB: pointer.Of(20),
|
||||
})
|
||||
}).ScalingPolicy(&api.ScalingPolicy{
|
||||
Min: pointer.Of(int64(1)),
|
||||
Max: pointer.Of(int64(5)),
|
||||
Enabled: pointer.Of(true),
|
||||
})
|
||||
|
||||
job := api.NewBatchJob(jobID, jobID, "global", 1).
|
||||
AddDatacenter("dc1").
|
||||
|
||||
Reference in New Issue
Block a user