Commit Graph

15593 Commits

Author SHA1 Message Date
Jasmine Dahilig
692cd9c19e job region defaults to client node region if 'global' or none provided (#6064) 2019-08-05 14:28:02 -07:00
Mahmood Ali
b6ae5e9d62 Render consul templates using task env only (#6055)
When rendering a task consul template, ensure that only task environment
variables are used.

Currently, `consul-template` always falls back to host process
environment variables when key isn't a task env var[1].  Thus, we add
an empty entry for each host process env-var not found in task env-vars.

[1] bfa5d0e133/template/funcs.go (L61-L75)
2019-08-05 16:30:47 -04:00
Mahmood Ali
2e0d67cbbb Merge pull request #6065 from hashicorp/b-nil-driver-exec
Check if driver handle is nil before execing
2019-08-02 09:48:28 -05:00
Mahmood Ali
488cd7e24e Check if driver handle is nil before execing
Defend against tr.getDriverHandle being nil.  Exec handler checks if
task is running, but it may be stopped between check and driver handler
fetching.
2019-08-02 10:07:41 +08:00
Michael Schurter
9ef22a4805 changelog: add #6009 and reorg #6007 2019-08-01 13:05:12 -07:00
Michael Schurter
b91581a28f Merge pull request #6009 from hmalphettes/f-update-go-getter
Update go-getter@1.1.0 to fix #3491
2019-08-01 12:59:09 -07:00
Michael Schurter
dca40b5737 Merge pull request #5999 from Iqoqo/use-default-network-for-docker
driver/docker: use default network mode
2019-08-01 09:58:12 -07:00
Michael Schurter
3107274f4c Merge pull request #6061 from Iqoqo/allow-unix-container-path-in-lcow-2
driver/docker: support unix destination mount path in windows
2019-08-01 09:56:32 -07:00
Ilya Guterman
7beee87618 driver/docker: support unix destination mount path in windows
This reverts commit a6c96eade5.
2019-08-01 19:54:08 +03:00
Buck Doyle
3fd0c7220c Fix namespace parameter name (#6056)
I missed this in #6051.
2019-08-01 09:49:41 -05:00
Tim Gross
6c2392ca64 api: add follow param to file stream endpoint (#6049)
The `/v1/client/fs/stream endpoint` supports tailing a file by writing
chunks out as they come in. But not all browsers support streams
(ex IE11) so we need to be able to tail a file without streaming.

The fs stream and logs endpoint use the same implementation for
filesystem streaming under the hood, but the fs stream always passes
the `follow` parameter set to true. This adds the same toggle to the
fs stream endpoint that we have for logs. It defaults to true for
backwards compatibility.
2019-08-01 08:32:43 -04:00
Buck Doyle
78b2ee72aa Fix documentation namespace API property (#6051) 2019-07-31 16:05:48 -05:00
Ilya Guterman
d4919cebdc driver/docker: use default network mode
fallback to docker default network mode instead of explicit bridge for linux
or nat for windows
2019-07-31 21:07:46 +03:00
Nick Ethier
3fef9836f1 Merge network namespaces work into master (#6046)
Merge network namespaces work into master
2019-07-31 11:03:17 -04:00
Mahmood Ali
19cdfb621b Merge pull request #6034 from grddev/patch-1
Fix typo in Spreads key in JSON Job Specification
2019-07-31 02:28:19 -05:00
Mahmood Ali
8262ddf5eb Merge pull request #6035 from jrasell/patch-6
Update example setup to use non-deprecated join
2019-07-31 02:27:51 -05:00
Nick Ethier
0b8fc5d018 client/cni: updated comments and simplified logic to auto download plugins 2019-07-31 01:04:10 -04:00
Nick Ethier
1072084ff3 Apply suggestions from code review
Co-Authored-By: Mahmood Ali <mahmood@hashicorp.com>
2019-07-31 01:04:10 -04:00
Nick Ethier
54ce4d1f7e client: remove debugging lines 2019-07-31 01:04:09 -04:00
Nick Ethier
0bd157cc3b client: add autofetch for CNI plugins 2019-07-31 01:04:09 -04:00
Nick Ethier
4dd5cd103d remove unused file 2019-07-31 01:04:09 -04:00
Preetha Appan
5a1dd79179 Code review feedback 2019-07-31 01:04:08 -04:00
Preetha Appan
b561816343 Scheduler changes to support network at task group level
Also includes unit tests for binpacker and preemption.
The tests verify that network resources specified at the
task group level are properly accounted for
2019-07-31 01:04:08 -04:00
Nick Ethier
f5a68698c1 Update website/source/docs/drivers/docker.html.md
Co-Authored-By: Michael Schurter <michael.schurter@gmail.com>
2019-07-31 01:04:08 -04:00
Nick Ethier
4cb99a1112 scheduler: fix disk constraints 2019-07-31 01:04:08 -04:00
Nick Ethier
e910fdbb32 fix failing tests 2019-07-31 01:04:07 -04:00
Nick Ethier
4aefe5654d vendor: add cni libs 2019-07-31 01:04:07 -04:00
Nick Ethier
cf65bbe47c docker: allow configuration of infra image 2019-07-31 01:04:07 -04:00
Nick Ethier
0cdefcf1f3 website: add new networking related client config docs 2019-07-31 01:04:07 -04:00
Nick Ethier
dc08ec8783 ar: plumb client config for networking into the network hook 2019-07-31 01:04:06 -04:00
Nick Ethier
e15005bdcb networking: Add new bridge networking mode implementation 2019-07-31 01:04:06 -04:00
Michael Schurter
15a0fdf3d3 structs: deepcopy shared alloc resources
Also DRY up Networks code by using Networks.Copy
2019-07-31 01:04:06 -04:00
Michael Schurter
1ba097bbd5 api: add missing Networks field to alloc resources 2019-07-31 01:04:06 -04:00
Michael Schurter
02db1a1b87 vendor: update consul/api@v1.5.1 for connect fields 2019-07-31 01:04:05 -04:00
Michael Schurter
eb2a2cd76e connect: add group.service stanza support 2019-07-31 01:04:05 -04:00
Nick Ethier
1ff85f09f3 executor: cleanup netns handling in executor 2019-07-31 01:04:05 -04:00
Nick Ethier
d28d865100 executor: support network namespacing on universal executor 2019-07-31 01:03:58 -04:00
Nick Ethier
4fdb0dab1c docker: add nil check on network isolation spec 2019-07-31 01:03:21 -04:00
Nick Ethier
c8c1ad748e docker: fix driver test from changed func args 2019-07-31 01:03:20 -04:00
Nick Ethier
67ea2e9305 docker: add additional commens 2019-07-31 01:03:20 -04:00
Nick Ethier
51b69601ab docker: support shared network namespaces 2019-07-31 01:03:20 -04:00
Nick Ethier
e26192ad49 Driver networking support
Adds support for passing network isolation config into drivers and
implements support in the rawexec driver as a proof of concept
2019-07-31 01:03:20 -04:00
Nick Ethier
9fa47daf5c ar: fix lint errors 2019-07-31 01:03:19 -04:00
Nick Ethier
56d5fe704a ar: rearrange network hook to support building on windows 2019-07-31 01:03:19 -04:00
Nick Ethier
508ff3cf2f ar: fix test that failed due to error renaming 2019-07-31 01:03:19 -04:00
Nick Ethier
da3978b377 plugins/driver: make DriverNetworkManager interface optional 2019-07-31 01:03:19 -04:00
Nick Ethier
35de444e9b ar: plumb error handling into alloc runner hook initialization 2019-07-31 01:03:18 -04:00
Nick Ethier
16343ae23a ar: add tests for network hook 2019-07-31 01:03:18 -04:00
Nick Ethier
c742f8b580 ar: cleanup lint errors 2019-07-31 01:03:18 -04:00
Nick Ethier
c39e8dca6e ar: move linux specific code to it's own file and add tests 2019-07-31 01:03:18 -04:00