Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of Multiple instances of a periodic job are run simultaneously, when prohibit_overlap is true into release/1.4.x #16660

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
671 commits
Select commit Hold shift + click to select a range
06e0393
docs: add ACL concepts page to introduce objects. (#15895)
jrasell Jan 30, 2023
166aee7
cli: separate auth method config output for easier reading. (#15892)
jrasell Jan 30, 2023
031765b
Fix documentation for `meta` block: string replacement in key from `-…
dttung2905 Jan 30, 2023
69b08bb
volume: Add the missing option propagation_mode (#15626)
shumin1027 Jan 30, 2023
dc77354
build(deps): bump github.com/docker/cli (#15938)
dependabot[bot] Jan 30, 2023
949a6f6
renamed stanza to block for consistency with other projects (#15941)
pkazmierczak Jan 30, 2023
de1a96c
build(deps): bump github.com/hashicorp/vault/api from 1.8.2 to 1.8.3 …
dependabot[bot] Jan 30, 2023
df2272b
build(deps): bump github.com/brianvoe/gofakeit/v6 from 6.19.0 to 6.20…
dependabot[bot] Jan 30, 2023
631fd47
build(deps): bump github.com/docker/docker from 20.10.21+incompatible…
dependabot[bot] Jan 30, 2023
340ad2d
Rename fields on proxyConfig (#15541)
jorgemarey Jan 30, 2023
f9d835f
Ensure infra_image gets proper label used for reconciliation (#15898)
ygersie Jan 30, 2023
ef3a42c
docs: Add info about variable item key name restrictions (#15966)
angrycub Jan 30, 2023
a5f568a
Corrected a typo (#15942)
sudharshan-ks Jan 30, 2023
ca597f7
Fix broken link, typo, style edits. (#15968)
angrycub Jan 30, 2023
ecf5a51
Fix typo in documentation (#15970)
bit2pixel Jan 31, 2023
7f3bdd4
docker: set force=true on remove image to handle images referenced by…
shoenig Jan 31, 2023
4a7a721
tests: bump consul and vault versions in test-core (#15979)
shoenig Jan 31, 2023
2285432
GC: ensure no leakage of evaluations for batch jobs. (#15097)
stswidwinski Jan 31, 2023
c2491e9
Increases max variable size to 64KiB from 16KiB (#15983)
mikenomitch Jan 31, 2023
813fd6e
docs: removed extra 'end' in one of the code blocks in template stanz…
Neutrollized Jan 31, 2023
b8bd6bb
15154/alloc redirect (#15969)
ChaiWithJai Jan 31, 2023
e23e366
docs: add upgrade notice for batch GC changes (#15985)
lgfa29 Jan 31, 2023
d375f60
e2e: remove unused consulacls directory (#15995)
shoenig Jan 31, 2023
0052596
acl: return 400 not 404 code when creating an invalid policy. (#16000)
jrasell Feb 1, 2023
e4e4dc1
acl: fix a bug in token creation when parsing expiration TTLs. (#15999)
jrasell Feb 1, 2023
fcc6cfa
consul: restore consul token when reverting a job (#15996)
shoenig Feb 1, 2023
67f8f22
fix(#13844): canonicalize job to avoid nil pointer deference (#13845)
tristanpemble Feb 1, 2023
00d5749
job parsing: fix panic when variable validation is missing condition …
tgross Feb 1, 2023
41065ef
changelog: fix entries for #15522 and #15819 (#15998)
lgfa29 Feb 1, 2023
46f3977
Allow wildcard datacenters to be specified in job file (#11170)
jmwilkinson Feb 2, 2023
55df5af
client: Add option to enable hairpinMode on Nomad bridge (#15961)
angrycub Feb 2, 2023
697bd87
[feat] Nomad Job Templates (#15746)
philrenaud Feb 2, 2023
d881b23
bootstrap: upgrade golangci-lint in prep for go1.20 (#16024)
shoenig Feb 2, 2023
89f4f2b
cli: Fix a panic in `deployment status` when scheduling is slow (#16011)
tgross Feb 2, 2023
9f583f5
Change `job init` default to example`.nomad.hcl` and recommend in doc…
gulducat Feb 2, 2023
fe4ff5b
Add option to expose workload token to task (#15755)
angrycub Feb 2, 2023
3225e5c
Update networking_bridge_linux.go (#16025)
angrycub Feb 2, 2023
fad28e4
docs: how to troubleshoot consul connect envoy (#15908)
gulducat Feb 2, 2023
ba20138
System and sysbatch jobs always have zero index (#16030)
tgross Feb 2, 2023
d71fc95
Label for the Web UI (#16006)
philrenaud Feb 2, 2023
ece6f33
Footer styles re-applied to job template footer (#16037)
philrenaud Feb 2, 2023
84ed398
docs: fix outstanding content conformance errors (#16040)
Feb 2, 2023
535795a
build: update to go1.20 (#16029)
shoenig Feb 3, 2023
2d7d633
scheduler: move utils into files specific to their scheduler type (#1…
tgross Feb 3, 2023
88c7ca6
ui: conditionally render buttons on job model (#16062)
ChaiWithJai Feb 6, 2023
0fd82e0
build: update hclogvet (#16065)
shoenig Feb 6, 2023
a4254f9
build: update hc-install and golangci-lint tools (#16067)
shoenig Feb 6, 2023
9bab96e
Task API via Unix Domain Socket (#15864)
schmichael Feb 6, 2023
34c8246
docker: disable driver when running as non-root on cgroups v2 hosts (…
shoenig Feb 6, 2023
3685a3b
website: add content-check command (#16064)
Feb 6, 2023
b19df69
Add `-json` and `-t` flag for `nomad acl token create` command (#16055)
dttung2905 Feb 7, 2023
c4957b0
e2e: mark framework package as deprecated (#16075)
shoenig Feb 7, 2023
b667c58
docs: update CLI contrib checklist (#16073)
lgfa29 Feb 7, 2023
ae26057
docs: update default Nomad bridge config (#16072)
lgfa29 Feb 7, 2023
6145cdc
cli: remove deprecated `keyring` and `keygen` commands (#16068)
tgross Feb 7, 2023
b21aeb8
main: remove deprecated uses of rand.Seed (#16074)
shoenig Feb 7, 2023
b9d8e3d
doc: specifiy the default output is of json format for `nomad quota i…
dttung2905 Feb 7, 2023
ab3550f
agent: fix agent HTTP server audit event implementation access. (#16076)
jrasell Feb 7, 2023
0a3cadb
Add sprig for command templates (#9053)
angrycub Feb 7, 2023
4fd3c17
docs: update example `license_path` (#16082)
tgross Feb 7, 2023
6809b0b
Dynamic Node Metadata (#15844)
schmichael Feb 7, 2023
4e55060
rcp: bump SSO feature gate version. (#16080)
jrasell Feb 7, 2023
2cd32b9
Prepare release 1.5.0-beta.1
jrasell Feb 8, 2023
3d735e7
Generate files for 1.5.0-beta.1 release
hc-github-team-nomad-core Feb 8, 2023
cd0d06a
Prepare for next release
hc-github-team-nomad-core Feb 8, 2023
41b23af
Merge pull request #16092 from hashicorp/release/1.5.0-beta.1
schmichael Feb 8, 2023
214e5b9
docs: cleanup 1.5 changelog entries (#16094)
schmichael Feb 8, 2023
77ea4e3
users: eliminate LookupGroupId and its one use case (#16093)
shoenig Feb 8, 2023
7798fe3
deps: upgrade to hashicorp/golang-lru/v2 (#16085)
shoenig Feb 8, 2023
4aca687
read: fix incorrect link to ref. arch. (#16103)
jrasell Feb 9, 2023
8d6d680
circle: hardcode go1.20 string because yaml (#16104)
shoenig Feb 9, 2023
70101ae
cli: fix use of the sanitized method type for the login command. (#16…
jrasell Feb 9, 2023
87e7ea3
users: create cache for user lookups (#16100)
shoenig Feb 9, 2023
88cd93b
docs: fix links in 1.5.0 upgrade guide (#16106)
tgross Feb 9, 2023
d1dcf10
acl: never return auth errors for `ACL.Bootstrap` RPC (#16108)
tgross Feb 9, 2023
e1dfadd
tests: reduce timeout on test-api (#16107)
shoenig Feb 9, 2023
3fbc74d
ui: hide custom label if not text is provided (#16115)
lgfa29 Feb 9, 2023
bbf9b07
[chore] Move TestUtil_loadVersionControlGlobalConfigs into build flag…
angrycub Feb 9, 2023
05f6fbc
ci: reduce number of ember-test-audit iterations (#16118)
lgfa29 Feb 9, 2023
eabb47e
Workload Identity, Task API, and Dynamic Node Metadata Docs (#16102)
schmichael Feb 10, 2023
ce614bf
tests: don't mutate global structs in core scheduler tests (#16120)
tgross Feb 10, 2023
1eabc36
eval broker: use write lock when reaping cancelable evals (#16112)
tgross Feb 10, 2023
7da6ade
chore: Convert assets from bindatafs to go embeds (#16066)
angrycub Feb 10, 2023
146f459
slashed comments and datacenters note (#16116)
philrenaud Feb 10, 2023
e803d7c
[core] Do not start the plugin loader on non-clients (#16111)
angrycub Feb 10, 2023
2989302
Add information about template to interpolation page (#10807)
angrycub Feb 10, 2023
26607b4
git: ignore .fleet directory (#16144)
shoenig Feb 13, 2023
c35af4c
deps: update go-set, go-landlock (#16146)
shoenig Feb 13, 2023
e7f8957
build(deps): bump json5 from 1.0.1 to 1.0.2 in /website (#15694)
dependabot[bot] Feb 13, 2023
c4c4eec
build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /websit…
dependabot[bot] Feb 13, 2023
1d5fafe
build(deps): bump github.com/docker/cli (#16141)
dependabot[bot] Feb 13, 2023
fc22c15
build(deps): bump google.golang.org/grpc from 1.52.0 to 1.53.0 (#16142)
dependabot[bot] Feb 13, 2023
25fd8ec
build(deps): bump github.com/containernetworking/plugins (#16060)
dependabot[bot] Feb 13, 2023
b8616bf
build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.12 to 3.23.…
dependabot[bot] Feb 13, 2023
6d27cee
Fix unbold header `Device Group Attributes` and remove unused var in …
dttung2905 Feb 13, 2023
24c236b
ui: glimmerize JobEditor (#16070)
ChaiWithJai Feb 13, 2023
c41ccc6
cni: handle multi-path cni_path when fingerprinting plugins (#16163)
shoenig Feb 13, 2023
d0f9008
Add warnings to `var put` for non-alphanumeric keys. (#15933)
angrycub Feb 13, 2023
ad35b0d
docs: add variable specification docs (#16165)
schmichael Feb 13, 2023
1154c05
api: fix missing Node Status "disconnected" in API (#16166)
Feb 14, 2023
511d0c1
artifact: protect against unbounded artifact decompression (1.5.0) (#…
shoenig Feb 14, 2023
8373434
docs: clarify upgrade note on 1.4.0 panics (#16171)
tgross Feb 14, 2023
fd011ce
eventstream: Handle missing policy documents in event streams (#15495)
wjnicholson Feb 14, 2023
1a96f9e
build: update to go1.20.1 (#16182)
tgross Feb 14, 2023
7ffb0b1
docs: remove cores/memory beta label, update driver cpu docs (#16175)
shoenig Feb 14, 2023
36a9886
cgutil: handle panic from runc helper method (#16180)
shoenig Feb 14, 2023
82ccae2
Merge release 1.4.4 changelog entries (#16190)
tgross Feb 15, 2023
68abcb8
cli: `fmt -check` should return early on diff (#16174)
tgross Feb 15, 2023
26f8a95
build(deps): bump github.com/containerd/containerd from 1.6.12 to 1.6…
dependabot[bot] Feb 16, 2023
7d4ccf1
csi: add option to configure CSIVolumeClaimGCInterval (#16195)
visweshs-cb Feb 16, 2023
6226e56
build: correct Makefile to run smoke tests locally (#16137)
farbodahm Feb 16, 2023
f9d611c
fix test flake for RPC TLS enforcement test (#16199)
tgross Feb 16, 2023
037823e
Minor post-1.5-beta1 API, code, and docs cleanups (#16193)
schmichael Feb 16, 2023
38931c9
[cli] var put - Add extension parsing to second argument when file (#…
angrycub Feb 16, 2023
ebe4b51
[CI only] Prepare workflow rollout (#15600)
mdeggies Feb 16, 2023
365ccf4
Allow configurable range of Job priorities (#16084)
alessio-perugini Feb 17, 2023
40f1ffb
Count and comments added to hello-world (#16162)
philrenaud Feb 17, 2023
004ddb2
acl: add validation to binding rule selector on upsert. (#16210)
jrasell Feb 17, 2023
8c462ce
docs: clarify sysbatch supports count (#16205)
schmichael Feb 17, 2023
ed4ad3e
docs: slight tidy up of var create example payload (#16212)
shoenig Feb 17, 2023
517ad9c
E2E: add multi-home networking to test infrastructure (#16218)
tgross Feb 20, 2023
d5f0db8
Task API / Dynamic Node Metadata E2E test fixes (#16219)
schmichael Feb 21, 2023
2a0dde3
api: fix a panic and tweak some exported types (#16237)
shoenig Feb 22, 2023
30bcd51
services: ensure task group is set on service hook (#16240)
shoenig Feb 22, 2023
41e510a
Fix missing query parameter in job doc (#16233)
dttung2905 Feb 22, 2023
a877fd9
build(deps): bump golang.org/x/net from 0.5.0 to 0.7.0 (#16220)
dependabot[bot] Feb 22, 2023
1ff1132
services: Set Nomad's User-Agent by default on HTTP checks for nomad …
shoenig Feb 23, 2023
35e5772
agent: only reload HTTP servers that use TLS (#16250)
schmichael Feb 23, 2023
7c56fd5
CSI: fix potential state store corruptions (#16256)
tgross Feb 27, 2023
f619b0b
populate Nomad token for task runner update hooks (#16266)
tgross Feb 27, 2023
4bdfe6d
build/cli: Add BuildDate (#16216)
gulducat Feb 27, 2023
542b23e
Accept Workload Identities for Client RPCs (#16254)
schmichael Feb 27, 2023
c5d54ab
Prepare release 1.5.0-rc.1
schmichael Feb 27, 2023
0deb5c4
Generate files for 1.5.0-rc.1 release
hc-github-team-nomad-core Feb 27, 2023
b739144
Prepare for next release
hc-github-team-nomad-core Feb 27, 2023
cf5b14c
Merge pull request #16284 from hashicorp/post-1.5.0-rc.1-release
jrasell Mar 2, 2023
ba6d20b
prepare release 1.5.0
jrasell Mar 1, 2023
01d049e
Generate files for 1.5.0 release
hc-github-team-nomad-core Mar 1, 2023
4734c02
Prepare for next release
hc-github-team-nomad-core Mar 1, 2023
646a82b
Merge release 1.5.0 files
jrasell Mar 2, 2023
a9bb8e9
client: use RPC address and not serf after initial Consul discovery (…
tgross Mar 2, 2023
fbd0dcb
tests: add functionality to skip a test if it's not running in CI and…
farbodahm Mar 2, 2023
9102a24
deps: update go-plugin to 1.4.9 (#16292)
tgross Mar 2, 2023
bbd41c8
handle `FSM.Apply` errors in `raftApply` (#16287)
tgross Mar 2, 2023
f88e3b0
[ui, helios] Toast Component (#16099)
philrenaud Mar 2, 2023
f553dc8
Merge pull request #16293 from hashicorp/post-1.5.0-release
schmichael Mar 2, 2023
273b76a
cli: sort Node value in `nomad operator raft list-peers` command (#16…
dttung2905 Mar 2, 2023
f89910d
Add namespace argument to the job verification help text (#16243)
Valefant Mar 2, 2023
64d27c6
docs: fix typos in task-api.mdx and workload-identity.mdx (#16309)
aofei Mar 3, 2023
2ec6575
api: add new test case for force-leave (#16260)
dttung2905 Mar 3, 2023
a4f7926
service: fix regression in task access to list/read endpoint (#16316)
tgross Mar 3, 2023
0e824d3
cli: use shared logic for resolving job prefix (#16306)
lgfa29 Mar 3, 2023
158d6a9
docs: fix alloc stop `no_shutdown_delay` (#16282)
lgfa29 Mar 3, 2023
ceed255
remove backcompat support for non-atomic job registration (#16305)
tgross Mar 3, 2023
b24dddc
api: set last index and request time on alloc stop (#16319)
lgfa29 Mar 3, 2023
b07af57
client: don't emit task shutdown delay event if not waiting (#16281)
lgfa29 Mar 3, 2023
a57f97e
[ui] Fix: Wildcard-datacenter system/sysbatch jobs stopped showing cl…
philrenaud Mar 6, 2023
78bcd32
deps: update test to 0.6.2 for new functions (#16326)
shoenig Mar 6, 2023
605f155
CI: delete test-link-rewrites.yml (#16354)
ashleemboyer Mar 6, 2023
6f52a91
scheduler: correctly detect inplace update with wildcard datacenters …
tgross Mar 7, 2023
03d6a8c
docs: note that secrets dir is usually mounted `noexec` (#16363)
tgross Mar 7, 2023
003a567
cli: support `json` and `t` on `acl binding-rule info` command. (#16357)
jrasell Mar 7, 2023
b677ec7
docs: add 1.5.0, 1.4.5, and 1.3.10 pause regression upgrade note. (#1…
jrasell Mar 7, 2023
b3f7559
docker: fix bug where network pause containers would be erroneously r…
shoenig Mar 7, 2023
24af468
e2e: fix permissions on nomad data directory (#16376)
shoenig Mar 7, 2023
5d5740b
Outage recovery link fix (#16365)
philrenaud Mar 7, 2023
37e9eca
build(deps): bump golang.org/x/crypto from 0.5.0 to 0.7.0 (#16337)
dependabot[bot] Mar 8, 2023
99f43c1
Update ioutil library references to os and io respectively for comman…
lhaig Mar 8, 2023
962b65f
Update ioutil library references to os and io respectively for e2e he…
lhaig Mar 8, 2023
0e74431
Update ioutil library references to os and io respectively for API an…
lhaig Mar 8, 2023
3160c76
deps: Update ioutil library references to os and io respectively for …
lhaig Mar 8, 2023
48e7d70
deps: Update ioutil deprecated library references to os and io respec…
lhaig Mar 8, 2023
fcd51dc
[ui] Fix: New toast notifications no longer last forever (#16384)
philrenaud Mar 8, 2023
40ab325
e2e: setup nomad permissions correctly (client vs. server) (#16399)
shoenig Mar 8, 2023
95359b8
client: disable running artifact downloader as nobody (#16375)
shoenig Mar 8, 2023
1227615
Updated who-uses-nomad to add Behavox (#16339)
Oloremo Mar 9, 2023
c36d3bd
scheduling: prevent self-collision in dynamic port network offerings …
tgross Mar 9, 2023
0f7ad3b
cli: fix help output format on `job init` command. (#16407)
jrasell Mar 9, 2023
1dd3203
docs: update content-conformance package (#16412)
Mar 9, 2023
4fdb5c4
cli: remove hard requirement on `list-jobs` (#16380)
lgfa29 Mar 9, 2023
730adaa
env/aws: update ec2 cpu info data (#16417)
schmichael Mar 9, 2023
712c669
cli: add `-json` and `-t` flag for `alloc checks` command (#16405)
Juanadelacuesta Mar 10, 2023
419c4bf
allocrunner: fix health check monitoring for Consul services (#16402)
lgfa29 Mar 10, 2023
9fefc18
e2e fixes: cli output, timing issue, and some cleanups (#16418)
schmichael Mar 10, 2023
d0ddd5e
acl: prevent privilege escalation via workload identity
tgross Mar 3, 2023
669495b
Generate files for 1.5.1 release
hc-github-team-nomad-core Mar 10, 2023
6c91cc8
Prepare for next release
hc-github-team-nomad-core Mar 10, 2023
172f49f
Merge release 1.5.1 files
tgross Mar 13, 2023
2a0e45b
Merge pull request #16445 from hashicorp/post-1.5.1-release
tgross Mar 13, 2023
a34925f
deps: remove replace statement for go-discover (#16304)
shoenig Mar 13, 2023
12688f2
scheduler: add simple benchmark for tasksUpdated (#16422)
shoenig Mar 13, 2023
b6d6cc4
scheduler: refactor system util tests (#16416)
tgross Mar 13, 2023
5febe9b
build(deps): bump go.uber.org/goleak from 1.2.0 to 1.2.1 (#16439)
dependabot[bot] Mar 13, 2023
5f37b2f
build: update from go1.20.1 to go1.20.2 (#16427)
schmichael Mar 13, 2023
f3a527b
doc: Update `nomad fmt` doc to run against non-deprecated HCL2 jobspe…
dttung2905 Mar 13, 2023
b2c8732
plugin: add missing fields to `TaskConfig` (#16434)
lgfa29 Mar 13, 2023
f2bfbfa
acl: update job eval requirement to `submit-job` (#16463)
lgfa29 Mar 13, 2023
a42a33f
cgv1: do not disable cpuset manager if reserved interface already exi…
shoenig Mar 13, 2023
c70bbd1
agent: trim space when parsing X-Nomad-Token header (#16469)
tgross Mar 14, 2023
101e5d0
docs: clarify migration behavior under `nomad alloc stop` (#16468)
tgross Mar 14, 2023
eaf22f2
cli: Add `-json` and `-t` flags to `namespace status` command (#16442)
Juanadelacuesta Mar 14, 2023
362f752
Updated trial license link and wording
tunzor Mar 14, 2023
d5e0130
Merge pull request #16484 from hashicorp/tunzor-patch-1
tunzor Mar 14, 2023
1a01e87
scheduler: annotate tasksUpdated with reason and purge DeepEquals (#1…
shoenig Mar 14, 2023
bdf468c
cli: fix login help output formatting. (#16502)
jrasell Mar 15, 2023
e4963b9
test: set BuildDate in default TestAgent config (#16499)
gulducat Mar 15, 2023
323abf7
build: fix `test-nomad` make target when running locally. (#16506)
jrasell Mar 16, 2023
098650e
artifact: use specific version link for zipbomb artifact (#16513)
shoenig Mar 16, 2023
ea727df
artifact: do not set process attributes on darwin (#16511)
shoenig Mar 16, 2023
46ae102
docs: dispatch_payload and jobs api docs had some weirdness (#16514)
schmichael Mar 16, 2023
995ab41
artifact: git needs more files for private repositories (#16508)
shoenig Mar 16, 2023
8684183
client: don't use `Status` RPC for Consul discovery (#16490)
tgross Mar 16, 2023
282e3bc
Enable ACLs on E2E test clients (#16530)
schmichael Mar 16, 2023
57a3cbe
docs: add binding-rule selector escape example on Windows PS (#16273)
jrasell Mar 17, 2023
76649df
acl: fix canonicalization of OIDC auth method mock (#16534)
pkazmierczak Mar 17, 2023
ed498f8
nsd: always set deregister flag after deregistration of group (#16289)
shoenig Mar 17, 2023
b95b105
cli: nomad login command should not require a -type flag and should r…
pkazmierczak Mar 17, 2023
1cfa95e
tls enforcement flaky tests (#16543)
shoenig Mar 17, 2023
cd8615d
Spelling update (#16553)
DocAdam Mar 20, 2023
151147b
cli: Add `json` and `-t` flags to `server members` command (#16444)
Juanadelacuesta Mar 20, 2023
26b4fcc
cli: add `-json` and `-t` flags to `quota status` command (#16485)
Juanadelacuesta Mar 20, 2023
cc110f4
Add `-json` flag to `quota inspect` command (#16478)
Juanadelacuesta Mar 20, 2023
0071844
[ui] Perform common job tasks with keyboard shortcuts (#16378)
philrenaud Mar 20, 2023
96740b5
docs: remove Java and Scala SDKs from supported list. (#16555)
jrasell Mar 20, 2023
aacc7c6
dev: remove use of cfssl and use Nomad CLI for TLS certs. (#16145)
jrasell Mar 20, 2023
695df42
contrib: mock driver (#16573)
tgross Mar 20, 2023
fb08518
client/metadata: fix crasher caused by AllowStale = false (#16549)
schmichael Mar 20, 2023
a633b79
changelog: update #16427 to improvement (#16565)
lgfa29 Mar 21, 2023
a90df9d
contrib: architecture guide to the drainer (#16569)
tgross Mar 21, 2023
5309325
Update csi_plugin.mdx (#16584)
Suselz Mar 21, 2023
a73a399
Windows fixes for e2e tests (#16592)
schmichael Mar 21, 2023
aece7b0
E2E: fix events tests (#16595)
tgross Mar 21, 2023
337a8d2
e2e: sleep to ensure logs are picked up (#16596)
schmichael Mar 21, 2023
4d31fd3
taskapi: use HasSuffix to detect errors from rpcs (#16594)
schmichael Mar 21, 2023
39ec124
docs: detail support for Nomad checks in service block. (#16598)
jrasell Mar 22, 2023
cb9ce8b
Fix broken test for quotas CLI (#16610)
Juanadelacuesta Mar 22, 2023
2a22d71
[ui] Copyable server and client attribute values (#16548)
philrenaud Mar 22, 2023
1a53d9c
Post 1.5.2 release (#16614)
schmichael Mar 22, 2023
23b3647
drainer: test refactoring to clarify behavior around delete/down node…
tgross Mar 23, 2023
1061ddd
ci: send notification when prepare is complete (#16627)
lgfa29 Mar 23, 2023
fffdbdf
cli: job restart command (#16278)
lgfa29 Mar 23, 2023
b84c455
docs: added section of needed ACL rules for Nomad UI (#16494)
ron-savoia Mar 24, 2023
72ad885
scheduler: fix reconciliation of reconnecting allocs (#16609)
lgfa29 Mar 24, 2023
6626965
style: rename ForceRun to ForceEval, for clarity (#16617)
Juanadelacuesta Mar 27, 2023
51249fc
Multiple instances of a periodic job are run simultaneously, when pro…
jrasell Mar 21, 2023
45442a5
backport of commit 51249fcfa59d900d45b93f9fc7034d303985cb3e
jrasell Mar 21, 2023
71a09f5
Merge 51249fcfa59d900d45b93f9fc7034d303985cb3e into backport/b-gh-110…
hc-github-team-nomad-core Mar 27, 2023
f2a900f
backport of commit e9850f3fbe01921293f15e8d06841f2cd2b5ccbf
Juanadelacuesta Mar 21, 2023
50e83d7
Merge branch 'release/1.4.x' into backport/b-gh-11052/actually-enormo…
Juanadelacuesta Mar 27, 2023
729c523
Update leader.go
Juanadelacuesta Mar 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nomad/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ func (s *Server) restorePeriodicDispatcher() error {
logger.Error("force run of periodic job failed", "job", job.NamespacedID(), "error", err)
return fmt.Errorf("force run of periodic job %q failed: %v", job.NamespacedID(), err)
}
logger.Debug("periodic job force runned during leadership establishment", "job", job.NamespacedID())

logger.Debug("periodic job force ran during leadership establishment", "job", job.NamespacedID())
}

return nil
Expand Down
178 changes: 178 additions & 0 deletions nomad/leader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,34 @@ func TestLeader_PeriodicDispatcher_Restore_NoEvals(t *testing.T) {
}
}

type mockJobEvalDispatcher struct {
called, children bool
evalToReturn *structs.Evaluation
}

func (mjed *mockJobEvalDispatcher) DispatchJob(job *structs.Job) (*structs.Evaluation, error) {
mjed.called = true
return mjed.evalToReturn, nil
}

func (mjed *mockJobEvalDispatcher) RunningChildren(job *structs.Job) (bool, error) {
return mjed.children, nil
}

func testPeriodicJobWithOverlapEnabled(times ...time.Time) *structs.Job {
job := testPeriodicJob(times...)
job.Periodic.ProhibitOverlap = true
return job
}

func TestLeader_PeriodicDispatcher_Restore_Evals(t *testing.T) {
ci.Parallel(t)

s1, cleanupS1 := TestServer(t, func(c *Config) {
c.NumSchedulers = 0
})
defer cleanupS1()

testutil.WaitForLeader(t, s1.RPC)

// Inject a periodic job that triggered once in the past, should trigger now
Expand All @@ -464,6 +485,158 @@ func TestLeader_PeriodicDispatcher_Restore_Evals(t *testing.T) {
t.Fatalf("err: %v", err)
}

// Create an eval for the past launch.
eval, _ := s1.periodicDispatcher.createEval(job, past)

md := &mockJobEvalDispatcher{
children: false,
evalToReturn: eval,
}

s1.periodicDispatcher.dispatcher = md

// Flush the periodic dispatcher, ensuring that no evals will be created.
s1.periodicDispatcher.SetEnabled(false)

// Sleep till after the job should have been launched.
time.Sleep(3 * time.Second)

// Restore the periodic dispatcher.
s1.periodicDispatcher.SetEnabled(true)

s1.restorePeriodicDispatcher()

// Ensure the job is tracked.
tuple := structs.NamespacedID{
ID: job.ID,
Namespace: job.Namespace,
}
if _, tracked := s1.periodicDispatcher.tracked[tuple]; !tracked {
t.Fatalf("periodic job not restored")
}

// Check that an eval was made.
ws := memdb.NewWatchSet()
last, err := s1.fsm.State().PeriodicLaunchByID(ws, job.Namespace, job.ID)
if err != nil || last == nil {
t.Fatalf("failed to get periodic launch time: %v", err)
}
if last.Launch == past {
t.Fatalf("restorePeriodicDispatcher did not force launch")
}

if md.called != true {
t.Fatalf("failed to force job evaluation")
}
}

func TestLeader_PeriodicDispatcher_No_Overlaps_No_Running_Job(t *testing.T) {
ci.Parallel(t)

s1, cleanupS1 := TestServer(t, func(c *Config) {
c.NumSchedulers = 0
})
defer cleanupS1()
testutil.WaitForLeader(t, s1.RPC)

// Inject a periodic job that triggered once in the past, should trigger now
// and once in the future.
now := time.Now()
past := now.Add(-1 * time.Second)
future := now.Add(10 * time.Second)

job := testPeriodicJobWithOverlapEnabled(past, now, future)
req := structs.JobRegisterRequest{
Job: job,
WriteRequest: structs.WriteRequest{
Namespace: job.Namespace,
},
}
_, _, err := s1.raftApply(structs.JobRegisterRequestType, req)
if err != nil {
t.Fatalf("err: %v", err)
}

// Create an eval for the past launch.
eval, _ := s1.periodicDispatcher.createEval(job, past)

md := &mockJobEvalDispatcher{
children: false,
evalToReturn: eval,
}

s1.periodicDispatcher.dispatcher = md

// Flush the periodic dispatcher, ensuring that no evals will be created.
s1.periodicDispatcher.SetEnabled(false)

// Sleep till after the job should have been launched.
time.Sleep(3 * time.Second)

// Restore the periodic dispatcher.
s1.periodicDispatcher.SetEnabled(true)
s1.restorePeriodicDispatcher()

// Ensure the job is tracked.
tuple := structs.NamespacedID{
ID: job.ID,
Namespace: job.Namespace,
}
if _, tracked := s1.periodicDispatcher.tracked[tuple]; !tracked {
t.Fatalf("periodic job not restored")
}

// Check that an eval was made.
ws := memdb.NewWatchSet()
last, err := s1.fsm.State().PeriodicLaunchByID(ws, job.Namespace, job.ID)
if err != nil || last == nil {
t.Fatalf("failed to get periodic launch time: %v", err)
}

if last.Launch == past {
t.Fatalf("restorePeriodicDispatcher did not force launch")
}

if md.called != true {
t.Fatalf("failed to force job evaluation")
}
}

func TestLeader_PeriodicDispatcher_No_Overlaps_Running_Job(t *testing.T) {
ci.Parallel(t)

s1, cleanupS1 := TestServer(t, func(c *Config) {
c.NumSchedulers = 0
})
defer cleanupS1()
testutil.WaitForLeader(t, s1.RPC)

md := &mockJobEvalDispatcher{
children: true,
evalToReturn: nil,
}

s1.periodicDispatcher.dispatcher = md

// Inject a periodic job that triggered once in the past, should trigger now
// and once in the future.
now := time.Now()
past := now.Add(-1 * time.Second)
future := now.Add(10 * time.Second)
job := testPeriodicJob(past, now, future)

req := structs.JobRegisterRequest{
Job: job,
PolicyOverride: true,
WriteRequest: structs.WriteRequest{
Namespace: job.Namespace,
},
}
_, _, err := s1.raftApply(structs.JobRegisterRequestType, req)
if err != nil {
t.Fatalf("err: %v", err)
}

// Create an eval for the past launch.
s1.periodicDispatcher.createEval(job, past)

Expand Down Expand Up @@ -492,9 +665,14 @@ func TestLeader_PeriodicDispatcher_Restore_Evals(t *testing.T) {
if err != nil || last == nil {
t.Fatalf("failed to get periodic launch time: %v", err)
}

if last.Launch == past {
t.Fatalf("restorePeriodicDispatcher did not force launch")
}

if md.called != false {
t.Fatalf("job evaluation forced when job is already running")
}
}

func TestLeader_PeriodicDispatch(t *testing.T) {
Expand Down
8 changes: 2 additions & 6 deletions nomad/periodic.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ func (p *PeriodicDispatch) removeLocked(jobID structs.NamespacedID) error {
// subsequent eval.
func (p *PeriodicDispatch) ForceEval(namespace, jobID string) (*structs.Evaluation, error) {
p.l.Lock()
defer p.l.Unlock()

// Do nothing if not enabled
if !p.enabled {
p.l.Unlock()
return nil, fmt.Errorf("periodic dispatch disabled")
}

Expand All @@ -312,11 +312,9 @@ func (p *PeriodicDispatch) ForceEval(namespace, jobID string) (*structs.Evaluati
}
job, tracked := p.tracked[tuple]
if !tracked {
p.l.Unlock()
return nil, fmt.Errorf("can't force run non-tracked job %q (%s)", jobID, namespace)
}

p.l.Unlock()
return p.createEval(job, time.Now().In(job.Periodic.GetLocation()))
}

Expand Down Expand Up @@ -356,6 +354,7 @@ func (p *PeriodicDispatch) run(ctx context.Context, updateCh <-chan struct{}) {
// based on the passed launch time.
func (p *PeriodicDispatch) dispatch(job *structs.Job, launchTime time.Time) {
p.l.Lock()
defer p.l.Unlock()

nextLaunch, err := job.Periodic.Next(launchTime)
if err != nil {
Expand All @@ -370,19 +369,16 @@ func (p *PeriodicDispatch) dispatch(job *structs.Job, launchTime time.Time) {
running, err := p.dispatcher.RunningChildren(job)
if err != nil {
p.logger.Error("failed to determine if periodic job has running children", "job", job.NamespacedID(), "error", err)
p.l.Unlock()
return
}

if running {
p.logger.Debug("skipping launch of periodic job because job prohibits overlap", "job", job.NamespacedID())
p.l.Unlock()
return
}
}

p.logger.Debug(" launching job", "job", job.NamespacedID(), "launch_time", launchTime)
p.l.Unlock()
p.createEval(job, launchTime)
}

Expand Down