From 0d4fce93f1026c862abb5b6a23266f5ed4d1af60 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 1 Sep 2020 11:48:28 -0400 Subject: [PATCH 1/3] Update cronexpr to pick up month zero padding fix --- go.mod | 2 +- go.sum | 2 ++ .../hashicorp/cronexpr/cronexpr_parse.go | 18 +++++++++--------- vendor/modules.txt | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 9c7908d28a9..c1286540dba 100644 --- a/go.mod +++ b/go.mod @@ -56,7 +56,7 @@ require ( github.com/hashicorp/consul-template v0.24.1 github.com/hashicorp/consul/api v1.6.0 github.com/hashicorp/consul/sdk v0.6.0 - github.com/hashicorp/cronexpr v1.1.0 + github.com/hashicorp/cronexpr v1.1.1 github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de github.com/hashicorp/go-cleanhttp v0.5.1 github.com/hashicorp/go-connlimit v0.2.0 diff --git a/go.sum b/go.sum index 2942137418e..c3cc80973b0 100644 --- a/go.sum +++ b/go.sum @@ -334,6 +334,8 @@ github.com/hashicorp/consul/sdk v0.6.0 h1:FfhMEkwvQl57CildXJyGHnwGGM4HMODGyfjGwN github.com/hashicorp/consul/sdk v0.6.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/cronexpr v1.1.0 h1:dnNsWtH0V2ReN7JccYe8m//Bj14+PjJDntR1dz0Cixk= github.com/hashicorp/cronexpr v1.1.0/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= +github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= +github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= diff --git a/vendor/github.com/hashicorp/cronexpr/cronexpr_parse.go b/vendor/github.com/hashicorp/cronexpr/cronexpr_parse.go index d16f22aa1e4..e32f8709309 100644 --- a/vendor/github.com/hashicorp/cronexpr/cronexpr_parse.go +++ b/vendor/github.com/hashicorp/cronexpr/cronexpr_parse.go @@ -78,15 +78,15 @@ var ( "2090": 2090, "2091": 2091, "2092": 2092, "2093": 2093, "2094": 2094, "2095": 2095, "2096": 2096, "2097": 2097, "2098": 2098, "2099": 2099, } monthTokens = map[string]int{ - `1`: 1, `jan`: 1, `january`: 1, - `2`: 2, `feb`: 2, `february`: 2, - `3`: 3, `mar`: 3, `march`: 3, - `4`: 4, `apr`: 4, `april`: 4, - `5`: 5, `may`: 5, - `6`: 6, `jun`: 6, `june`: 6, - `7`: 7, `jul`: 7, `july`: 7, - `8`: 8, `aug`: 8, `august`: 8, - `9`: 9, `sep`: 9, `september`: 9, + `1`: 1, `01`: 1, `jan`: 1, `january`: 1, + `2`: 2, `02`: 2, `feb`: 2, `february`: 2, + `3`: 3, `03`: 3, `mar`: 3, `march`: 3, + `4`: 4, `04`: 4, `apr`: 4, `april`: 4, + `5`: 5, `05`: 5, `may`: 5, + `6`: 6, `06`: 6, `jun`: 6, `june`: 6, + `7`: 7, `07`: 7, `jul`: 7, `july`: 7, + `8`: 8, `08`: 8, `aug`: 8, `august`: 8, + `9`: 9, `09`: 9, `sep`: 9, `september`: 9, `10`: 10, `oct`: 10, `october`: 10, `11`: 11, `nov`: 11, `november`: 11, `12`: 12, `dec`: 12, `december`: 12, diff --git a/vendor/modules.txt b/vendor/modules.txt index c0dfdfd9c47..7089d57c7b0 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -363,7 +363,7 @@ github.com/hashicorp/consul/api github.com/hashicorp/consul/sdk/freeport github.com/hashicorp/consul/sdk/testutil github.com/hashicorp/consul/sdk/testutil/retry -# github.com/hashicorp/cronexpr v1.1.0 +# github.com/hashicorp/cronexpr v1.1.1 ## explicit github.com/hashicorp/cronexpr # github.com/hashicorp/errwrap v1.0.0 From 2794c9a74d990193e90e80add0037c670800d18a Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 1 Sep 2020 11:48:47 -0400 Subject: [PATCH 2/3] run `make vendor` --- vendor/github.com/hashicorp/nomad/api/tasks.go | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor/github.com/hashicorp/nomad/api/tasks.go b/vendor/github.com/hashicorp/nomad/api/tasks.go index 27bbdca2d18..2de8ea5915b 100644 --- a/vendor/github.com/hashicorp/nomad/api/tasks.go +++ b/vendor/github.com/hashicorp/nomad/api/tasks.go @@ -632,6 +632,7 @@ type DispatchPayloadConfig struct { const ( TaskLifecycleHookPrestart = "prestart" + TaskLifecycleHookPoststart = "poststart" ) type TaskLifecycle struct { From 3d0c57903006e4176ab57a10caef6886195a5120 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 1 Sep 2020 12:18:04 -0400 Subject: [PATCH 3/3] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f77b56e47ce..0ca72c27637 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ IMPROVEMENTS: BUG FIXES: * core: Fixed a bug where unpromoted job versions are used when rescheduling failed allocations [[GH-8691](https://github.com/hashicorp/nomad/issues/8691)] + * core: Fixed a bug where servers become unresponsive when cron jobs containing zero-padded months [[GH-8804](https://github.com/hashicorp/nomad/issues/8804)] * core: Fixed bugs where scaling policies could be matched against incorrect jobs with a similar prefix [[GH-8753](https://github.com/hashicorp/nomad/issues/8753)] * core: Fixed a bug where garbage collection evaluations that failed or spanned leader elections would be re-enqueued forever. [[GH-8682](https://github.com/hashicorp/nomad/issues/8682)] * core (Enterprise): Fixed a bug where enterprise servers may self-terminate as licenses are ignored after a Raft snapshot restore. [[GH-8737](https://github.com/hashicorp/nomad/issues/8737)]