Commit graph

14733 commits

Author SHA1 Message Date
Lang Martin 371014b781
Merge pull request #5553 from hashicorp/b-fingerprinter-manual-config
client fingerprinter doesn't overwrite manual configuration
2019-04-26 12:55:34 -04:00
Mahmood Ali b3fac6ef74
Merge pull request #5370 from hashicorp/f-windows-volume-binds
drivers/docker: Support volumes field in Windows
2019-04-26 10:12:42 -04:00
Danielle 6ff474cf90
Merge pull request #5612 from hashicorp/dani/alloc-signal-docs
Docs for `nomad alloc signal`
2019-04-26 14:21:23 +02:00
Danielle 79515496cb
Merge pull request #5515 from hashicorp/dani/f-alloc-signal
allocs: Add nomad alloc signal command
2019-04-26 14:21:05 +02:00
Danielle Lancashire a8880f9643 alloc_signal: Add autcompletion and cmd tests 2019-04-26 12:47:53 +02:00
Mahmood Ali 530d03c510
Merge pull request #5616 from hashicorp/b-retry-logmon-start-errs-2
logmon: recover from shutting down call locally
2019-04-25 21:42:09 -04:00
Mahmood Ali bf0a09e270 retry grpc unavailable errors even if not shutting down 2019-04-25 18:39:17 -04:00
Mahmood Ali 81841e8528 try checking process status 2019-04-25 18:16:13 -04:00
Mahmood Ali fc78521f29 add logging about attempts 2019-04-25 18:09:36 -04:00
Mahmood Ali e6ca8641a8 try sleeping for stop signal to take effect 2019-04-25 17:16:29 -04:00
Mahmood Ali ff3a095015 add a test that simulates logmon dying during Start() call 2019-04-25 16:41:17 -04:00
Mahmood Ali bbac73883c logmon: retry starting logmon if it exits
Retry if we detect shutting down during Start() api call is started,
locally.
2019-04-25 15:10:16 -04:00
Mahmood Ali b51f00a7f3 logmon client to handle grpc closing errors 2019-04-25 14:32:24 -04:00
Preetha 4461b4c73e
Update CHANGELOG.md 2019-04-25 12:51:07 -05:00
Mahmood Ali 0ee771b020 driver/docker: Support volumes field in Windows
Support Docker `volumes` field in Windows.  Previously, volumes parser
assumed some Unix-ism (e.g. didn't expect `:` in mount paths).
Here, we use the Docker parser to identify host and container paths.

Docker parsers use different validation logic from our previous unix
implementation: Docker parser accepts single path as a volume entry
(parsing it as a container path with auto-created volume) and enforces
additional checks (e.g. validity of mode).  Thereforce, I opted to use
Docker parser only for Windows, and keep Nomad's linux parser to
preserve current behavior.
2019-04-25 09:02:44 -04:00
Mahmood Ali d314db54d8 vendor docker/docker volume utils 2019-04-25 08:55:21 -04:00
Danielle Lancashire d46d3ebeb4 docs: Fix copy/paste error in alloc-restart docs 2019-04-25 14:40:09 +02:00
Danielle Lancashire 78350bfd77 docs: Add nomad alloc signal docs 2019-04-25 14:39:49 +02:00
Mahmood Ali 81d30a8c11
Merge pull request #5609 from hashicorp/b-docker-tty-logs
driver/docker: collect tty container logs
2019-04-25 08:28:32 -04:00
Danielle Lancashire 3409e0be89 allocs: Add nomad alloc signal command
This command will be used to send a signal to either a single task within an
allocation, or all of the tasks if <task-name> is omitted. If the sent signal
terminates the allocation, it will be treated as if the allocation has crashed,
rather than as if it was operator-terminated.

Signal validation is currently handled by the driver itself and nomad
does not attempt to restrict or validate them.
2019-04-25 12:43:32 +02:00
Danielle 1cfb03ac4f
Merge pull request #5597 from hashicorp/dani/doc-alloc-stop
Documentation for `nomad alloc stop`
2019-04-25 12:23:09 +02:00
Mahmood Ali df2b579c6b driver/docker: collect tty container logs
Fixes https://github.com/hashicorp/nomad/issues/5475

When container is a tty container, we need to get raw terminal output
without any additional processing.
2019-04-24 22:01:51 -04:00
Arshneet Singh 78d49eda7c
Merge pull request #5602 from hashicorp/normalized-plan
Normalize plan to increase the plan apply throughput
2019-04-24 14:07:26 -07:00
Michael Schurter a43e222c8a
Merge pull request #5607 from ArangoGutierrez/website_singularity
singularity_path -> singularity_cache
2019-04-24 14:02:49 -07:00
Chris Baker a2516c23e7
Minor typo fix 2019-04-24 15:51:26 -04:00
Arshneet Singh b7b050cdd1 Change min version required for plan optimization 2019-04-24 12:36:07 -07:00
Arshneet Singh 9cc39edb67 Return error when preempted/stopped alloc doesn't exist during denormalization 2019-04-24 12:36:07 -07:00
Michael Lange b8a4bc4829
Merge pull request #5594 from hashicorp/f-ui-preemptions
UI: Preemptions
2019-04-24 10:53:53 -07:00
Eduardo Arango 827acc35ba singularity_path -> singularity_cache
Signed-off-by: Eduardo Arango <eduardo@sylabs.io>
2019-04-24 12:43:16 -05:00
Preetha 50bffbda16
Merge pull request #5606 from hashicorp/docs-ea-update-0.9
Docs ea update 0.9
2019-04-24 10:48:57 -05:00
Lang Martin 19ba0f4882 structs_test use testify require.True instead of t.Fatal 2019-04-23 17:00:11 -04:00
Arshneet Singh d4e7a5c005 Add comments to functions, and use require instead of assert 2019-04-23 09:57:21 -07:00
Arshneet Singh 4cf4324b8f Remove allowPlanOptimization from schedulers 2019-04-23 09:18:02 -07:00
Arshneet Singh 0dd4c109e8 Compat tags 2019-04-23 09:18:01 -07:00
Arshneet Singh 65f5fab131 Add tests for plan normalization 2019-04-23 09:18:01 -07:00
Arshneet Singh b977748a4b Add code for plan normalization 2019-04-23 09:18:01 -07:00
Michael Schurter dadf461c0f
Merge pull request #5599 from hashicorp/docs-091rc1
docs: add download link to 0.9.1-rc1
2019-04-23 08:54:41 -07:00
Michael Schurter c19ffd359f docs: add download link to 0.9.1-rc1 2019-04-23 08:47:21 -07:00
Nick Ethier 2c9c9dbd67
website: add plugin docs (#5501)
website: add plugin docs
2019-04-23 11:22:08 -04:00
Nick Ethier c9bbdbf208
website: fixs a few errors in new plugin docs 2019-04-23 11:15:26 -04:00
Mahmood Ali 8b778f832d
Merge pull request #5598 from hashicorp/b-dont-forward-logs
fix crash when executor parent nomad process dies
2019-04-23 10:15:30 -04:00
Mahmood Ali 60ee243149 fix crash when executor parent nomad process dies
Fixes https://github.com/hashicorp/nomad/issues/5593

Executor seems to die unexpectedly after nomad agent dies or is
restarted.  The crash seems to occur at the first log message after
the nomad agent dies.

To ease debugging we forward executor log messages to executor.log as
well as to Stderr.  `go-plugin` sets up plugins with Stderr pointing to
a pipe being read by plugin client, the nomad agent in our case[1].
When the nomad agent dies, the pipe is closed, and any subsequent
executor logs fail with ErrClosedPipe and SIGPIPE signal.  SIGPIPE
results into executor process dying.

I considered adding a handler to ignore SIGPIPE, but hc-log library
currently panics when logging write operation fails[2]

This we opt to revert to v0.8 behavior of exclusively writing logs to
executor.log, while we investigate alternative options.

[1] https://github.com/hashicorp/nomad/blob/v0.9.0/vendor/github.com/hashicorp/go-plugin/client.go#L528-L535
[2] https://github.com/hashicorp/nomad/blob/v0.9.0/vendor/github.com/hashicorp/go-hclog/int.go#L320-L323
2019-04-23 09:52:46 -04:00
Danielle Lancashire fde36992f1 api docs: Add allocation stop 2019-04-23 13:28:21 +02:00
Danielle Lancashire 5fe3b99ec8 docs: Add documentation for 2019-04-23 13:22:27 +02:00
Danielle Lancashire 3b6bda04e2 changelog: Update for GH-5512 and GH-5577 2019-04-23 13:12:08 +02:00
Danielle 198a838b61
Merge pull request #5512 from hashicorp/dani/f-alloc-stop
alloc-lifecycle: nomad alloc stop
2019-04-23 13:05:08 +02:00
Danielle Lancashire 832f607433 allocs: Add nomad alloc stop
This adds a `nomad alloc stop` command that can be used to stop and
force migrate an allocation to a different node.

This is built on top of the AllocUpdateDesiredTransitionRequest and
explicitly limits the scope of access to that transition to expose it
under the alloc-lifecycle ACL.

The API returns the follow up eval that can be used as part of
monitoring in the CLI or parsed and used in an external tool.
2019-04-23 12:50:23 +02:00
Michael Lange f530c2f5c1 Updated serializer unit tests 2019-04-22 17:20:52 -07:00
Michael Lange 35e34fea8b Test coverage for preemption on the client detail page 2019-04-22 16:40:10 -07:00
Michael Lange b7860a9bca Test coverage for preemption on the allocation detail page 2019-04-22 16:40:09 -07:00