Commit Graph

14187 Commits

Author SHA1 Message Date
Mahmood Ali
2af30fb441 tests: expect Docker on AppVeyor
Prepare to run docker on AppVeyor Windows environment
2019-02-20 07:41:47 -05:00
Charlie Voiselle
427ab71b47 Warn that data_dir can't be in the jail (#4618) 2019-02-18 20:40:45 -05:00
Mahmood Ali
196d0374b7 Fix device.attr typo (#5331)
Fix https://github.com/hashicorp/nomad/issues/5315
2019-02-16 13:07:02 -05:00
Preetha
de52d87dc9 Merge pull request #5324 from hashicorp/f-nomad-init
expand job init example with spread and affinity
2019-02-14 14:58:10 -06:00
Preetha Appan
9fc94b33a1 fix indentation 2019-02-14 12:49:26 -06:00
Preetha Appan
7d92831217 Fix whitespace 2019-02-14 12:49:26 -06:00
Chris Baker
236101f193 Update job_init.go
minor
2019-02-14 12:49:26 -06:00
Preetha Appan
7beb4ccd9c expand job init example with spread and affinity 2019-02-14 12:49:26 -06:00
Michael Schurter
3d41a54ac3 Merge pull request #5319 from hashicorp/test-port-08
Fix Consul Service PreKill Hook
2019-02-14 10:18:41 -08:00
Danielle Tomlinson
0df5cb6b40 Merge pull request #5326 from hashicorp/dani/json-submission
api: Fix compatibility with pre 0.9 API jobs
2019-02-14 18:56:13 +01:00
Mahmood Ali
7f56423c66 Update drivers/docker/config_test.go
Co-Authored-By: dantoml <dani@tomlinson.io>
2019-02-14 18:55:10 +01:00
Danielle Tomlinson
756e733dbc Merge pull request #5327 from hashicorp/dani/windows-term
drivers/docker: SIGTERM to stop containers
2019-02-14 18:05:28 +01:00
Danielle Tomlinson
79d5a246f8 Add regression test for parsing null mounts 2019-02-14 18:03:35 +01:00
Mahmood Ali
eb8b19ec82 test: improve readability of duration
Co-Authored-By: schmichael <michael.schurter@gmail.com>
2019-02-14 08:12:06 -08:00
Mahmood Ali
a96cc97389 test: improve failure message
Co-Authored-By: schmichael <michael.schurter@gmail.com>
2019-02-14 08:11:37 -08:00
Danielle Tomlinson
e2244cd0d4 drivers/docker: SIGTERM to stop containers
Windows Docker daemon does not support SIGINT, SIGTERM is the semantic
equivalent that allows for graceful shutdown before being followed up by
a SIGKILL.
2019-02-14 15:38:54 +00:00
Danielle Tomlinson
a8ddf64e94 vendor: Update to latest hcl2
* Includes fixes for handling null blocks https://github.com/hashicorp/hcl2/pull/87
* Updates go-cty as a newer version is required by hcl2
2019-02-14 13:34:46 +01:00
Michael Schurter
fa9537f6e9 tests: port TestTaskRunner_Download_List from 0.8 2019-02-12 15:48:04 -08:00
Michael Schurter
cfbe7520e8 consul: fix task deregistration hook
Broke ShutdownDelay but the test was timing dependent so it just
appeared flaky. Made the test slower so that it should never incorrectly
pass.
2019-02-12 15:36:02 -08:00
Michael Schurter
f2506e4d29 tests: port TaskRunner_DeriveToken tests from 0.8 2019-02-12 15:36:02 -08:00
Michael Schurter
b41308f16a tests: port TestTaskRunner_BlockForVault from 0.8
Also fix race conditions in the mock vault client.
2019-02-12 13:46:09 -08:00
Mahmood Ali
941f89e0fe tests: add hcl task driver config parsing tests (#5314)
* drivers: add config parsing tests

Add basic tests for parsing and encoding task config.

* drivers/docker: fix some config declarations

* refactor and document config parse helpers
2019-02-12 14:46:37 -05:00
Mahmood Ali
0fd2b45740 drivers/java: restore 0.8.7 java version detection (#5317)
Restore 0.8.x behavior where java driver is marked as detected when
`java -version` exits with 0 but returns unexpected output.

Furthermore, we restore behavior when `java -version` where we parse the
first three lines of `java -version` but ignore rest.

If `java -version` returns less than 3 lines, Nomad 0.8.7 would panic.
In this implementation, we'd still mark java as detected but returns
empty version.

The 0.8.7 logic for detecting java version is found in
https://github.com/hashicorp/nomad/blob/v0.8.7/client/driver/java.go#L132-L172
.

I punt on revamping how we can be more resilient to java -version
syntax, and aimed for preserving existing behavior instead.
2019-02-12 13:41:26 -05:00
Preetha
09659b87ce Merge pull request #5287 from hashicorp/docs-fix-affinity-examples
docs: fixed some affinity examples
2019-02-12 09:13:27 -06:00
Michael Schurter
c12bdcdf0b Merge pull request #5297 from hashicorp/b-docker-logging
Docker: Fix logging config parsing
2019-02-11 06:57:52 -08:00
Gertjan Roggemans
f6ce196bcc docker: Fix volume driver_config options spec (#5309)
Fixes #5308
2019-02-11 09:18:44 -05:00
Danielle Tomlinson
7a729cbdea Merge pull request #5307 from mnachury/fix/exe_detection_windows
Fix executable check on windows
2019-02-08 17:46:55 -05:00
mnachury
a8c97343cf Fix executable check on windows 2019-02-08 16:05:14 -05:00
Nick Ethier
ee5360f209 Merge pull request #5306 from nanoz/patch-1
Issue #4649: Remove the systemd process and threads limit
2019-02-08 10:43:49 -05:00
Arno B
a5badac827 Remove the systemd process and threads limit
systemd limits the number of process and threads you can create within the cgroup it creates for a given service. This is especially limiting if you have a high number of keys Nomad watches from Consul.

Fixes #4649
2019-02-08 16:22:52 +01:00
Cathy Chang
d1941aa1e6 remove apostrophe in "job's" 2019-02-06 13:54:59 -08:00
Chris Baker
075635bafc restored previous example (it was correct) 2019-02-06 19:13:40 +00:00
Michael Schurter
5a8d955236 docker: fix logging config parsing
Fixes
https://groups.google.com/d/topic/nomad-tool/B3Uo6Kns2BI/discussion
2019-02-04 11:07:57 -08:00
Michael Schurter
08864d5ea5 plugins: update hclutils test
The test used old local copies of Docker structs and appeared to be
testing an outdated approach to task config decoding.

Updated to use real Docker structs so we can do end-to-end unit testing
of real Docker task configs.
2019-02-04 11:07:57 -08:00
Michael Schurter
1d17fbc681 simplify hcl2 parsing helper
No need to pass in the entire eval context
2019-02-04 11:07:57 -08:00
Michael Schurter
3e52a6aacf consul: squelch noisy useless logs
Only log when syncing actually did something.
2019-02-04 11:07:57 -08:00
Michael Schurter
645c8c41ea client: log when allocs have been processed
Will hopefully help us catch deadlocks/livelocks/slowdowns in the
add/remove allocs pipeline which should be fast.
2019-02-04 11:07:57 -08:00
Danielle Tomlinson
a8e9c4aec2 Merge pull request #5295 from Quasilyte/patch-1
nomad/command: fix strings.Contains args order
2019-02-02 16:08:32 +01:00
Iskander (Alex) Sharipov
8c75be1ec4 nomad/command: fix strings.Contains args order
Swapped call args order to meet the expected behavior.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-02-02 09:43:24 +03:00
Omar Khawaja
dd22f8aabf add some cross-linking for easier reference (#5292) 2019-02-01 13:12:18 -05:00
Michael Lange
bfde3caaac Merge pull request #5278 from hashicorp/f-ui-absolute-timestamps
UI: Always show an absolute timestamp tooltip when showing relative dates
2019-02-01 09:51:01 -08:00
Michael Schurter
f7be6e64fb Merge pull request #5293 from hashicorp/b-dupe-resched
cli: do not duplicate reschedule headers per group
2019-02-01 09:45:44 -08:00
Michael Schurter
c40cb97dbc cli: do not duplicate reschedule headers per group
Fixes #5291
2019-02-01 09:28:36 -08:00
Michael Lange
cc1b83c980 Update tests that check time and date formatting 2019-02-01 09:19:28 -08:00
Michael Lange
586e98bbea Apply new date and timestamp helpers e'rywhere 2019-02-01 09:19:28 -08:00
Michael Lange
076dddbe7f New helpers to standardize date and timestamp formats 2019-02-01 09:19:28 -08:00
Michael Schurter
ff63b1aefe Remove 0.9.0-beta2 generated files 2019-02-01 08:28:44 -08:00
Danielle Tomlinson
ee9a31f005 Merge pull request #5290 from mre/patch-1
Fix typo in "discovery"
2019-02-01 14:36:15 +01:00
Matthias Endler
bb64d74f3a Fix typo in "discovery" 2019-02-01 14:24:02 +01:00
Chris Baker
edcee2d3bb fixed typo in vault integration documentation 2019-01-31 16:00:54 +00:00