Commit Graph

20317 Commits

Author SHA1 Message Date
Tim Gross
cee67869b9 e2e: document some design goals 2020-12-17 10:33:33 -05:00
Tim Gross
1574977a79 e2e: bump default version of dev cluster 2020-12-17 10:33:33 -05:00
Tim Gross
8f0134227d e2e: move dnsmasq config into dnsmasq service unit (#9660)
Our dnsmasq configuration needs host-specific data that we can't configure in
the AMI build. But configuring this in userdata leads to a race between
userdata execution, docker.service startup, and dnsmasq.service startup. So
rather than letting dnsmasq come up with incorrect configuration and then
modifying it after the fact, do the configuration in the service's prestart,
and have it kick off a Docker restart when we're done.
2020-12-17 10:33:19 -05:00
Mahmood Ali
0f85a349ff Merge pull request #9656 from hashicorp/docs-hcl2-tweaks-1.0.1
Update HCL2 docs for 1.0.1
2020-12-16 18:56:57 -05:00
Mahmood Ali
5365ed3b43 note that the mount flag was added in 1.0.1 2020-12-16 18:56:08 -05:00
Michael Schurter
3812b6bbd5 Merge pull request #9657 from hashicorp/docs-update-cl
docs: move changelog entry
2020-12-16 15:43:48 -08:00
Seth Hoenig
bb55a2f396 docs: move changelog entry 2020-12-16 17:42:28 -06:00
Mahmood Ali
f365f7a9d0 document the new /dev/disk1s5 on / (apfs, local, read-only, journaled)
devfs on /dev (devfs, local, nobrowse)
/dev/disk1s1 on /System/Volumes/Data (apfs, local, journaled, nobrowse)
/dev/disk1s4 on /private/var/vm (apfs, local, journaled, nobrowse)
map auto_home on /System/Volumes/Data/home (autofs, automounted, nobrowse)
/dev/disk2s1 on /Volumes/nRF Connect 3.6.1 (hfs, local, nodev, nosuid, read-only, noowners, quarantine, mounted by notnoop) syntax
2020-12-16 17:25:02 -05:00
Mahmood Ali
e6e86e9095 Revert "docs: deactivate var-file section"
This reverts commit 4ad0a882ec.
2020-12-16 17:17:16 -05:00
Mahmood Ali
6389d7965b Revert "docs: remove envvar option"
This reverts commit 205a1de6f3.
2020-12-16 17:17:09 -05:00
Michael Schurter
5639ed526e Merge pull request #9654 from hashicorp/docs-1.0.1
docs: release v1.0.1
2020-12-16 13:58:06 -08:00
Michael Schurter
f32b7a228a docs: release v1.0.1
- Update release date in changelog
- Update download version
- Update alert banner to not be so specific
2020-12-16 13:55:09 -08:00
Michael Schurter
0fd2392acf Merge pull request #9653 from hashicorp/docs-9625-changelog
docs: add #9625 to changelog
2020-12-16 11:13:59 -08:00
Tim Gross
004f1c972f template: trigger change_mode for dynamic secrets on restore (#9636)
When a task is restored after a client restart, the template runner will
create a new lease for any dynamic secret (ex. Consul or PKI secrets
engines). But because this lease is being created in the prestart hook, we
don't trigger the `change_mode`.

This changeset uses the the existence of the task handle to detect a
previously running task that's been restored, so that we can trigger the
template `change_mode` if the template is changed, as it will be only with
dynamic secrets.
2020-12-16 13:36:19 -05:00
Buck Doyle
33a4188ca8 Change to use frozen lockfile for UI in CI (#9652)
As suggested in the CircleCI documentation:
https://circleci.com/docs/2.0/yarn/
2020-12-16 12:05:36 -06:00
Michael Schurter
9a8bc7e88c docs: add #9625 to changelog 2020-12-16 09:50:10 -08:00
Seth Hoenig
3e18e02550 Merge pull request #9650 from hashicorp/docs-connect-cls
docs: add two connect entries to changelog
2020-12-16 11:14:53 -06:00
Seth Hoenig
c0016eb32c docs: add two connect entries to changelog
https://github.com/hashicorp/nomad/pull/9624
https://github.com/hashicorp/nomad/pull/9611
2020-12-16 11:02:12 -06:00
Buck Doyle
51f50df9ab Change UI cache prefix (#9649)
Builds on the main branch have been failing, perhaps due to
a corrupt cache.
2020-12-16 10:58:36 -06:00
Buck Doyle
e360410b04 Remove cache fallback
Co-authored-by: Mahmood Ali <mahmood@hashicorp.com>
2020-12-16 10:57:53 -06:00
Buck Doyle
8b28678c58 Change cache prefix
Builds on the main branch have been failing, perhaps due to
a corrupt cache.
2020-12-16 10:37:12 -06:00
Kris Hicks
d9b7fd789a makefile: DRY out pkg targets (#9643)
This removes small differences between the targets, like the statement
about what's being built.

The CGO/Windows related comments were deleted as being not relevant. 
See https://github.com/hashicorp/nomad/pull/9643 for context.
2020-12-16 08:01:50 -08:00
Kris Hicks
9ce4077cae jobspec2: decode returns error in more cases (#9613)
Previously, if decoding the job, tasks, or vault portion of the config
failed, we would not return an error; it was silently ignored.

This also includes a little refactor to reduce some duplication.
2020-12-16 07:49:09 -08:00
Tim Gross
463c3041aa cni: prevent NPE if no interface has sandbox field set
When we iterate over the interfaces returned from CNI setup, we filter for one
with the `Sandbox` field set. Ensure that if none of the interfaces has that
field set that we still return an available interface.
2020-12-16 10:36:03 -05:00
Mahmood Ali
9a112af109 Merge pull request #9567 from hashicorp/scripts-fail-on-golang-failure
scripts: fail if golang installation fails
2020-12-16 10:04:34 -05:00
Seth Hoenig
de6b344083 Merge pull request #9640 from hashicorp/f-darwin-arm64
build: add build target for darwin/arm64
2020-12-15 14:05:10 -06:00
Mahmood Ali
8879645ab9 docker: introduce a new hcl2-friendly mount syntax (#9635)
Introduce a new more-block friendly syntax for specifying mounts with a new `mount` block type with the target as label:

```hcl
config {
  image = "..."

  mount {
    type = "..."
    target = "target-path"
    volume_options { ... }
  }
}
```

The main benefit here is that by `mount` being a block, it can nest blocks and avoids the compatibility problems noted in https://github.com/hashicorp/nomad/pull/9634/files#diff-2161d829655a3a36ba2d916023e4eec125b9bd22873493c1c2e5e3f7ba92c691R128-R155 .

The intention is for us to promote this `mount` blocks and quietly deprecate the `mounts` type, while still honoring to preserve compatibility as much as we could.

This addresses the issue in https://github.com/hashicorp/nomad/issues/9604 .
2020-12-15 14:13:50 -05:00
Dave May
be10568b0e Debug test refactor (#9637)
* debug: refactor test cases
* debug: remove unnecessary syncbuffer resets
* debug: cleaned up test code per suggestions
* debug: clarify note on parallel testing
2020-12-15 13:51:41 -05:00
Seth Hoenig
f652c3d93b Merge pull request #9633 from hashicorp/b-undo-429-connlimit
agent: revert use of http connlimit
2020-12-15 11:02:14 -06:00
Seth Hoenig
25cf8b2628 build: add build target for darwin/arm64
Add a build target for Apple Silicon (m1) macs.

Note that Go must have been built with c4f497da6f for
Nomad to work on darwin/arm64 (i.e. wait for go1.16).

Closes #9408
2020-12-15 10:57:50 -06:00
Mahmood Ali
0993d5ce70 docs: more notes about hcl2 compatibility (#9634)
Make backward compatibility notes about Task Driver config options. Namely, call out the use of blocks with non-identifier attributes (like in docker systctl and storage_options) or nesting block syntax within an attribute assignment. Neither of these are valid HCL2. The solution is relatively simple: We can add = and quote the non-identifier attribute names.

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2020-12-14 17:07:09 -05:00
Seth Hoenig
b10ab27a4c Merge pull request #9632 from hashicorp/b-mac-make-check
build: set linux build tag on CNI networking
2020-12-14 14:42:40 -06:00
Seth Hoenig
f0dff3fada agent: revert use of http connlimit
https://github.com/hashicorp/nomad/pull/9608 introduced the use of the
built-in HTTP 429 response handler provided by go-connlimit. There is
concern though around plausible DOS attacks that need to be addressed,
so this PR reverts that functionality.

It keeps a fix in the tests around the use of an HTTPS enabled client
for when the server is listening on HTTPS. Previously, the tests would
fail deterministically with io.EOF because that's how the TLS server
terminates invalid connections.

Now, the result is much less deterministic. The state of the client
connection and the server socket depends on when the connection is
closed and how far along the handshake was.
2020-12-14 14:40:14 -06:00
Dave May
8038641f1b debug: Fix node count bug from GH-9566 (#9625)
* debug: update test to identify bug in GH-9566
* debug: range tests need fresh cmd each iteration
* debug: fix node count bug in GH-9566
2020-12-14 15:02:48 -05:00
Seth Hoenig
76ba12fc18 build: set linux build tag on CNI networking
CNI network configuration is currently only supported on Linux.
For now, add the linux build tag so that the deadcode linter does
not trip over unused CNI stuff on macOS.
2020-12-14 12:05:16 -06:00
Seth Hoenig
fa4fb8922a Merge pull request #9630 from hashicorp/f-add-depgaurd
Add and enable depgaurd linter
2020-12-14 11:13:03 -06:00
Kris Hicks
4194f74e0a Bump buf check breaking tag to 1.0.0 (#9629) 2020-12-14 09:07:51 -08:00
Seth Hoenig
14aca2fe3e Merge pull request #9624 from hashicorp/b-connect-meta-regression
consul/connect: fix regression where client connect images ignored
2020-12-14 11:03:09 -06:00
Seth Hoenig
8816b7b6d5 Merge pull request #9620 from hashicorp/f-remove-consul-flags
command: remove use of flag impls from consul
2020-12-14 10:33:35 -06:00
Seth Hoenig
275806cebf build: add depgaurd linter and block consul flags 2020-12-14 10:21:26 -06:00
Seth Hoenig
d5e6c5e22e command: give flag-helpers a better name 2020-12-14 10:07:27 -06:00
Seth Hoenig
f0f6f3a18f consul/connect: fix regression where client connect images ignored
Nomad v1.0.0 introduced a regression where the client configurations
for `connect.sidecar_image` and `connect.gateway_image` would be
ignored despite being set. This PR restores that functionality.

There was a missing layer of interpolation that needs to occur for
these parameters. Since Nomad 1.0 now supports dynamic envoy versioning
through the ${NOMAD_envoy_version} psuedo variable, we basically need
to first interpolate

  ${connect.sidecar_image} => envoyproxy/envoy:v${NOMAD_envoy_version}

then use Consul at runtime to resolve to a real image, e.g.

  envoyproxy/envoy:v${NOMAD_envoy_version} => envoyproxy/envoy:v1.16.0

Of course, if the version of Consul is too old to provide an envoy
version preference, we then need to know to fallback to the old
version of envoy that we used before.

  envoyproxy/envoy:v${NOMAD_envoy_version} => envoyproxy/envoy:v1.11.2@sha256:a7769160c9c1a55bb8d07a3b71ce5d64f72b1f665f10d81aa1581bc3cf850d09

Beyond that, we also need to continue to support jobs that set the
sidecar task themselves, e.g.

  sidecar_task { config { image: "custom/envoy" } }

which itself could include teh pseudo envoy version variable.
2020-12-14 09:47:55 -06:00
Steffen
bdadac5a77 on s390x, only compile compile release for s390x (#9601) 2020-12-14 08:27:19 -05:00
Mahmood Ali
3a8475e694 Merge pull request #9623 from hashicorp/b-hcl2-envvar
set EnvVar variables in hcl2 parsing
2020-12-11 13:59:37 -05:00
Mahmood Ali
205a1de6f3 docs: remove envvar option 2020-12-11 13:34:53 -05:00
Mahmood Ali
ae7e29ff49 actually pass env-vars to hcl2 parsing 2020-12-11 13:32:54 -05:00
Drew Bailey
3e793ea3c4 Events/acl events (#9595)
* fix acl event creation

* allow way to access secretID without exposing it to stream

test that values are omitted

test event creation

test acl events

payloads are pointers

fix failing tests, do all security steps inside constructor

* increase time

* ignore empty tokens

* uncomment line

* changelog
2020-12-11 10:40:50 -05:00
Seth Hoenig
fdd8d352f9 command: remove use of flag impls from consul
In a few places Nomad was using flag implementations directly
from Consul, lending to Nomad's need to import consul. Replace
those uses with helpers already in Nomad, and copy over the bare
minimum needed to make the autopilot flags behave as they have.
2020-12-11 07:58:20 -06:00
Michael Lange
893211f6f6 Merge pull request #9599 from hashicorp/changli0617-patch-1
Highlight "alternative to Kubernetes"
2020-12-10 14:29:32 -08:00
Michael Lange
3097739b77 Merge pull request #9600 from hashicorp/changli0617-patch-2
Update index.jsx
2020-12-10 14:28:55 -08:00