Commit Graph

110 Commits

Author SHA1 Message Date
Michael Schurter
b381b5fff7 grace_period -> grace 2017-09-26 10:21:35 -07:00
Michael Schurter
80147622c5 Add comments 2017-09-15 14:34:36 -07:00
Michael Schurter
092057a32b Canonicalize and Merge CheckRestart in api 2017-09-14 16:48:39 -07:00
Michael Schurter
78c72f8725 Default grace period to 1s 2017-09-14 16:46:54 -07:00
Michael Schurter
555d1e24dc on_warning=false -> ignore_warnings=false
Treat warnings as unhealthy by default
2017-09-14 16:46:54 -07:00
Michael Schurter
bd1a342a92 Nest restart fields in CheckRestart 2017-09-14 16:46:54 -07:00
Michael Schurter
a720bb5a91 Add restart fields 2017-09-14 16:46:54 -07:00
Alex Dadgar
6723bade37 Don't merge empty update from job into task groups
This PR fixes an issue in which we would merge an update stanza from the
job into the task groups even if it was empty. This broke round
tripping a job (reading from the api and resubmitting as JSON)

Fixes https://github.com/hashicorp/nomad/issues/3132
2017-08-30 11:35:19 -07:00
Michael Schurter
947516405a Add Header and Method support for HTTP checks 2017-08-17 16:44:21 -07:00
Michael Schurter
beae45bad5 Add optional shutdown delay to tasks
Fixes #2441

Defaults to 0 (no delay) for backward compat and because this feature
should be opt-in.
2017-08-16 17:59:46 -07:00
Alex Dadgar
43d2c425d1 Emit generic task events 2017-08-07 21:26:04 -07:00
Alex Dadgar
053cff812a Allow template to set Vault grace
This PR allows a template to specify the Vault grace duration.

Fixes https://github.com/hashicorp/nomad/issues/2922
2017-08-01 14:14:08 -07:00
Alex Dadgar
27048bb7fa events 2017-07-07 12:12:48 -07:00
Alex Dadgar
e1c631064a @jippi Changed my mind! Good suggestion 2017-07-07 12:12:48 -07:00
Alex Dadgar
da82a6e814 initial watcher 2017-07-07 12:07:08 -07:00
Michael Schurter
450e347708 Add support for go-getter modes
Fixes #2678
2017-07-06 10:45:44 -07:00
Michael Schurter
3f37be369d Move caonicalization from nomad/structs/ to api/ 2017-06-21 17:19:08 -07:00
Michael Schurter
3fddb05fc8 Implement DriverNetwork and Service.AddressMode
Ideally DriverNetwork would be fully populated in Driver.Prestart, but
Docker doesn't assign the container's IP until you start the container.

However, it's important to setup the port env vars before calling
Driver.Start, so Prestart should populate that.
2017-06-21 17:19:08 -07:00
Michael Schurter
7dac668adf Functional consul template env file support 2017-05-23 13:45:14 -07:00
Alex Dadgar
d606e98a6e New update block; still need to handle the upgrade path 2017-05-08 17:44:26 -07:00
Michael Schurter
7c67166510 Add TLSSkipVerify support to api and parser 2017-04-19 12:45:34 -07:00
Alex Dadgar
d212f6fe94 Track task start/finish time & improve logs errors
This PR adds tracking to when a task starts and finishes and the logs
API takes advantage of this and returns better errors when asking for
logs that do not exist.
2017-03-31 16:14:11 -07:00
Alex Dadgar
8b1359c2d0 Fix canonicalization of services 2017-03-01 15:30:01 -08:00
Michael Schurter
fe4537e1f3 Add Canonicalize test mimicing example job + template 2017-02-24 12:08:31 -08:00
Michael Schurter
d1794c1714 Missed initializing another field in Template! 2017-02-24 10:47:50 -08:00
Michael Schurter
24f5ec3e09 Template.Canonicalize wasn't initializing all fields 2017-02-24 10:31:05 -08:00
Alex Dadgar
c89d8247e6 Merge pull request #2302 from hashicorp/f-task-state-setup
Adding a task event for setup
2017-02-22 18:42:57 -08:00
Diptanu Choudhury
c80bdd9f5f Adding a task event for setup 2017-02-22 18:28:07 -08:00
Alex Dadgar
55e7ad7fd9 Remove defaulting from parse and fix parser tests
This PR removes defaulting from the parse, fixes some regressions that
existed as part of the parser refactor and fixes the tests.
2017-02-22 12:30:05 -08:00
Alex Dadgar
ee76b78922 rebase 2017-02-20 16:43:28 -08:00
Alex Dadgar
69aa5db628 Add leader and timezone to conversion 2017-02-20 16:36:41 -08:00
Diptanu Choudhury
5502a669e8 Added tests 2017-02-16 13:52:39 -08:00
Diptanu Choudhury
f551dcb83e Making the job spec return api.Job 2017-02-16 13:52:39 -08:00
Alex Dadgar
81c412cda0 Api Leader becomes a pointer 2017-02-13 10:43:33 -08:00
Alex Dadgar
edbc84087c Add Leader support to client 2017-02-10 17:55:19 -08:00
Alex Dadgar
a22f1647f9 Add leader task to api and server side 2017-02-10 16:57:47 -08:00
Alex Dadgar
9afa48310e Template destination file permissions.
This PR allows setting the file permissions of the rendered template.
2017-01-31 20:10:01 -08:00
Alex Dadgar
314435261d Rename dispatch_input to dispatch_payload 2017-01-25 21:27:44 -08:00
Alex Dadgar
248c069652 Merge pull request #2128 from hashicorp/f-dispatch
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Michael Schurter
750d59773c Rename InitializationMessage to DriverMessage 2016-12-20 11:51:09 -08:00
Alex Dadgar
e495eecece Rename structs 2016-12-14 14:28:43 -08:00
Michael Schurter
ee17940dfe Add Driver.Prestart method
The Driver.Prestart method currently does very little but lays the
foundation for where lifecycle plugins can interleave execution _after_
task environment setup but _before_ the task starts.

Currently Prestart does two things:

* Any driver specific task environment building
* Download Docker images

This change also attaches a TaskEvent emitter to Drivers, so they can
emit events during task initialization.
2016-12-02 11:03:48 -08:00
Alex Dadgar
22d494f812 Dispatch structs 2016-11-23 15:03:13 -08:00
Alex Dadgar
51831f92dd Merge pull request #1840 from hashicorp/f-kill-fail
Change how we mark tasks as failed and allow consul-template to fail tasks
2016-10-24 13:40:52 -07:00
Michael Schurter
4d3187bc7e Remove disk usage enforcement
Many thanks to @iverberk for the original PR (#1609), but we ended up
not wanting to ship this implementation with 0.5.

We'll come back to it after 0.5 and hopefully find a way to leverage
filesystem accounting and quotas, so we can skip the expensive polling.
2016-10-21 13:55:51 -07:00
Alex Dadgar
f130c8a894 Change how we mark tasks as failed and allow consul-template to fail tasks 2016-10-20 17:27:16 -07:00
Alex Dadgar
e34902ae8a Large refactor of task runner and Vault token rehandling 2016-10-18 11:24:20 -07:00
Alex Dadgar
ebef11e6b0 Struct/api/parsing 2016-10-18 11:24:20 -07:00
Alex Dadgar
af517b3d37 Task runner sends signals 2016-10-10 15:09:00 -07:00
Alex Dadgar
d200a835c9 Fix handling of restart in TaskEvents 2016-10-06 15:06:54 -07:00