-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow scaling system jobs to 0 (#24363)
* func: remove validation scaling for system jobs and dont canonicalize to 1 * test: update test to validate for 0 and improve error message * func: remove the canonicalization to 1 from system jobs * docs: add changelog * func: add test for scaling system jobs * temp: add logging to debug test * fix: clean up after test is done * fix: scaled down jobs will still have the stop allocation, update test to account for it * Update the e2e test to accomodate for system jobs to have an alloc per node * fix: filter to only count ready nodes on the node count * fix: remove the datacenter constrain from the system job definition * fix: compare alloc IDs to avoid flaky tests when verifying no alloc was stoped * fix: remove duplicated code
- Loading branch information
1 parent
3dfbc89
commit 1f94419
Showing
6 changed files
with
156 additions
and
10 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:improvement | ||
core: add the possibility to scale system jobs between 0 and 1 | ||
``` |
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,25 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: BUSL-1.1 | ||
|
||
job "system_job" { | ||
type = "system" | ||
|
||
group "system_job_group" { | ||
|
||
task "system_task" { | ||
driver = "docker" | ||
|
||
config { | ||
image = "busybox:1" | ||
|
||
command = "/bin/sh" | ||
args = ["-c", "sleep 15000"] | ||
} | ||
|
||
env { | ||
version = "1" | ||
} | ||
} | ||
} | ||
} | ||
|
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
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
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
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