Nick Ethier
42edf2d213
website: add plugin docs
2019-03-04 09:04:53 -05:00
Michael Schurter
82d37b99df
Merge pull request #5372 from hashicorp/f-docker-logging-driver
...
drivers/docker: rename logging `type` to `driver`
2019-02-28 14:10:24 -08:00
Mahmood Ali
011315ba4c
logging.Type over logging.Driver
2019-02-28 16:40:18 -05:00
Mahmood Ali
314d7a0f41
drivers/docker: rename logging type to driver
...
Docker uses the term logging `driver` in its public documentations: in
`docker` daemon config[1], `docker run` arguments [2] and in docker compose file[3].
Interestingly, docker used `type` in its API [4] instead of everywhere
else.
It's unfortunate that Nomad used `type` modeling after the Docker API
rather than the user facing documents. Nomad using `type` feels very
non-user friendly as it's disconnected from how Docker markets the flag
and shows internal representation instead.
Here, we rectify the situation by introducing `driver` field and
prefering it over `type` in logging.
[1] https://docs.docker.com/config/containers/logging/configure/
[2] https://docs.docker.com/engine/reference/run/#logging-drivers---log-driver
[3] https://docs.docker.com/compose/compose-file/#logging
[4] https://docs.docker.com/engine/api/v1.39/#operation/ContainerCreate
2019-02-28 16:04:03 -05:00
Nick Ethier
737ea19b90
Merge pull request #5364 from hashicorp/disable-failing-e2e-tests
...
tests: disable upgrade e2e tests
2019-02-28 14:02:27 -05:00
Omar Khawaja
982e73f545
update formatting and add toJSON function with explanation ( #5366 )
...
* update formatting and add toJSON function with explanation
* edit typo
* Update website/source/guides/operations/vault-integration/index.html.md
Co-Authored-By: Omar-Khawaja <Omar-Khawaja@users.noreply.github.com >
* fixing clarification bullet explaining the use of toJSON
2019-02-28 13:00:25 -05:00
Omar Khawaja
1d9c7b53f8
make root block device size configurable ( #5368 )
2019-02-28 11:35:57 -05:00
Mahmood Ali
1d22a0b309
docs: Update beta release link to 0.9.0-beta3 ( #5365 )
2019-02-27 09:49:36 -05:00
Mahmood Ali
863c34aba7
tests: disable upgrade e2e tests
...
Upgrade e2e tests are failing and we haven't had bandwith to fix yet.
Having them fail makes it easy for us to miss other failures and
regressions.
As such, skip the upgrade e2e tests until we fix them.
2019-02-27 08:40:09 -05:00
Mahmood Ali
f95749f1ca
docker: report unhealthy in unsupported Windows ( #5356 )
...
On Windows, Nomad only supports Windows containers, so report as
unhealthy otherwise.
2019-02-27 08:10:23 -05:00
Michael Schurter
8ea6718ceb
Remove generated files for 0.9.0-beta3
2019-02-26 10:34:08 -08:00
Michael Schurter
4d34c838bb
Release v0.9.0-beta3
2019-02-26 10:22:46 -08:00
Michael Schurter
2f55f78b21
Fix version.go for 0.9.0-beta3 release
2019-02-26 10:11:30 -08:00
Michael Schurter
b849d84f2f
Generate files for 0.9.0-beta3 release
2019-02-26 09:44:49 -08:00
Michael Schurter
d5a14d5606
Merge pull request #5352 from hashicorp/b-leaked-logmon
...
logmon fixes
2019-02-26 08:35:46 -08:00
Danielle Tomlinson
2f1def0375
Update changelog for new beta 3 enhancements
2019-02-26 17:23:32 +01:00
Michael Schurter
432be05682
tests: move unix-specific test to its own file
...
Other logmon tests should be portable.
2019-02-26 07:56:44 -08:00
Mahmood Ali
8eb1c6fa29
tests: port some fingerprint tests from 0.8 ( #5359 )
...
Port some integration tests of driver fingerprinting.
Some tests (e.g. `TestFingerprintManager_Run_DriversInBlacklist`) have
been subsituted by more isolated tests in
`client/pluginmanager/drivermanager/manager_test.go`
2019-02-26 10:54:16 -05:00
Danielle Tomlinson
2657bf02c0
Merge pull request #5355 from hashicorp/dani/windows-dockerstats
...
docker: Support Stats on Windows
2019-02-26 16:39:48 +01:00
Michael Schurter
05bae8d149
client: restart task on logmon failures
...
This code chooses to be conservative as opposed to optimal: when failing
to reattach to logmon simply return a recoverable error instead of
immediately trying to restart logmon.
The recoverable error will cause the task's restart policy to be
applied and a new logmon will be launched upon restart.
Trying to do the optimal approach of simply starting a new logmon
requires error string comparison and should be tested against a task
actively logging to assert the behavior (are writes blocked? dropped?).
2019-02-25 15:42:45 -08:00
Preetha
92cd321e49
Merge pull request #5358 from hashicorp/ar-tests
...
More alloc runner tests ported from 0.8.7
2019-02-25 13:32:12 -06:00
Danielle Tomlinson
d3c7e4d078
Merge pull request #5362 from hashicorp/dani/f-fingerprint-undetected
...
docker: Return undetected before first detection
2019-02-25 15:17:15 +01:00
Danielle Tomlinson
6c774e7b46
docker: Return undetected before first detection
...
This commit causes the docker driver to return undetected before it
first establishes a connection to the docker daemon.
This fixes a bug where hosts without docker installed would return as
unhealthy, rather than undetected.
2019-02-25 11:02:42 +01:00
Michael Schurter
cf98f8f70a
client: test logmon_hook
2019-02-23 15:36:48 -08:00
Preetha Appan
ad58ba3e18
More alloc runner tests ported from 0.8.7
2019-02-22 17:58:06 -06:00
Mahmood Ali
eecae582c2
Merge pull request #5349 from hashicorp/port-tests-20190221
...
Port some 0.8.7 alloc runner tests
2019-02-22 18:23:50 -05:00
Charlie Voiselle
74c270d89a
Merge pull request #5357 from hashicorp/doc-add-coc
...
Created .github; Added CoC
2019-02-22 14:15:26 -08:00
Charlie Voiselle
e90d4ebaa3
Merge pull request #5344 from hashicorp/b-nexteval-for-failed-follow-up
...
Set NextEval when making `failed-follow-up` evals
2019-02-22 14:14:41 -08:00
Mahmood Ali
e1e5053936
emit TaskRestartSignal event on vault restart
...
When Vault token expires and task is restarted, emit `TaskRestartSignal`
similar to v0.8.7
2019-02-22 15:56:14 -05:00
Mahmood Ali
8b7f66499f
address review comments
2019-02-22 15:56:14 -05:00
Mahmood Ali
d80774fde0
tests: port TestTaskRunner_VaultManager_Signal
...
From https://github.com/hashicorp/nomad/blob/v0.8.7/client/task_runner_test.go#L1427
2019-02-22 15:53:04 -05:00
Mahmood Ali
b8c74ff6ca
tests: port TestTaskRunner_VaultManager_Restart
...
From https://github.com/hashicorp/nomad/blob/v0.8.7/client/task_runner_test.go#L1352
2019-02-22 15:53:04 -05:00
Mahmood Ali
ce04bb7440
tests: port TestTaskRunner_UnregisterConsul_Retries
...
From https://github.com/hashicorp/nomad/blob/v0.8.7/client/task_runner_test.go#L620
2019-02-22 15:53:04 -05:00
Mahmood Ali
d6a5a1c5a5
tests: port TestTaskRunner_Template_NewVaultToken
...
From https://github.com/hashicorp/nomad/blob/v0.8.7/client/task_runner_test.go#L1275
2019-02-22 15:53:04 -05:00
Mahmood Ali
90ca1ab5a3
tests: port TestTaskRunner_Template_Artifact
...
From https://github.com/hashicorp/nomad/blob/v0.8.7/client/task_runner_test.go#L1195
2019-02-22 15:52:59 -05:00
Mahmood Ali
4c30b03879
tests: port TestAllocRunner_RetryArtifact
...
Port TestAllocRunner_RetryArtifact from https://github.com/hashicorp/nomad/blob/v0.8.7/client/alloc_runner_test.go#L610-L672
I changed the test name because it doesn't actually test that artifact
hooks is retried
2019-02-22 15:50:39 -05:00
Mahmood Ali
69906bade4
tests: port TestAllocRunner_MoveAllocDir test
2019-02-22 15:50:39 -05:00
Preetha
43aa7b138b
Merge pull request #5350 from hashicorp/b-json-logging-meta
...
Support json logging for CLI output for agent
2019-02-22 13:40:56 -06:00
Preetha Appan
b1daa69fae
fix import order
2019-02-22 13:40:13 -06:00
Charlie Voiselle
0fec6e73f1
Created .github; Added CoC
2019-02-22 10:49:05 -08:00
Charlie Voiselle
3d442f94ae
Added comments
...
* caller should created eval id
* prev/next eval used in failed-follow-up
2019-02-22 10:22:52 -08:00
Michael Schurter
fb06c8ebae
Merge pull request #5325 from hashicorp/test-port-08-2
...
Do not wrap errors from StartTask as that loses Recoverable
2019-02-22 07:06:01 -08:00
Danielle Tomlinson
6624d3667b
docker: Support stats on Windows
2019-02-22 14:19:58 +01:00
Michael Schurter
55cbbded6c
logmon: fix reattach configuration
...
There were multiple bugs here:
1. Reattach unmarshalling always returned an error because you can't
unmarshal into a nil pointer.
2. The hook data wasn't being saved because it was put on the request
struct, not the response struct.
3. The plugin configuration should only have reattach *or* a command
set. Not both.
4. Setting Done=true meant the hook was never re-run on agent restart so
reattaching was never attempted.
2019-02-21 15:32:18 -08:00
Michael Schurter
4119767be8
fingerprint: improve initial fingerpint message
...
The initial fingerprint message is actually fairly useful, so I bumped
it to Debug and fixed the output formatting.
2019-02-21 15:32:18 -08:00
Michael Schurter
c9fe5d26b3
plugins: squelch context Canceled error logs
...
As far as I can tell this is the most straightforward and resilient way
to skip error logging on context cancellation with grpc streams. You
cannot compare the error against context.Canceled directly as it is of
type `*status.statusError`. The next best solution I found was:
```go
resp, err := stream.Recv()
if code, ok := err.(interface{ Code() code.Code }); ok {
if code.Code == code.Canceled {
return
}
}
```
However I think checking ctx.Err() directly makes the code much easier
to read and is resilient against grpc API changes.
2019-02-21 15:32:18 -08:00
Michael Schurter
cf66e25e57
client: restart on recoverable StartTask errors
...
Fixes restarting on recoverable errors from StartTask.
Ports TestTaskRunner_Run_RecoverableStartError from 0.8 which discovered
the bug.
2019-02-21 15:30:49 -08:00
Michael Schurter
414532adab
test: port TestTaskRunner_RestartSignalTask_NotRunning from 0.8
2019-02-21 15:30:49 -08:00
Michael Schurter
d4a17ae71f
test: port TestTaskRunner_DriverNetwork from 0.8
2019-02-21 15:30:49 -08:00
Michael Schurter
234f644b35
Merge pull request #5322 from hashicorp/b-artifact-retries
...
Fix regression by restarting on artifact download errors
2019-02-21 15:28:51 -08:00