Commit Graph

2488 Commits

Author SHA1 Message Date
Alex Dadgar
ba1eecbf7f Merge pull request #3073 from clinta/docker-500
Allow retry of 500 API errors to be handled by restart policies
2017-08-24 16:57:36 -07:00
Alex Dadgar
77c1ebd14f Handle interfaces that only have link-local addrs
This PR changes the fingerprint handling of network interfaces that only
contain link local addresses. The new behavior is to prefer globally
routable addresses and if none are detected, to fall back to link local
addresses if the operator hasn't disallowed it. This gives us pre 0.6
behavior for interfaces with only link local addresses but 0.6+ behavior
for IPv6 interfaces that will always have a link-local address.

Fixes https://github.com/hashicorp/nomad/issues/3005

/cc diptanuc
2017-08-23 15:32:22 -07:00
Alex Dadgar
bf072b61fc resolve feedback 2017-08-23 14:17:00 -07:00
Alex Dadgar
8099655836 Clean up docker mounts 2017-08-22 14:12:44 -07:00
Clint Armstrong
6b98ddfb1e Allow retry of 500 API errors to be handled by restart policies 2017-08-22 14:04:46 -04:00
Michael Schurter
0a4ea47de4 Merge pull request #3031 from hashicorp/f-2924-consul-headers
Add Header and Method support for HTTP checks
2017-08-18 13:35:08 -07:00
Michael Schurter
948d869cfd Merge mistake made go fmt fail 2017-08-18 13:19:44 -07:00
Michael Schurter
ad940977fa Merge pull request #3021 from clinta/docker-mount2
Expose docker mount options
2017-08-17 16:57:09 -07:00
Michael Schurter
7627c1705b Update and test service/check interpolation 2017-08-17 16:49:14 -07:00
Michael Schurter
f143501c31 Merge pull request #3043 from hashicorp/f-2441-shutdown-delay
Add optional shutdown delay to tasks
2017-08-17 14:37:48 -07:00
Michael Schurter
fbe85b5964 Lower ShutdownDelay for non-Travis testing 2017-08-17 14:23:42 -07:00
Michael Schurter
b4480cdcff Lower shutdown delay in test 2017-08-17 13:57:22 -07:00
Michael Schurter
ecf0d20af7 Make shutdown delay log DEBUG, not INFO 2017-08-17 11:28:33 -07:00
Clint Armstrong
1378f03052 restrict mount to volume type 2017-08-17 09:52:13 -04: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
7b7ef952f5 Fix tests 2017-08-16 16:26:52 -07:00
Alex Dadgar
c26ecb7092 Add version package
This PR adds a version package and consolidates version strings into a
Version struct.
2017-08-16 15:44:21 -07:00
Alex Dadgar
95e798fb3a Must be root for TestAllocDir_CreateDir 2017-08-16 10:46:14 -07:00
Alex Dadgar
9032c0d579 Merge pull request #3025 from hashicorp/f-health-events
Emit task events explaining alloc health
2017-08-15 12:23:46 -07:00
Alex Dadgar
ac5984125c comments 2017-08-15 12:23:29 -07:00
Michael Schurter
44b69882a1 Fix formatting 2017-08-15 10:37:02 -07:00
Michael Schurter
d55b4c1a2b Cleanup comments and return val 2017-08-14 16:59:03 -07:00
Michael Schurter
8983bc07cc spelling 2017-08-14 16:55:59 -07:00
Michael Schurter
ce4b919de5 Return move errors from local Migrate like remote
Since alloc runner just logs these errors and continues there's no
reason not to return it.
2017-08-14 16:48:56 -07:00
Michael Schurter
85b9dd9cce Move migrating state into prevAllocWatcher 2017-08-14 16:02:28 -07:00
Alex Dadgar
0f2a05714b test 2017-08-12 14:42:53 -07:00
Alex Dadgar
2f7b7e3bc4 Refactor health watcher and emit events 2017-08-12 14:23:36 -07:00
Michael Schurter
537d0e5ab5 Soft fail on migration errors 2017-08-11 16:50:30 -07:00
Michael Schurter
4f7c5e6ed1 Exit if alloc listener closes
Add test for that case, add comments, remove debug logging
2017-08-11 16:22:02 -07:00
Michael Schurter
8253439de2 Update tests for new blocking/migrating code 2017-08-11 16:21:57 -07:00
Michael Schurter
113d8e3667 Set failed status instead of panic'ing
Fixup some TODOs and formatting left from new prevAllocWatcher code.
2017-08-11 16:21:35 -07:00
Michael Schurter
8c1811911e switch from alloc blocker to new interface
interface has 3 implementations:

1. local for blocking and moving data locally
2. remote for blocking and moving data from another node
3. noop for allocs that don't need to block
2017-08-11 16:21:35 -07:00
Michael Schurter
0f584a0143 initial attempt at refactoring blocked/migrating 2017-08-11 16:21:35 -07:00
Michael Schurter
de15046cd6 Only set alloc status if it's not already terminal 2017-08-11 16:21:35 -07:00
Alex Dadgar
2410c069d7 Merge pull request #3011 from hashicorp/b-cv-fix-TestEnvAWSFingerprint_aws
Updated AWS fingerprint test for ami-id
2017-08-11 10:58:22 -07:00
Alex Dadgar
7b3c0fe2e9 Merge pull request #2992 from decoomanj/master
Added dnsoptions to the docker driver
2017-08-11 10:12:36 -07:00
Charlie Voiselle
7dc43b0584 Updated AWS fingerprint test for ami-id
In https://github.com/hashicorp/nomad/pull/2999, I changed ami-id
to non-unique.  This updates the test to reflect that.
2017-08-11 12:54:27 -04:00
Jan De Cooman
d7cdb7d848 updated message in test 2017-08-11 09:24:15 +02:00
Alex Dadgar
5ad955ef07 Unmount task directories when alloc is terminal
This PR unmounts directories from tasks when the alloc is terminal
rather than when it is garbage collected.

/cc @angrycub
2017-08-10 13:28:17 -07:00
Alex Dadgar
f49c026438 Merge pull request #2984 from hashicorp/b-tags
Fix alloc health with checks using interpolation
2017-08-10 13:07:25 -07:00
Alex Dadgar
a066856d72 Merge pull request #3001 from hashicorp/f-template-events
Template emits events explaining why it is blocked
2017-08-10 13:00:58 -07:00
Alex Dadgar
9cc5e195ad address comments 2017-08-10 13:00:06 -07:00
Clint Armstrong
c71ac6a825 expose mount options to nomad 2017-08-10 12:37:17 -04:00
Alex Dadgar
1e7ae913e2 Template emits events explaining why it is blocked
This PR does the following:
* Adds a mechanism to emit events in the TaskRunner
* Vendors a new version of Consul-Template that allows extraction of
missing dependencies
* Adds logic to our consul_template.go to determine missing events and
emit them in a batched fashion.
* Refactors the consul_template code to split the run method and take in
a config struct rather than many parameters.

Fixes https://github.com/hashicorp/nomad/issues/2578
2017-08-09 18:01:27 -07:00
Charlie Voiselle
dbcf3ff516 AMI ID is potentally non-unique
Changed the keys map to reflect that.
2017-08-09 12:53:54 -04:00
Jan De Cooman
ce8550d6fb fixed typo 2017-08-09 14:44:38 +02:00
Jan De Cooman
b4ec045e9a added dnsoptions to the docker driver 2017-08-09 13:30:06 +02:00
Alex Dadgar
71838d6a80 Merge pull request #2979 from lfarnell/cleanup
Code cleanup
2017-08-08 10:21:15 -07:00
Alex Dadgar
43d2c425d1 Emit generic task events 2017-08-07 21:26:04 -07:00
Alex Dadgar
798b779609 Merge pull request #2947 from hashicorp/f-vault-grace
Allow template to set Vault grace
2017-08-07 16:29:53 -07:00