Commit Graph

20453 Commits

Author SHA1 Message Date
Seth Hoenig
4cf3ad161f command: bump connect examples to v3
Nomad v1.0+ combined with Consul 1.9+ support launching Envoy v1.16+
which is the first version of envoy to support arm64 platforms out
of the box.

By rebuilding our example docker containers for connect to be multiplatform
between amd64 and arm64, Nomad can provide a nicer user experience for
those trying out Connect on arm64 machines (e.g. AWS Graviton instances
or Raspberry Pi 4's).

This has been done for the countdash examples at v3.

https://hub.docker.com/layers/hashicorpnomad/counter-dashboard/v3/images/sha256-94e323587bc372ba1b6ca5c58dc23e291e9d26787b50e71025f1c8967dfbcd07?context=repo
https://hub.docker.com/layers/hashicorpnomad/counter-api/v3/images/sha256-16a9e9e08082985a635c9edd0f258b084153c6c7831a9b41d34bde78c308b65c?context=repo

The connect-native examples are now also multiplatform at v5, but we
don't have them built into `job init`.
2021-01-10 16:54:31 -06:00
Chris Baker
d234000e87 Merge pull request #9761 from hashicorp/b-9758-enforce-policy-on-scale
in Job.Scale, ensure that new count is within [min,max] configured in  scaling policy
2021-01-08 15:49:38 -06:00
Chris Baker
cb1c0181be nicer error message 2021-01-08 21:13:29 +00:00
Jeff Escalante
cf4534c2a2 update dependencies (#9760) 2021-01-08 15:46:31 -05:00
Buck Doyle
017b47dfb4 Add documentation for exec websocket (#9679) 2021-01-08 14:01:06 -06:00
Chris Baker
59271c668e appease the linter and fix an incorrect test 2021-01-08 19:38:25 +00:00
Chris Baker
9087e0be99 changelog for 9761 2021-01-08 19:26:42 +00:00
Chris Baker
ebd28c527c in Job.Scale, ensure that new count is within [min,max] configured in scaling policy
resolves #9758
2021-01-08 19:24:36 +00:00
Drew Bailey
9c3ce6b6dc persist shared ports during inplace updates (#9736)
AllocatedSharedResources were not being copied over to the new
allocation struct the scheduler makes during inplace updates. This
caused downstream issues after the plan was applied, namely the shared
ports were dropped causing issues with service
registration/deregistration.

test that shared ports are preserved

change log, also carry over shared network

copy networks
2021-01-08 09:00:41 -05:00
Tim Gross
463fed965d docs: clarify default behavior of docker userns_mode 2021-01-08 08:22:39 -05:00
Chulki Lee
1343d7a545 Fix HCL2 link 2021-01-08 08:19:06 -05:00
James Rasell
4c7ac0391f Merge pull request #9747 from hashicorp/f-e2e-scaling-policy-suite
e2e: add ScalingPolicies test suite with initial test case.
2021-01-08 10:51:48 +01:00
Michael Lange
ab2e13a64f Merge pull request #9614 from hashicorp/dependabot/npm_and_yarn/ui/ini-1.3.7
build(deps): bump ini from 1.3.5 to 1.3.7 in /ui
2021-01-07 14:10:03 -08:00
Tim Gross
6944bd729a changelog entry for #9532 2021-01-07 15:44:13 -05:00
Joel May
2e17610406 Allow client.cpu_total_compute to override attr.cpu.totalcompute 2021-01-07 15:31:11 -05:00
Seth Hoenig
6d23db674d Merge pull request #9751 from hashicorp/b-envoyv-segfault
consul/connect: fix panic during in-place upgrade with connect jobs
2021-01-07 14:22:27 -06:00
Tim Gross
fb2e612c6c changelog: add entry for GH-9050 2021-01-07 15:01:04 -05:00
Seth Hoenig
803cd312b1 consul/connect: fix panic during in-place upgrade with connect jobs
When upgrading from Nomad v0.12.x to v1.0.x, Nomad client will panic on
startup if the node is running Connect enabled jobs. This is caused by
a missing piece of plumbing of the Consul Proxies API interface during the
client restore process.

Fixes #9738
2021-01-07 13:24:24 -06:00
Michael Lange
aba38e4734 Merge pull request #9690 from hashicorp/docs-wtdd-update-ui-api-docs
WTDD: Update UI api docs
2021-01-07 10:52:45 -08:00
Kent 'picat' Gruber
e1e7303579 Update go-getter to v1.5.2 with support for vhost style S3 paths (#9349) 2021-01-07 13:34:28 -05:00
Jeff Escalante
fc1a4055b3 Merge pull request #9748 from hashicorp/docs-zs.build-time-code-highlight-revised
Add build-time highlighting to code blocks
2021-01-07 13:33:49 -05:00
Michael Lange
590e7ca5e0 Update the page param default to 1 instead of 0 2021-01-07 09:59:09 -08:00
Michael Lange
f2d7ecd394 Typo fixes
Co-authored-by: Buck Doyle <buck@hashicorp.com>
2021-01-07 09:59:08 -08:00
Michael Lange
a6fa1eb457 Update 'Node' to 'Client' which is used throughout the UI 2021-01-07 09:59:08 -08:00
Michael Lange
f777d57f07 Add missing faceted search query params 2021-01-07 09:59:08 -08:00
Michael Lange
e965804289 Remove no longer true enteprise warning 2021-01-07 09:59:08 -08:00
Michael Lange
0642278a01 Remove version introduction
0.7 is ancient at this point. Now it's as if the UI has always existed.
2021-01-07 09:59:07 -08:00
Michael Lange
68770753f8 Add missing routes to the UI API doc 2021-01-07 09:59:07 -08:00
Michael Lange
a53c8ebe3f Merge pull request #9733 from hashicorp/b-ui/topo-viz-old-agent
UI: Guard against nodes running an old version of the Nomad agent
2021-01-07 09:27:14 -08:00
Zach Shilton
e495c70069 Remove broken shell-session highlighting 2021-01-07 11:57:09 -05:00
Zach Shilton
051f704a70 Add build-time highlighting to code blocks 2021-01-07 11:48:02 -05:00
James Rasell
08af8eb824 Merge pull request #9744 from hashicorp/f-add-namespace-e2e-oss
e2e: move namespace tests into OSS.
2021-01-07 17:36:09 +01:00
Nick Ethier
a454580733 Merge pull request #9739 from hashicorp/b-alloc-netmode-ports
Use port's to value when building service address under 'alloc' addr_mode
2021-01-07 09:16:27 -05:00
Kdu Bonalume
efa7428b23 Fix missing link for Consul integration
Add a link back to configuration/consul in the `service` parameter section of the `group` stanza.
2021-01-07 09:02:43 -05:00
Nick Ethier
90aab3fdc5 Apply suggestions from code review
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-01-07 08:53:54 -05:00
James Rasell
72728ed7c0 e2e: add ScalingPolicies test suite with initial test case. 2021-01-07 14:39:55 +01:00
James Rasell
306618eafa e2e: move namespace tests into OSS. 2021-01-07 09:15:43 +01:00
Jeff Escalante
88a0c34599 Merge pull request #9743 from hashicorp/je.fix-edit-page-links
hotfix: fix 'edit this page' links
2021-01-06 19:09:46 -05:00
Jeff Escalante
057efe9fa3 fix 'edit this page' links 2021-01-06 19:01:32 -05:00
Mahmood Ali
d9495d2b66 tests: deflake test-api job (#9742)
Deflake test-api job, currently failing at around 7.6% (44 out of 578
workflows), by ensuring that test nomad agent use a small dedicated port
range that doesn't conflict with the kernel ephemeral range.

The failures are disproportionatly related to port allocation, where a
nomad agent fails to start when the http port is already bound to
another process. The failures are intermitent and aren't specific to any
test in particular. The following is a representative failure:
https://app.circleci.com/pipelines/github/hashicorp/nomad/13995/workflows/6cf6eb38-f93c-46f8-8aa0-f61e62fe7694/jobs/128169
.

Upon investigation, the issue seems to be that the api freeport library
picks a port block within 10,000-14,500, but that overlaps with the
kernel ephemeral range 32,769-60,999! So, freeport may allocate a free
port to the nomad agent, just to be used by another process before the
nomad agent starts!

This happened for example in
https://app.circleci.com/pipelines/github/hashicorp/nomad/14111/workflows/e1fcd7ff-f0e0-4796-8719-f57f510b1ffa/jobs/129684
.  `freeport` allocated port 41662 to serf, but `google_accounts`
raced to use it to connect to the CirleCI vm metadata service.

We avoid such races by using a dedicated port range that's disjoint from
the kernel ephemeral port range.
2021-01-06 16:18:28 -05:00
Mahmood Ali
354b2ee1a6 tests: deflake TestTaskRunner_StatsHook_Periodic (#9734)
This PR deflakes TestTaskRunner_StatsHook_Periodic tests and adds backoff when the driver closes the channel.

TestTaskRunner_StatsHook_Periodic is currently the most flaky test - failing ~4% of the time (20 out of 486 workflows). A sample failure: https://app.circleci.com/pipelines/github/hashicorp/nomad/14028/workflows/957b674f-cbcc-4228-96d9-1094fdee5b9c/jobs/128563 .

This change has two components:

First, it updates the StatsHook so that it backs off when stats channel is closed. In the context of the test where the mock driver emits a single stats update and closes the channel, the test may make tens of thousands update during the period. In real context, if a driver doesn't implement the stats handler properly or when a task finishes, we may generate way too many Stats queries in a tight loop. Here, the backoff reduces these queries. I've added a failing test that shows 154,458 stats updates within 500ms in https://app.circleci.com/pipelines/github/hashicorp/nomad/14092/workflows/50672445-392d-4661-b19e-e3561ed32746/jobs/129423 .

Second, the test ignores the first stats update after a task exit. Due to the asynchronicity of updates and channel/context use, it's possible that an update is enqueued while the test marks the task as exited, resulting into a spurious update.
2021-01-06 16:03:00 -05:00
Nick Ethier
da1bf449c1 command/agent/consul: remove duplicated tests 2021-01-06 14:11:31 -05:00
Kris Hicks
c13180beb2 consul: Refactor parts of UpdateWorkload (#9737)
This removes modification of ops in methods that UpdateWorkload calls, keeping
them local to UpdateWorkload. It also includes some rewrites of checkRegs for
clarity.
2021-01-06 11:11:28 -08:00
Nick Ethier
54a22cef8e command/agent/consul: use port's to value when building service address under 'alloc' addr_mode 2021-01-06 13:52:48 -05:00
Jeff Escalante
caa21c2396 Merge pull request #9638 from hashicorp/je.mdx-remote
implement mdx remote
2021-01-06 11:55:05 -05:00
Michael Lange
37e1551dcb When the topo viz filters out nodes, report this to the user via warning alert 2021-01-05 17:11:17 -08:00
Michael Lange
4d5fef68b0 Filter out nodes that don't have NodeResources from the topo viz 2021-01-05 17:11:17 -08:00
Jeff Escalante
1510360649 fix intro navigation 2021-01-05 19:40:19 -05:00
Jeff Escalante
35682f635a fix style references 2021-01-05 19:07:55 -05:00
Jeff Escalante
801098e914 touch up dependencies 2021-01-05 19:03:18 -05:00