Commit graph

20712 commits

Author SHA1 Message Date
Seth Hoenig 29801c8e40 consul: upgrade consul/api to 1.8.1 2021-01-29 10:04:45 -06:00
Tim Gross 23cc8b4d77
interpolate maps in dynamic blocks (#9921)
Update hcl2 for patch to fix map interpolation in dynamic blocks
2021-01-29 10:16:07 -05:00
Michael Lange 5c4803e9b0
Merge pull request #9909 from hashicorp/b-ui/incorrect-error-message
UI: Use server-sent error messages when applicable
2021-01-28 14:02:32 -08:00
Michael Lange 0fb853d135 Add an acceptance test exercising errors from an HTTP response to a notification 2021-01-28 13:47:22 -08:00
Michael Lange d4e32d4128 Test coverage for the messageFromAdapterError util 2021-01-28 12:18:53 -08:00
Michael Lange 52a7a48177 Don't use generic ACL error messages
When the error is actually a 403, an ACL error is appropriate, but when
it isn't, fallback on what the API returns.
2021-01-28 12:18:53 -08:00
Michael Lange 320a63dc68 Improve the message-from-adapter-error util
Automatically detect ACL errors
Provide a generic error message as a fallback
2021-01-28 12:18:52 -08:00
Michael Lange 94094d4f18
Merge pull request #9886 from hashicorp/b-ui/topo-viz-accounting
UI: Topology info panel incorrect accounting bugs
2021-01-28 09:23:01 -08:00
Nomad Release Bot 4f9d2f460f
Release v1.0.3 2021-01-28 16:17:14 +00:00
Buck Doyle 975ea6d5d1 Merge branch 'master' into b-ui/topo-viz-accounting 2021-01-28 09:56:46 -06:00
Chris Baker 0ae273591b bump version to 1.0.3 2021-01-28 14:51:01 +00:00
Chris Baker 8806294cd9 updated changelog for release 2021-01-28 14:46:57 +00:00
vagrant bff87e3d0c attempting to fix flaky tests caused by pid isolation 2021-01-28 12:03:20 +00:00
Chris Baker 2632b81124 lint some nomad HCL job specs 2021-01-28 12:03:19 +00:00
Kris Hicks f5527aea48 Backfill unit test for NEWIPC 2021-01-28 12:03:19 +00:00
Chris Baker 2adf0f12d6 e2e: java driver isolation tests 2021-01-28 12:03:19 +00:00
Chris Baker aa55df0413 additional e2e utils for multi-task allocs 2021-01-28 12:03:19 +00:00
Chris Baker 3b580d9474 modify exec driver test TestExecDriver_StartWaitStop in light of the fact that signaling sleep with SIGINT doesn't work if it's PID1 2021-01-28 12:03:19 +00:00
Chris Baker 5e4be990ff modify exec driver test TestExecDriver_DestroyKills all in light of the fact that PID namespacing means that the kernel does this now 2021-01-28 12:03:19 +00:00
Chris Baker ac1b9655ce put exec process in a new IPC namespace 2021-01-28 12:03:19 +00:00
Kris Hicks d67b77f38e Add a little comment 2021-01-28 12:03:19 +00:00
Kris Hicks 5cf972d2e7 Add test for alloc exec 2021-01-28 12:03:19 +00:00
Kris Hicks 2db8aa2a52 Add e2e test for raw exec 2021-01-28 12:03:19 +00:00
Kris Hicks a5298ea4ba Add unit test for container namespacing 2021-01-28 12:03:19 +00:00
Kris Hicks c13f75d9e1 Always check that resource constraints were applied 2021-01-28 12:03:19 +00:00
Kris Hicks 87188f04de Add PID namespacing and e2e test 2021-01-28 12:03:19 +00:00
Mahmood Ali 74dcee0936 ci: only read/modify GO_TAGS field (#9815)
Only lookup GO_TAGS variable, and avoid the false positives where GO_TAGS is a variable suffix.
2021-01-28 12:03:19 +00:00
Michael Lange 62e4e8ac76
Merge pull request #9906 from hashicorp/b-ui/topo-lines-not-shown
UI: Show allocation associations in the topo viz more often (and fix a bug)
2021-01-27 16:05:43 -08:00
Michael Lange 7a9a208c89 Adjust the no-association-lines logic
On very small clusters, the node count heuristic is impractical and
leads to confusion. By additionally requiring 10+ sibling allocs, the
lines will be shown more often.
2021-01-27 10:24:03 -08:00
Michael Lange 82d06f658b Don't render association lines on resize when lines aren't supposed to be shown at all 2021-01-27 10:20:10 -08:00
Tim Gross cf052cfee5 docs: add metrics from raft leadership transitions 2021-01-27 11:50:11 -05:00
Mahmood Ali 6b2a7425ee
Merge pull request #9903 from hashicorp/b-e2e-tweaks-20210126_2
e2e: Disable node drain deadline tests
2021-01-27 09:36:08 -05:00
Mahmood Ali c92bb342e1 e2e: skip node drain deadline/force tests 2021-01-27 08:42:16 -05:00
Mahmood Ali b12e8912a9 e2e: use f.NoError instead of requires 2021-01-27 08:36:23 -05:00
Michael Lange 60caa366b1
Merge pull request #9896 from hashicorp/b-ui-hz-casing
UI: Use MHz instead of Mhz throughout
2021-01-26 11:23:48 -08:00
Michael Lange 6ba229e86c Use Hz instead of hz throughout the UI 2021-01-26 10:53:26 -08:00
Michael Lange 5a5b7a72a7
Merge pull request #9894 from hashicorp/b-ui/topo-viz-align-text-ff
Use dominant-baseline instead of alignment-baseline to get firefox support
2021-01-26 09:31:18 -08:00
Michael Lange 074f6af98d Use dominant-baseline instead of alignment-baseline to get firefox support 2021-01-26 08:56:52 -08:00
Mahmood Ali 2a279b2a74
Merge pull request #9721 from Mongey/cm-headers
Allow setting of headers in api client
2021-01-26 10:55:22 -05:00
Mahmood Ali e63ae17d63
Merge pull request #9891 from hashicorp/e2e-deflake-tests-20210126
2021-01-26 Attempt at deflaking e2e tests
2021-01-26 10:46:08 -05:00
Buck Doyle 528b13f69d
Fix audit workflow action versions (#9877)
This fixes the version reference error seen in this workflow failure:
https://github.com/hashicorp/nomad/actions/runs/504695096

I’ve also included an update to the sticky comment action version to address this warning in the above link:

marocchino/sticky-pull-request-comment@33a6cfb looks like the shortened version of a commit SHA. Referencing actions by the short SHA will be disabled soon. Please see https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions.

We were previously using 33a6cfb after the maintainer merged my PR to allow the comment to be read from a file, there was no released version with that, but it’s now included in v2.0.0.
2021-01-26 09:06:22 -06:00
Mahmood Ali 1ac8b32e08 e2e: Disable Connect tests
The connect tests are very disruptive: restart consul/nomad agents with new
tokens.  The test seems particularly flaky, failing 32 times out of 73 in my
sample.

The tests are particularly problematic because they are disruptive and affect
other tests. On failure, the nomad or consul agent on the client can get into a
wedged state, so health/deployment info in subsequent tests may be wrong. In
some cases, the node will be deemed as fail, and then the subsequent tests may
fail when the node is deemed lost and the test allocations get migrated unexpectedly.
2021-01-26 10:01:14 -05:00
Mahmood Ali 36ce1e73eb e2e: deflake nodedrain test
The nodedrain deadline test asserts that all allocations are migrated by the
deadline. However, when the deadline is short (e.g. 10s), the test may fail
because of scheduler/client-propagation delays.

In one failing test, it took ~15s from the RPC call to the moment to the moment
the scheduler issued migration update, and then 3 seconds for the alloc to be
stopped.

Here, I increase the timeouts to avoid such false positives.
2021-01-26 10:01:14 -05:00
Mahmood Ali cf8f6f07d7 e2e: vault increase timeout
Increase the timeout for vaultsecrets.  As the default  interval is 0.1s, 10
retries mean it only retries for one second, a very short time for some waiting
scenarios in the test (e.g. starting allocs, etc).
2021-01-26 10:01:14 -05:00
Mahmood Ali 94ad40907c e2e: prefer testutil.WaitForResultRetries
Prefer testutil.WaitForResultRetries that emits more descriptive errors on
failures. `require.Evatually` fails with opaque "Condition never satisfied"
error message.
2021-01-26 10:01:14 -05:00
Mahmood Ali f3f8f15b7b e2e: special case "Unexpected EOF" errors
This is an attempt at deflaking the e2e exec tests, and a way to improve
messages.

e2e occasionally fail with "unexpected EOF" even though the exec output matches
expectations. I suspect there is a race in handling EOF in server/http handling.

Here, we special case this error and ensures we get all failures,
to help debug the case better.
2021-01-26 10:01:14 -05:00
Mahmood Ali 925d9ce952 e2e: tweak failure messages
Tweak the error messages for the flakiest tests, so that on test failure, we get
more output
2021-01-26 09:16:48 -05:00
Mahmood Ali 6aa3dec6cc e2e: use testify requires instead of t.Fatal
testify requires offer better error message that is easier to notice when seeing
a wall of text in the builds.
2021-01-26 09:14:47 -05:00
Mahmood Ali 236b4055a7 e2e: deflake consul/CheckRestart test
Ensure we pass the alloc ID to status.  Otherwise, the test may fail if there is
another spurious allocation running from another test.
2021-01-26 09:12:20 -05:00
Mahmood Ali 0aafd9af64 e2e: Fix build script and pass shellcheck 2021-01-26 09:11:37 -05:00