Commit Graph

13841 Commits

Author SHA1 Message Date
Alex Dadgar bb6ea30f58 fix rkt use of executor 2019-01-11 11:36:37 -08:00
Alex Dadgar 14ed757a56 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
Preetha 588e3401d0
Merge pull request #5181 from hashicorp/b-spread-weight
Make spread weight a pointer with default value if unset
2019-01-11 13:17:00 -06:00
Danielle Tomlinson 3e586e93da client: Cleanup allocrunner access 2019-01-11 18:39:18 +01:00
Preetha Appan b46728a88b
Make spread weight a pointer with default value if unset 2019-01-11 10:31:21 -06:00
Mahmood Ali d2aeeee200
Merge pull request #5175 from hashicorp/c-re-enable-tests
Re-enable client and java skipped tests
2019-01-11 10:08:16 -05:00
Preetha 746aa14bf5
Merge pull request #5179 from hashicorp/b-fix-deprecated-resources
Remove unnecessary usage of alloc.Resource
2019-01-10 17:31:00 -06:00
Preetha 2c358b4078
Merge pull request #5144 from hashicorp/f-spread-docs
Docs for spread stanza
2019-01-10 16:38:39 -06:00
Preetha Appan 3b054d6135
Remove unnecessary usage of alloc.Resource 2019-01-10 16:36:47 -06:00
Preetha 67c37623f5
Merge pull request #5178 from hashicorp/blalor-patch-1
Oxford comma in variable interpolation summary
2019-01-10 16:11:18 -06:00
Preetha Appan 602db06fad
Address review comments 2019-01-10 15:46:03 -06:00
Brian Lalor 337a6befa1
Oxford comma in variable interpolation summary
This improves the readability of this section.
2019-01-10 16:15:41 -05:00
Mahmood Ali b7d421a149 tests: WaitForRunning checks for pending only
WaitForRunning risks a race condition where the allocation succeeds and
completes before WaitForRunning is called (or while it is running).

Here, I made the behavior match the function documentation.

I considered making it stricter, but callers need to account for
allocation terminating immediately after WaitForRunning terminates
anyway.
2019-01-10 15:36:57 -05:00
Mahmood Ali fc216d9bad
Merge pull request #5176 from hashicorp/r-rm-validation-tests
tests: remove tests for unsupported features
2019-01-10 12:41:48 -05:00
Preetha Appan 7614f841b0
Spread json docs 2019-01-10 11:10:04 -06:00
Preetha Appan 12dddcc525
Initial spread docs 2019-01-10 11:10:04 -06:00
Mahmood Ali 4414a2ce1c tests: remove tests for unsupported features
With switching to driver plugins, driver validation is quite tricky and
we need to do some design thinking before supporting it against.
2019-01-10 10:21:48 -05:00
Mahmood Ali 614f63f40d drivers/java: use libcontainer executor on java linux 2019-01-10 10:10:40 -05:00
Mahmood Ali 9740443703 tests: ignore _JAVA_OPTIONS line
ignore _JAVA_OPTIONS line in `java -version`, as it's relevant.
2019-01-10 10:10:40 -05:00
Mahmood Ali c3eaa0f4c8 tests: enable and fix tests requiring mock driver 2019-01-10 10:10:11 -05:00
Chris Baker 1c2fec824f
Merge pull request #5158 from hashicorp/f-1157-validate-node-meta-variables
added validation on client metadata keys
2019-01-09 16:37:57 -05:00
Alex Dadgar bd12e0b1f7
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 069e181e8f add more comments 2019-01-09 12:04:22 -08:00
Michael Schurter e5ddff861c
Spelling fix
Co-Authored-By: dadgar <alex@hashicorp.com>
2019-01-09 11:42:40 -08:00
Chris Baker e9db2ae822 Merge branch 'master' of github.com:hashicorp/nomad into f-1157-validate-node-meta-variables 2019-01-09 18:56:49 +00:00
Chris Baker d5b1a56f3b increased config validation coverage for dev mode 2019-01-09 18:56:40 +00:00
Michael Schurter ac169008f0
Merge pull request #5045 from hashicorp/b-drivermanager-tests-drain
drain: fix node drain monitoring
2019-01-09 10:23:28 -08:00
Mahmood Ali 5389ebae41
Merge pull request #5166 from hashicorp/b-docker-tests-mac
tests: run docker tests in macOS out of box
2019-01-09 13:07:37 -05:00
Mahmood Ali b08f59cdda
Merge pull request #5162 from hashicorp/f-extract-lxc
Extract LXC from nomad
2019-01-09 13:07:05 -05:00
Mahmood Ali 90f3cea187
Merge pull request #5157 from hashicorp/r-drivers-no-cstructs
drivers: avoid referencing client/structs package
2019-01-09 13:06:46 -05:00
Michael Schurter bf18980b2a
Merge pull request #5167 from hashicorp/e2e-task-events
Add another task events e2e test and fix test helper
2019-01-09 08:10:22 -08:00
Mahmood Ali ff48dbb8a9
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 1f2473263e fix more cases of logging arity errors 2019-01-09 09:22:47 -05:00
Mahmood Ali 4952f2a182
Merge pull request #5159 from hashicorp/r-macos-tests
Fix Travis MacOS job
2019-01-09 08:22:30 -05:00
Alex Dadgar 149dec2169 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 03a9e812c8 cli: support hitting pre-0.9 nomad agents
node.NodeResources is nil when operating against pre-0.9.
2019-01-08 19:32:26 -05:00
Danielle Tomlinson 4e412e0665
Merge pull request #4991 from hashicorp/dani/b-fix-leaked-procs
vendor: Update go-plugin
2019-01-09 00:54:52 +01:00
Michael Schurter 641ba37c61 e2e: test task events for a failed sibling task 2019-01-08 14:39:37 -08:00
Michael Schurter b09c68ceaf e2e: wait for at least N nodes to be ready
Before it was *exactly* N nodes which limited test portability between
clusters.
2019-01-08 14:39:37 -08:00
Chris Baker d8a3a74c43 move `if dev` check into config validation, to support dev-mod
validation in the future
2019-01-08 22:21:48 +00:00
Chris Baker 42a336acfd
Merge pull request #4888 from hashicorp/f-docs-clarification-on-config-folders
config dir clarification
2019-01-08 17:18:14 -05:00
Mahmood Ali c78ed7246f tests: run docker tests in macOS out of box
Use `/tmp` as temporary directory for docker driver tests, so tests can
run out of the box without any intervention.

macOS sets tempdir as `/var`, which Docker does not whitelist as a path
that can be bind-mounted.
2019-01-08 14:35:40 -05:00
Mahmood Ali f679975956 fixup! remove unused field 2019-01-08 12:58:12 -05:00
Mahmood Ali 8f20bc8ce2
Merge pull request #5154 from hashicorp/f-revert-exec-devs
drivers/exec: restrict devices exposed to tasks
2019-01-08 12:43:06 -05:00
Mahmood Ali 9f7eb1bdfa 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 8a6b1acaa6 drain: fix node drain monitoring
The whole approach to monitoring drains has ordering issues and lacks
state to output useful error messages.

AFAICT to get the tests passing reliably I needed to change the behavior
of monitoring.

Parts of these tests are skipped in CI, and they should be rewritten as
e2e tests.
2019-01-08 09:35:16 -08:00
Michael Schurter c24f4f94c1
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
Mahmood Ali 6f077a73dc Fix panic on failure
Error expects an odd number of arguments, and panics otherwise.
2019-01-08 12:19:44 -05:00
Mahmood Ali f015b88ea7 remove unused field 2019-01-08 12:19:44 -05:00
Mahmood Ali d19b92edec executor: add a comment detailing isolation 2019-01-08 12:10:26 -05:00