Commit graph

15208 commits

Author SHA1 Message Date
Mahmood Ali 21aa1cdc0e
Release v0.9.3 2019-06-12 18:44:47 +00:00
Nomad Release bot 4803215109 Generate files for 0.9.3 release 2019-06-12 16:11:16 +00:00
Preetha 71ba7eb9cb
Merge pull request #5815 from hashicorp/f-downgrade-docs
Add warning docs around downgrades
2019-06-12 10:39:43 -05:00
Danielle Lancashire 54d544e874
update changelog 2019-06-12 17:35:57 +02:00
Preetha 8a98817fe4
Merge pull request #5820 from hashicorp/r-assorted-changes-20190612_1
Assorted minor changes
2019-06-12 10:33:16 -05:00
Danielle f923b568e0
Merge pull request #5821 from hashicorp/dani/b-5770
trhooks: Add TaskStopHook interface to services
2019-06-12 17:30:49 +02:00
Chris Baker 6d4e840453
Merge pull request #5825 from hashicorp/docs-updated-alloc-examples
documentation: fixed incorrect URLs in allocation signal/restart documentation
2019-06-12 11:28:05 -04:00
Chris Baker ccb9992930 documentation: fixed incorrect URLs in allocation signal/restart documentation 2019-06-12 15:14:34 +00:00
Danielle cc82195d05
Merge pull request #5823 from hashicorp/dani/fix-restart-api
alloc-lifecycle: Fix restart with empty body
2019-06-12 17:07:46 +02:00
Danielle Lancashire c326344b57
trt: Fix test 2019-06-12 17:06:11 +02:00
Danielle 559ccfe797
Merge pull request #5822 from hashicorp/dani/allocrestartapidocs
docs: Add missing docs for alloc restart api
2019-06-12 16:58:59 +02:00
Danielle Lancashire 7fa6d6aad5
update changelog 2019-06-12 16:06:18 +02:00
Danielle Lancashire 13d76e35fd
trhooks: Add TaskStopHook interface to services
We currently only run cleanup Service Hooks when a task is either
Killed, or Exited. However, due to the implementation of a task runner,
tasks are only Exited if they every correctly started running, which is
not true when you recieve an error early in the task start flow, such as
not being able to pull secrets from Vault.

This updates the service hook to also call consul deregistration
routines during a task Stop lifecycle event, to ensure that any
registered checks and services are cleared in such cases.

fixes #5770
2019-06-12 16:00:21 +02:00
Danielle Lancashire ae8bb7365a
alloc-lifecycle: Fix restart with empty body
Currently when you submit a manual request to the alloc lifecycle API
with a version of Curl that will submit empty bodies, the alloc restart
api will fail with an EOF error.

This behaviour is undesired, as it is reasonable to not submit a body at
all when restarting an entire allocation rather than an individual task.

This fixes it by ignoring EOF (not unexpected EOF) errors and treating
them as entire task restarts.
2019-06-12 15:35:00 +02:00
Danielle Lancashire bea23e1eb1
docs: Add missing docs for alloc restart api 2019-06-12 15:09:52 +02:00
Mahmood Ali 07f2c77c44 comment DenormalizeAllocationDiffSlice applies to terminal allocs only 2019-06-12 08:28:43 -04:00
Mahmood Ali b00d1f1e10 tests: parsing dir should be equivalent to parsing individual files 2019-06-12 08:19:09 -04:00
Mahmood Ali 3d8f2622e9 tests: avoid manipulating package variables 2019-06-12 08:16:32 -04:00
Mahmood Ali 2fb8cdd484
Merge pull request #5818 from hashicorp/b-consul-stanza
fix consul stanza parsing when multiple -config arguments are used
2019-06-12 06:29:24 -04:00
Lang Martin 3837c9b021 command add comments re: defaults to LoadConfig 2019-06-11 22:35:43 -04:00
Lang Martin 02aae678be config_parse_test update comment for accuracy 2019-06-11 22:30:20 -04:00
Lang Martin 7aa95ebd6f config_parse get rid of ParseConfigDefault 2019-06-11 22:00:23 -04:00
Lang Martin 9b0411af6a Revert "config explicitly merge defaults once when using a config directory"
This reverts commit 006a9a1d454739eee21b7d8abb8b7aef1353b648.
2019-06-11 22:00:23 -04:00
Mahmood Ali 1fcb1567bc correct GH-5812 changelog 2019-06-11 19:46:50 -04:00
Mahmood Ali 4993252601 changelog GH-5817 2019-06-11 19:44:18 -04:00
Mahmood Ali fbf226bd25
Merge pull request #5817 from hashicorp/b-consul-stanza
fix consul stanza parsing when a configuration directory is used
2019-06-11 19:17:32 -04:00
Lang Martin 1e2f87a11e agent/testdata add a configuration directory for testing 2019-06-11 16:34:04 -04:00
Lang Martin fe8a4781d8 config merge maintains *HCL string fields used for duration conversion 2019-06-11 16:34:04 -04:00
Lang Martin 3bd153690b config_parse_test, handle defaults 2019-06-11 16:34:04 -04:00
Lang Martin c97dd512f4 config explicitly merge defaults once when using a config directory 2019-06-11 15:42:27 -04:00
Lang Martin ad56434472 config_parse split out defaults from ParseConfig 2019-06-11 15:42:27 -04:00
Buck Doyle 93e7f60be5
Change Netlify site id (#5814)
The Netlify site now belongs to the Hashicorp organisation
rather than the hc-nomad user.
2019-06-11 14:25:55 -05:00
Preetha Appan cd813e50ec
Add warning docs around downgrades 2019-06-11 13:16:37 -05:00
Mahmood Ali 6f2bcb8775 scripts: use /dev/null when verifying s3 2019-06-11 13:30:54 -04:00
Mahmood Ali 165a4ea868 update changelog for 0.9.3 2019-06-11 13:25:27 -04:00
Mahmood Ali 79698489dc
Merge pull request #5806 from hashicorp/b-systemd-cgroups-path
drivers/exec: use an independent name=systemd cgroup path
2019-06-11 13:00:44 -04:00
Mahmood Ali 5734c8a648 update comment 2019-06-11 13:00:26 -04:00
Mahmood Ali d16f9df59b
Merge pull request #5812 from hashicorp/fix-allocresources-reference
Fallback to `alloc.TaskResources` for old allocs
2019-06-11 11:33:25 -04:00
Mahmood Ali 2acf30fdd3 Fallback to alloc.TaskResources for old allocs
When a client is running against an old server (e.g. running 0.8),
`alloc.AllocatedResources` may be nil, and we need to check the
deprecated `alloc.TaskResources` instead.

Fixes https://github.com/hashicorp/nomad/issues/5810
2019-06-11 10:32:53 -04:00
Lang Martin a476cff2ba
Merge pull request #5802 from hashicorp/b-config-meta-parsing
config meta parsing
2019-06-11 09:12:36 -04:00
Mahmood Ali 3dd9b939e3
Merge pull request #5805 from hashicorp/b-tg-rename-panic
Fix a panic related to updating alloc taskgroups
2019-06-11 08:53:55 -04:00
Mahmood Ali f7608c4cef exec: use an independent name=systemd cgroup path
We aim for containers to be part of a new cgroups hierarchy independent
from nomad agent.  However, we've been setting a relative path as
libcontainer `cfg.Cgroups.Path`, which makes libcontainer concatinate
the executor process cgroup with passed cgroup, as set in [1].

By setting an absolute path, we ensure that all cgroups subsystem
(including `name=systemd` get a dedicated one).  This matches behavior
in Nomad 0.8, and behavior of how Docker and OCI sets CgroupsPath[2]

Fixes #5736

[1] d7edf9b2e4/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/apply_raw.go (L326-L340)
[2] 238f8eaa31/vendor/github.com/containerd/containerd/oci/spec.go (L229)
2019-06-10 22:00:12 -04:00
Mahmood Ali 7a4900aaa4 client/allocrunner: depend on internal task state
Alloc runner already tracks tasks associated with alloc.  Here, we
become defensive by relying on the alloc runner tracked tasks, rather
than depend on server never updating the job unexpectedly.
2019-06-10 18:42:51 -04:00
Mahmood Ali 392f5bac44 Stop updating allocs.Job on stopping or preemption 2019-06-10 18:30:20 -04:00
Mahmood Ali 6c8e329819 test that stopped alloc jobs aren't modified
When an alloc is stopped, test that we don't update the job found in
alloc with new job  that is no longer relevent for this alloc.
2019-06-10 17:14:26 -04:00
Lang Martin a337488b5c config parse update hcl with support for decoding bool to string 2019-06-10 13:12:38 -04:00
Lang Martin 28cf8eddfe config parse_test check for string coercion in client.meta 2019-06-10 13:12:38 -04:00
Mahmood Ali 6742ef5d73 changelog GH-5794 2019-06-10 09:56:23 -04:00
Buck Doyle 16a5681e8a
Add PR previews with Netlify (#5787)
It would be preferable to only generate these for UI PRs but Netlify appears to
not have that flexibility. I tried setting up manual deployments in a Travis
environment but gave up the experiment; it could probably eventually work if
deployment failures become a nuisance.
2019-06-10 08:51:58 -05:00
Mahmood Ali 8f2308d070
Merge pull request #5794 from hashicorp/b-preemption-network-panic
Only preempt for network when there is a network
2019-06-10 07:10:29 -04:00