Michael Schurter
4e4ecc949f
Merge pull request #5203 from hashicorp/b-terminated
...
client: restore Terminated event on every exit
2019-01-18 08:54:15 -08:00
Danielle Tomlinson
2c8c1c4529
Merge pull request #5174 from hashicorp/dani/windows
...
Some Windows fixes and CI
2019-01-18 11:21:53 +01:00
Preetha Appan
eb7663697b
Fix one more place that should be using taskResources
...
taskResources handles new resource fields in a backwards compatible way
2019-01-17 15:52:51 -06:00
Michael Schurter
64e531e7bb
client: restore Terminated event on every exit
...
v0.9.0-dev started emitting a Terminated event every time a task process
exited. While this wasn't true in previous versions, it's a useful task
event because it's the only place for job operators to view the task's
exit code.
This behavior is asserted in the e2e/taskevents tests.
2019-01-17 10:02:25 -08:00
Danielle Tomlinson
db76db4b18
allocwatcher: Stat_t is unavailable on win
2019-01-17 18:43:14 +01:00
Danielle Tomlinson
8a4ffea94a
chore: Cleanup formatting
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
041c01d583
client/fs: Skip delete-while-streaming test on win
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
20f40eada8
client/fs: windows error message for not found
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
dcce2d7247
vaultclient: use require for error assertions
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
3078c24f79
vaultclient: Update tests for vault 1.0
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
b05d362eb1
fingerprinter: Use HCLogger for windows
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
435a8bae96
Merge pull request #5193 from hashicorp/dani/logmon-reattach
...
logmon: Reattach to existing loggers
2019-01-16 17:34:13 +01:00
Danielle Tomlinson
828d5f5a53
logmon: Reattach to existing loggers
...
This commit prevents us from creating duplicate logmon hooks when
restoring allocations by persisting the logmon reattach config using
HookData.
2019-01-16 14:56:10 +01:00
Michael Schurter
152ba08207
test: porting TestTaskRunner_SimpleRun_Dispatch
...
Porting test from 0.8 to 0.9.
2019-01-15 15:22:13 -08:00
Michael Schurter
3a491ab2b4
Merge pull request #5187 from hashicorp/test-consul
...
Port a bunch of pre-0.9 Consul tests to 0.9
2019-01-15 07:41:50 -08:00
Alex Dadgar
109c5ef650
Merge pull request #5173 from hashicorp/b-log-levels
...
Plugins use parent loggers
2019-01-14 16:14:30 -08:00
Nick Ethier
97a73e0116
Merge pull request #5018 from hashicorp/f-executor-stats
...
executor: streaming stats api
2019-01-14 15:02:35 -05:00
Michael Schurter
7445e418ca
test: port some pre-0.9 DeploymentHealth tests
...
Skipping a failing one as I need to move to some other work and don't
want to leave this work orphaned on my machine.
2019-01-14 09:56:53 -08:00
Michael Schurter
b58a77ecc0
test: assert service interpolation behavior
...
Ported from pre-0.9 tests.
2019-01-14 09:56:53 -08:00
Michael Schurter
df0a6dc34e
test: add some extra logging
2019-01-14 09:56:53 -08:00
Michael Schurter
99a5586aed
test: assert shutdown delay deregs first
...
Restore a pre-0.9 test that asserts Consul services are deregistered
before a task's shutdown delay.
2019-01-14 09:56:53 -08:00
Michael Schurter
903779769d
Update client/allocrunner/taskrunner/stats_hook.go
...
Co-Authored-By: nickethier <ncethier@gmail.com >
2019-01-14 12:31:27 -05:00
Nick Ethier
091cdbcb12
tr: stop stats collection on Exited hook
2019-01-14 12:30:14 -05:00
Nick Ethier
fc84e8f2bc
tr: add retry /w backoff to stats_hook failure
2019-01-12 12:18:24 -05:00
Nick Ethier
9904463da2
executor: fix failing stats related test
2019-01-12 12:18:23 -05:00
Nick Ethier
fbf9a4c772
executor: implement streaming stats API
...
plugins/driver: update driver interface to support streaming stats
client/tr: use streaming stats api
TODO:
* how to handle errors and closed channel during stats streaming
* prevent tight loop if Stats(ctx) returns an error
drivers: update drivers TaskStats RPC to handle streaming results
executor: better error handling in stats rpc
docker: better control and error handling of stats rpc
driver: allow stats to return a recoverable error
2019-01-12 12:18:22 -05:00
Preetha Appan
19777b870b
linting fixes
2019-01-12 10:38:20 -06:00
Preetha Appan
c66f2abefd
Make unit test for allocrunner failure much nicer
2019-01-12 10:38:20 -06:00
Preetha Appan
a1a7a02e48
Add unit test to simulate alloc runner creation failure
2019-01-12 10:38:20 -06:00
Preetha Appan
032ec425c2
Only set deployment health if not already set
2019-01-12 10:38:20 -06:00
Michael Schurter
a20ae598c7
Apply suggestions from code review
...
Co-Authored-By: preetapan <preetha@hashicorp.com >
2019-01-12 10:38:20 -06:00
Preetha Appan
72dead7448
REfactor statedb factory config to set it directly in client config
2019-01-12 10:38:20 -06:00
Preetha Appan
5d7472fe82
Remove invalid allocs
2019-01-12 10:38:20 -06:00
Preetha Appan
80919bf713
Modified destroy failure handling to rely on allocrunner's destroy method
...
Added a unit test with custom statedb implementation that errors, to
use to verify destroy errors
2019-01-12 10:37:12 -06:00
Preetha Appan
29894883a2
Add back code to mark alloc as failed when restore fails
...
Also modify restore such that any handled errors don't propagate
back to the client
2019-01-12 10:37:12 -06:00
Preetha Appan
80d92481ca
Revert code that made an alloc update when restore fails
...
Restore currently shuts down the client so the alloc update cant
always make it to the server
2019-01-12 10:37:12 -06:00
Preetha Appan
cf9c398296
Handle client initialization errors when adding allocs or restoring allocs
...
We mark the alloc as failed and track failed allocs so that we don't send
updates after the first time
2019-01-12 10:37:12 -06:00
Alex Dadgar
270ae48b82
Plugins use parent loggers
...
This PR fixes various instances of plugins being launched without using
the parent loggers. This meant that logs would not all go to the same
output, break formatting etc.
2019-01-11 11:36:37 -08:00
Danielle Tomlinson
dccf2a0de9
client: Cleanup allocrunner access
2019-01-11 18:39:18 +01:00
Mahmood Ali
1b7b70f47e
tests: enable and fix tests requiring mock driver
2019-01-10 10:10:11 -05:00
Alex Dadgar
c7fc39d38d
Merge pull request #5168 from hashicorp/b-kill-race
...
Improve Kill handling on task runner
2019-01-09 12:05:10 -08:00
Alex Dadgar
d916c0dd12
add more comments
2019-01-09 12:04:22 -08:00
Michael Schurter
e44d51f4d0
Spelling fix
...
Co-Authored-By: dadgar <alex@hashicorp.com >
2019-01-09 11:42:40 -08:00
Mahmood Ali
d1fbd735f3
Merge pull request #5157 from hashicorp/r-drivers-no-cstructs
...
drivers: avoid referencing client/structs package
2019-01-09 13:06:46 -05:00
Mahmood Ali
2349a01274
Merge pull request #5163 from hashicorp/r-minor-changes-20180108
...
Fix a panic on node.Deregister fail
2019-01-09 09:56:00 -05:00
Mahmood Ali
7840ab51e2
fix more cases of logging arity errors
2019-01-09 09:22:47 -05:00
Mahmood Ali
76d40947d7
Merge pull request #5159 from hashicorp/r-macos-tests
...
Fix Travis MacOS job
2019-01-09 08:22:30 -05:00
Alex Dadgar
a5ba15591a
Improve Kill handling on task runner
...
This PR improves how killing a task is handled. Before the kill function
directly orchestrated the killing and was only valid while the task was
running. The new behavior is to mark the desired state and wait for the
task runner to converge to that state.
2019-01-08 16:42:26 -08:00
Mahmood Ali
8a96bf84a1
tests: fix a test job constaints failing in macOS
...
Allow scheduling mock job when running on MacOS (or Windows) hosts.
2019-01-08 12:37:42 -05:00
Michael Schurter
6c561efdf8
Merge pull request #5151 from hashicorp/b-task-events
...
Emit Killing task events and add e2e tests
2019-01-08 09:33:04 -08:00