Michael Schurter
b999358892
Validate port label for host address mode
...
Also skip getting an address for script checks which don't use them.
Fixed a weird invalid reserved port in a TaskRunner test helper as well
as a problem with our mock Alloc/Job. Hopefully the latter doesn't cause
other tests to fail, but we were referencing an invalid PortLabel and
just not catching it before.
2017-12-08 12:03:43 -08:00
Michael Schurter
29e6f7cbfd
Fix interpolation bug with service/check updates
...
Previously if only an interpolated variable used in a service or check
was changed we interpolated the old and new services and checks with the
new variable, so nothing appeared to have changed.
2017-12-08 12:03:00 -08:00
Michael Schurter
74e7d57b75
Test Consul from TaskRunner thoroughly
...
Rely less on the mockConsulServiceClient because the real
consul.ServiceClient needs all the testing it can get!
2017-12-08 12:03:00 -08:00
Alex Dadgar
9f1955e474
Merge pull request #3630 from hashicorp/b-periodic
...
Handle race between fingerprinters and registration
2017-12-07 16:11:13 -08:00
Alex Dadgar
974b38f34e
Review feedback
2017-12-07 16:10:57 -08:00
Chelsea Komlo
dfb95fd659
Merge pull request #3591 from hashicorp/b-1755-stop
...
Allow controlling the stop signal for drivers
2017-12-07 17:06:43 -05:00
Alex Dadgar
2e462d6e85
Handle race between fingerprinters and registration
2017-12-07 13:09:37 -08:00
Chelsea Holland Komlo
ae10b638db
code review fixes
2017-12-07 13:46:25 -05:00
Chelsea Holland Komlo
f09e3ec798
set default kill signal on executor shutdown
2017-12-07 11:40:15 -05:00
Chelsea Holland Komlo
27b666e935
extend configurable kill signal to java driver
2017-12-07 11:40:10 -05:00
Alex Dadgar
77fe78cce2
Drop trace logging
2017-12-06 18:02:24 -08:00
Alex Dadgar
a540a0b674
Add logging around heartbeats
2017-12-06 17:57:50 -08:00
Chelsea Holland Komlo
927c0a4d88
change location of default kill signal
2017-12-06 17:48:25 -05:00
Chelsea Holland Komlo
8356c6183c
extract signal helper into utils
2017-12-06 14:36:44 -05:00
Chelsea Holland Komlo
9e49836d4f
move kill_signal to task level, extend to docker
2017-12-06 14:36:39 -05:00
Chelsea Holland Komlo
079e6b5fb1
allow controlling the stop signal in exec/raw_exec
2017-12-06 11:28:45 -05:00
Chelsea Komlo
fef15f447a
Merge pull request #3612 from hashicorp/docker-rkt-user
...
Set user for rkt tasks
2017-12-05 17:45:08 -05:00
Michael Schurter
b53f24b19e
Merge pull request #3563 from hashicorp/b-snapshot-atomic
...
Atomic Snapshotting / Sticky Volume Migration
2017-12-05 09:16:33 -08:00
Chelsea Holland Komlo
c4e1dc339d
fix up test
2017-12-05 10:12:40 -05:00
Chelsea Holland Komlo
723e47c98c
remove unused user option
2017-12-04 18:01:31 -05:00
Michael Schurter
104e0e5b19
Merge pull request #3615 from hashicorp/b-rkt-host-ports
...
rkt: Don't require port_map with host networking
2017-12-04 14:49:42 -08:00
Chelsea Holland Komlo
23b7042dd5
add ability to specify user for rkt
2017-12-04 14:21:48 -05:00
Michael Schurter
730e2aa4c8
rkt: Don't require port_map with host networking
...
Also don't try to return a DriverNetwork with host networking. None will
ever exist as that's the point of host networking: rkt won't create a
network namespace.
2017-12-01 17:23:25 -08:00
Chelsea Holland Komlo
584644287e
get KillTimeout in seconds, not nanoseconds
2017-12-01 10:43:00 -05:00
Michael Schurter
50b335f3f0
Add comment and normalize err check ordering
...
as per PR comments
2017-11-29 17:26:11 -08:00
Michael Schurter
e3256ec4ee
Check for error file when receiving snapshots
2017-11-29 17:26:11 -08:00
Michael Schurter
a05862dbdf
Destroy partially migrated alloc dirs
...
Test that snapshot errors don't return a valid tar currently fails.
2017-11-29 17:26:11 -08:00
Michael Schurter
4a49375988
Handle errors during snapshotting
...
If an alloc dir is being GC'd (removed) during snapshotting the walk
func will be passed an error. Previously we didn't check for an error so
a panic would occur when we'd try to use a nil `fileInfo`.
2017-11-29 17:26:11 -08:00
Chelsea Holland Komlo
9a719cbea2
Support StopTimeout for Docker tasksw
...
Update github.com/fsouza/go-dockerclient
2017-11-29 14:33:05 -05:00
Preetha Appan
d522149f6b
Missed assert in one place
2017-11-20 13:04:38 -06:00
Preetha Appan
ee4b4d859d
Better error validation, and added test case for invalid sysctl inputs
2017-11-20 12:07:18 -06:00
Preetha Appan
0d4797711b
Address some review comments
2017-11-20 11:15:09 -06:00
Preetha Appan
9e07471e48
Fix gofmt warnings
2017-11-18 09:23:09 -06:00
Preetha Appan
48829e88d0
Fix test compilation after rebase
2017-11-17 17:46:04 -06:00
Samuel BERTHE
e6c0372318
review(docker driver): sysctls -> sysctl + ulimits -> ulimit
2017-11-17 16:30:45 -06:00
Samuel BERTHE
657619c0ec
Oops
2017-11-17 16:14:14 -06:00
Samuel BERTHE
d15f01d7df
💄
2017-11-17 16:03:22 -06:00
Samuel BERTHE
cf586996f4
test(docker driver): testing sysctls and ulimits
2017-11-17 16:03:22 -06:00
Samuel BERTHE
84a089433d
feat(docker driver): adds sysctls and ulimits configs
2017-11-17 16:03:22 -06:00
Alex Dadgar
ea0eba6e46
Merge pull request #3559 from hashicorp/b-metrics
...
Don't emit metrics for non-running tasks
2017-11-17 10:33:23 -08:00
Michael Schurter
96f56cebf8
Merge pull request #3562 from hashicorp/b-3561-rkt-rm
...
Remove rkt pods when exiting
2017-11-16 17:30:21 -08:00
Michael Schurter
d1548863d4
Merge pull request #3551 from hashicorp/b-3419-docker-409-bug
...
Fix Docker name conflict bug by updating dockerclient
2017-11-16 16:38:54 -08:00
Michael Schurter
9929ac2382
Improve rktRemove error message
2017-11-16 15:45:14 -08:00
Michael Schurter
ce3fbb62b7
Remove rkt pods when exiting
...
Fixes #3561
2017-11-16 14:33:44 -08:00
Charlie Voiselle
24c8d2c439
Merge pull request #3556 from angrycub/f-fingerprint-log-level
...
Dropped loglevel for AWS fingerprinter env read misses to DEBUG
2017-11-16 16:27:25 -05:00
Charlie Voiselle
83aa6251c1
Lowered to DEBUG from AD feedback
2017-11-16 14:13:03 -05:00
Alex Dadgar
d427ab70c1
Only publish metric when the task is running and dev mode publishes metrics
2017-11-15 13:21:06 -08:00
Alex Dadgar
167c81ab6c
Merge pull request #3546 from hashicorp/f-heuristic
...
Better interface selection heuristic
2017-11-15 12:51:21 -08:00
Alex Dadgar
00557afb81
Use interface attached to default route
2017-11-15 11:32:32 -08:00
Michael Schurter
0de0e1d342
Handle leader task being dead in RestoreState
...
Fixes the panic mentioned in
https://github.com/hashicorp/nomad/issues/3420#issuecomment-341666932
While a leader task dying serially stops all follower tasks, the
synchronizing of state is asynchrnous. Nomad can shutdown before all
follower tasks have updated their state to dead thus saving the state
necessary to hit this panic: *have a non-terminal alloc with a dead
leader.*
The actual fix is a simple nil check to not assume non-terminal allocs
leader's have a TaskRunner.
2017-11-15 10:36:13 -08:00