Commit Graph

21307 Commits

Author SHA1 Message Date
Seth Hoenig
595cef8136 drivers/exec: pass capabilities through executor RPC
Add capabilities to the LaunchRequest proto so that the
capabilities set actually gets plumbed all the way through
to task launch.
2021-05-17 12:37:40 -06:00
Seth Hoenig
683751ddd6 deps: update go mod tidy
Looks like we no longer need a package.
2021-05-17 12:37:40 -06:00
Seth Hoenig
17ec5a5aa8 drivers: fixup linux version dependent test cases
The error output being checked depends on the linux caps supported
by the particular operating system. Fix these test cases to just
check that an error did occur.
2021-05-17 12:37:40 -06:00
Seth Hoenig
7245ac3fc5 docs: update docs for linux capabilities in exec/java/docker drivers
Update docs for allow_caps, cap_add, cap_drop in exec/java/docker driver
pages. Also update upgrade guide with guidance on new default linux
capabilities for exec and java drivers.
2021-05-17 12:37:40 -06:00
Seth Hoenig
c34beb48b1 drivers/docker: reuse capabilities plumbing in docker driver
This changeset does not introduce any functional change for the
docker driver, but rather cleans up the implementation around
computing configured capabilities by re-using code written for
the exec/java task drivers.
2021-05-17 12:37:40 -06:00
Seth Hoenig
9bb4b8fa04 drivers/java: enable setting allow_caps on java driver
Enable setting allow_caps on the java task driver plugin, along
with the associated cap_add and cap_drop options in java task
configuration.
2021-05-17 12:37:40 -06:00
Seth Hoenig
191144c3bf drivers/exec: enable setting allow_caps on exec driver
This PR enables setting allow_caps on the exec driver
plugin configuration, as well as cap_add and cap_drop in
exec task configuration. These options replicate the
functionality already present in the docker task driver.

Important: this change also reduces the default set of
capabilities enabled by the exec driver to match the
default set enabled by the docker driver. Until v1.0.5
the exec task driver would enable all capabilities supported
by the operating system. v1.0.5 removed NET_RAW from that
list of default capabilities, but left may others which
could potentially also be leveraged by compromised tasks.

Important: the "root" user is still special cased when
used with the exec driver. Older versions of Nomad enabled
enabled all capabilities supported by the operating system
for tasks set with the root user. To maintain compatibility
with existing clusters we continue supporting this "feature",
however we maintain support for the legacy set of capabilities
rather than enabling all capabilities now supported on modern
operating systems.
2021-05-17 12:37:40 -06:00
Tim Gross
78c3a4722e fix missing changelog entries from backports 2021-05-17 10:04:22 -04:00
Michael Schurter
78fd25cbdd Merge pull request #10550 from hashicorp/docs-rtd
Remote Task Driver docs
2021-05-14 10:49:35 -07:00
Michael Schurter
711a05d3ce Apply suggestions from code review
Co-authored-by: Seth Hoenig <shoenig@hashicorp.com>
2021-05-14 10:45:12 -07:00
changli0617
1f0328406d Update alert-banner.js 2021-05-14 08:35:29 -04:00
Michael Schurter
b68ec47247 docs: mention #10592 in rtd docs 2021-05-13 15:14:56 -07:00
Lars Lehtonen
cded17cbaf client: fix multiple imports (#10537) 2021-05-13 14:30:31 -04:00
Michael Schurter
4393d666ae docs: document remote task drivers & ecs driver 2021-05-13 10:43:46 -07:00
Mahmood Ali
02e585a611 add a section about memory oversubscription (#10573)
add a section about memory oversubscription

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-05-13 13:35:51 -04:00
Buck Doyle
a9ec864a1a ui: Fix server list leader determination for IPv6 (#10530)
This closes #10513, thanks to @bastelfreak for the report.
GET /status/leader returns an IPv6 host with square brackets
around the IP address as expected, but the rpcAddr property
on the agent model does not.

This fixes rpcAddr, updates the Mirage /status/leader mock
to properly format an IPv6 host, and changes the agent
factory to sometimes produce IPv6 addresses.

I added a formatHost utility function to centralise the
conditional square bracket-wrapping that would have
otherwise been further scattered around.
2021-05-13 12:29:51 -05:00
Michael Schurter
d52e5f4405 Merge pull request #10585 from hashicorp/docs-1.1.0-rc1
website: update 1.1.0-beta1 to 1.1.0-rc1
2021-05-13 08:16:30 -07:00
Michael Schurter
9c67910160 website: update 1.1.0-beta1 to 1.1.0-rc1 2021-05-13 08:10:03 -07:00
Georges-Etienne Legendre
f75ceead7a Fix exec not working for another region (#10539)
This conditionally includes a region query parameter when
opening the exec socket.
2021-05-13 09:14:16 -05:00
Tim Gross
7aa18b6063 docs: fix fields in 'volume create' example
The `capacity` block was removed during implementation in lieu of the
`capacity_max` and `capacity_min` fields, but it wasn't removed from the
example in the documentation.
2021-05-13 08:48:49 -04:00
Seth Hoenig
2c55444f1e Merge pull request #10577 from joel0/cf-capitalization
minor: update 'Cloudflare' capitalization
2021-05-12 16:34:20 -06:00
Joel May
780698caa4 minor: update 'Cloudflare' capitalization 2021-05-12 15:15:54 -07:00
Michael Schurter
95629862ec Merge pull request #10574 from hashicorp/docs-1.0.5
update website to Nomad 1.0.5
2021-05-12 14:31:06 -07:00
Michael Schurter
5d939ca7a6 update website to Nomad 1.0.5 2021-05-12 14:25:48 -07:00
Michael Schurter
9ad14e3808 Merge pull request #10572 from hashicorp/cve-2021-32575
drivers/docker+exec+java: disable net_raw capability by default
2021-05-12 14:21:25 -07:00
Seth Hoenig
003d68fe6d drivers/docker+exec+java: disable net_raw capability by default
The default Linux Capabilities set enabled by the docker, exec, and
java task drivers includes CAP_NET_RAW (for making ping just work),
which has the side affect of opening an ARP DoS/MiTM attack between
tasks using bridge networking on the same host network.

https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities

This PR disables CAP_NET_RAW for the docker, exec, and java task
drivers. The previous behavior can be restored for docker using the
allow_caps docker plugin configuration option.

A future version of nomad will enable similar configurability for the
exec and java task drivers.
2021-05-12 13:22:09 -07:00
Kendall Strautman
1235684be7 content: swap out diagrams with typos (#10571) 2021-05-12 08:50:20 -07:00
Drew Bailey
4be7897de8 check and return error from parsing var-files (#10569)
* check and return error from parsing var-files

* changelog entry for 1.1.0 and 1.0.5
2021-05-12 09:08:59 -04:00
Kyle MacDonald
4b9fff4376 website: set up /trial redirection (#10565) 2021-05-11 11:10:34 -05:00
Isabel Suchanek
276644470e Clean up docker driver test to make it less flaky (#10559)
Co-authored-by: Mahmood Ali <mahmood@hashicorp.com>
2021-05-10 14:58:19 -07:00
Tim Gross
ef0ebcd59f E2E: remove references to nomad_sha 2021-05-10 16:42:39 -04:00
Mahmood Ali
490f393fb7 e2e: enable memory oversubscription (#10557)
Enable memory oversubscription for the oversubscription tests.
2021-05-10 14:33:47 -04:00
Mike Nomitch
ee1163ed94 docs: add detail to 1.1 upgrade guide for licensing 2021-05-10 12:28:05 -04:00
Mike Noordermeer
87af5dec78 docs: clarify that a default update strategy is used when update strategy is omitted 2021-05-10 08:27:22 -04:00
Isabel Suchanek
1b2296400b Fix test panic in docker driver test 2021-05-07 12:12:33 -07:00
Luiz Aoqui
334de88582 docs: restructure autoscaling plugins menu (#10534)
* docs: restructure autoscaling plugins menu

* docs: add autoscaling threshold strategy (#10535)
2021-05-07 14:21:50 -04:00
Chris Baker
140e7b3aaa Node Drain Metadata (#10250) 2021-05-07 13:58:40 -04:00
Tim Gross
826ecd94e4 documentation for disable_default_tcp_check 2021-05-07 13:16:39 -04:00
Mahmood Ali
d8e40600f6 Support disabling TCP checks for connect sidecar services 2021-05-07 12:10:26 -04:00
Seth Hoenig
72bab511e7 Merge pull request #10543 from hashicorp/docs-consul-grpc-addr
docs: add agent consul grpc_address docs
2021-05-07 09:32:04 -06:00
Seth Hoenig
bcddcc3a98 docs: add agent consul grpc_address docs
We already supported this configuration, but forgot to document it.
2021-05-07 09:25:09 -06:00
Tim Gross
8ca717705a update golang to 1.16.4 2021-05-07 11:06:54 -04:00
Seth Hoenig
db524627b5 Merge pull request #10532 from hashicorp/docs-fixup-dc-region-arch-words-10515
docs: fixup wording around datacenters and regions on architecture docs
2021-05-07 09:02:43 -06:00
dependabot[bot]
2c2ad32fdc ui: build(deps): bump underscore from 1.12.0 to 1.13.1 in /ui (#10525)
Bumps [underscore](https://github.com/jashkenas/underscore) from 1.12.0 to 1.13.1.
- [Release notes](https://github.com/jashkenas/underscore/releases)
- [Commits](https://github.com/jashkenas/underscore/compare/1.12.0...1.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 09:38:16 -05:00
dependabot[bot]
9df1c2ee54 ui: build(deps): bump url-parse from 1.4.7 to 1.5.1 in /ui (#10528)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 09:35:07 -05:00
Mahmood Ali
cada70dd91 annotate 1.1 beta fields 2021-05-07 10:21:16 -04:00
Mahmood Ali
1bca427855 Remove a stale note about 0.9 scheduler config 2021-05-07 10:21:16 -04:00
Mike Nomitch
1df61f9c7e Moving licensing to the top of the upgrade guide and clarifying wording 2021-05-07 08:17:17 -04:00
Mike Nomitch
d5276c63ff website: adding trial links 2021-05-07 08:17:17 -04:00
Seth Hoenig
a4b22fe8d2 docs: fixup wording around datacenters and regions on architecture docs
Part of #10515
2021-05-06 16:18:02 -06:00