Commit Graph

25940 Commits

Author SHA1 Message Date
Piotr Kazmierczak
0ece7b5c16 docker: validate that containers do not run as ContainerAdmin on Windows (#23443)
This enables checks for ContainerAdmin user on docker images on Windows. It's
only checked if users run docker with process isolation and not hyper-v,
because hyper-v provides its own, proper sandboxing.

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-06-27 16:22:24 +02:00
Tim Gross
df67e74615 Consul: add preflight checks for Envoy bootstrap (#23381)
Nomad creates Consul ACL tokens and service registrations to support Consul
service mesh workloads, before bootstrapping the Envoy proxy. Nomad always talks
to the local Consul agent and never directly to the Consul servers. But the
local Consul agent talks to the Consul servers in stale consistency mode to
reduce load on the servers. This can result in the Nomad client making the Envoy
bootstrap request with a tokens or services that have not yet replicated to the
follower that the local client is connected to. This request gets a 404 on the
ACL token and that negative entry gets cached, preventing any retries from
succeeding.

To workaround this, we'll use a method described by our friends over on
`consul-k8s` where after creating the objects in Consul we try to read them from
the local agent in stale consistency mode (which prevents a failed read from
being cached). This cannot completely eliminate this source of error because
it's possible that Consul cluster replication is unhealthy at the time we need
it, but this should make Envoy bootstrap significantly more robust.

This changset adds preflight checks for the objects we create in Consul:
* We add a preflight check for ACL tokens after we login via via Workload
  Identity and in the function we use to derive tokens in the legacy
  workflow. We do this check early because we also want to use this token for
  registering group services in the allocrunner hooks.
* We add a preflight check for services right before we bootstrap Envoy in the
  taskrunner hook, so that we have time for our service client to batch updates
  to the local Consul agent in addition to the local agent sync.

We've added the timeouts to be configurable via node metadata rather than the
usual static configuration because for most cases, users should not need to
touch or even know these values are configurable; the configuration is mostly
available for testing.


Fixes: https://github.com/hashicorp/nomad/issues/9307
Fixes: https://github.com/hashicorp/nomad/issues/10451
Fixes: https://github.com/hashicorp/nomad/issues/20516

Ref: https://github.com/hashicorp/consul-k8s/pull/887
Ref: https://hashicorp.atlassian.net/browse/NET-10051
Ref: https://hashicorp.atlassian.net/browse/NET-9273
Follow-up: https://hashicorp.atlassian.net/browse/NET-10138
2024-06-27 10:15:37 -04:00
Phil Renaud
54aafa574d [ui] Jobs list should handle 502s and 504s gracefully (#23427)
* UI handles 502s and 504s gracefully

* Test and cleanup
2024-06-26 21:51:18 -04:00
Matt McQuillan
6df8537b69 Merge pull request #23440 from hashicorp/mmcquillan/jirasyncfix
Fixing sync to work only on Issue Link field
2024-06-26 10:47:25 -04:00
Charlie Voiselle
07516c8159 [docs] Add Sentinel info to version-specific upgrade page (#23173)
The upgrade to sentinel v0.26 is a breaking change, requiring users of
custom Sentinel plugins to rebuild them using sentinel-sdk v4
2024-06-26 10:46:38 -04:00
Matt McQuillan
9224da6bf1 change to sync on only the GitHub link 2024-06-26 10:33:56 -04:00
Matt McQuillan
7ccef279ef removing 'test' from sync name 2024-06-26 10:31:01 -04:00
Tim Gross
bd2a2ce33c deps: update Consul API and consul-template (#23436)
* Upgrade consul-template to 0.39.0 to allow template queries of admin
  partitions and sameness groups.
* Upgrade our Consul API to 1.29.1 because it's required for CT, and to remove
  the replacement pinned version we were using to pick up some newer Consul API
  features we needed in 1.7.0.

Ref: https://hashicorp.atlassian.net/browse/NET-10153
2024-06-26 08:49:35 -04:00
dependabot[bot]
c5b7f6b3c5 chore(deps): bump github.com/hashicorp/go-getter from 1.7.4 to 1.7.5 (#23434)
Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.7.4 to 1.7.5.
- [Release notes](https://github.com/hashicorp/go-getter/releases)
- [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml)
- [Commits](https://github.com/hashicorp/go-getter/compare/v1.7.4...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-getter
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 16:43:02 -04:00
dependabot[bot]
3dc7fdaad6 chore(deps): bump github.com/hashicorp/go-retryablehttp (#23428)
Bumps [github.com/hashicorp/go-retryablehttp](https://github.com/hashicorp/go-retryablehttp) from 0.7.2 to 0.7.7.
- [Changelog](https://github.com/hashicorp/go-retryablehttp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/go-retryablehttp/compare/v0.7.2...v0.7.7)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-retryablehttp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 09:04:49 -04:00
Antti
bbdc8b7fa7 docs: add deprecation notice to cron on docs/job-specification/periodic (#23424) 2024-06-24 11:35:20 -04:00
liukch
cc7a5ed7e2 docs: Fix parameter type and default value in client reserved configuration. (#23359) 2024-06-21 16:29:59 -04:00
Heitor de Bittencourt
0588172a19 docs/jobspec: Fix "task" block placement (#23406)
The `task` block should be inside the `group` block. The example in the
page places the `task` block directly under `job`.
2024-06-21 15:21:32 -04:00
Tim Gross
336f27d96e changelog: update titles of recent ENT-only backports (#23414)
The changelog is slightly misleading in that recent Enterprise-only backports
following our LTS release have titles that don't call out they're for Enterprise
only. Updating the title brings us in line with what Consul has done.
2024-06-21 14:55:07 -04:00
Piotr Kazmierczak
8f80bd505f scheduler: fix a bug where we subtract reserved node resources twice (#23386)
Fixes a bug in the nodeResources.Comparable method, where CPU resources were
accidentally offset with reserved resources, whereas functions that use this
field expect total CPU resources.
2024-06-21 15:22:59 +02:00
Daniel Bennett
c84b4ad67b e2e: add test for task schedule{} (#23382) 2024-06-20 11:18:53 -05:00
Tim Gross
ee48bdd4d9 server: fix panic if heartbeat reset happens for GC'd node (#23383)
When setting up the timer for heartbeat invalidation, there's no control that
allows us to remove that timer when the node is GC'd. If the GC window is narrow
enough, it's possible to GC a node that has a waiting heartbeat timer. In this
case, we hit a bug where querying for the node returns `nil` and this is
incorrectly handled when checking for disconnect/reconnect state. Fix this bug
by correctly handling a `nil` node and allowing the `Node.Update` RPC to fire
normally (which then errors correctly).

Fixes: https://github.com/hashicorp/nomad/issues/23376
Ref: https://hashicorp.atlassian.net/browse/NET-10109
2024-06-20 10:05:44 -04:00
James Rasell
ca97aa55c0 Merge pull request #23397 from hashicorp/post-1.8.1-release
Post 1.8.1 release
2024-06-20 14:30:41 +01:00
James Rasell
d63ad1a6c5 Generate UI assets 2024-06-20 14:13:24 +01:00
James Rasell
6278e6c0cb Merge release 1.8.1 files 2024-06-20 08:02:48 +01:00
James Rasell
26d0a9169c docs: fix typo in alloc exec CLI docs page. (#23392) 2024-06-20 07:50:32 +01:00
hc-github-team-nomad-core
41e0dfd13b Prepare for next release 2024-06-19 15:24:16 +01:00
hc-github-team-nomad-core
9566174e92 Generate files for 1.8.1 release 2024-06-19 15:24:08 +01:00
Phil Renaud
81d4f364b1 [ui] Squashing Ember deprecations (#22424)
* Now that message is a gettable on the task-event model, no longer needs to be attrs-set at serializer

* xstate future-proofing default prop
2024-06-19 09:02:53 -04:00
Daniel Bennett
cfeedd05e8 api: use the task in Allocations.GetPauseState (#23377) 2024-06-18 12:31:12 -05:00
Phil Renaud
b92afa5b4a [ui] Helios page headers added to the administration section (#23366)
* Helios page headers added to the administration section

* data-test-title mirage helper missed on policy page
2024-06-18 12:37:51 -04:00
Phil Renaud
5aad029ddb [ui] Dont show keyboard hints when a user is trying to take a screenshot (#23365)
* Dont show keyboard hints when a user is trying to take a screenshot

* Oh hey metaKey is its own special thing
2024-06-18 12:37:05 -04:00
James Rasell
54115a1b37 github: use larger instance type for prepare-release release step. (#23374) 2024-06-18 14:36:40 +01:00
scoss
7dcb9fcf76 add exec2 and podman to supported driver list for memory-max resource limit (#23364)
* add exevc2 and podman to supported driver list

* tweak exec2 naming

Co-authored-by: David Yu <dyu@hashicorp.com>

---------

Co-authored-by: Seth Hoenig <shoenig@duck.com>
Co-authored-by: David Yu <dyu@hashicorp.com>
2024-06-18 08:26:50 -05:00
dependabot[bot]
a80ebe2c15 chore(deps): bump github.com/docker/docker (#20460)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 26.0.1+incompatible to 26.0.2+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v26.0.1...v26.0.2)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 16:53:29 -04:00
Daniel Bennett
2da38ba9c4 e2e: jobs3 hcl vars differently (#23363)
and include jobspec and vars in registrations
(so they show up in the UI under job Definition)
2024-06-17 13:20:51 -05:00
Daniel Bennett
5a6e3d5ef0 e2e: add Enterprise Option for cluster3.Establish (#23362) 2024-06-17 12:59:37 -05:00
Phil Renaud
8e589a9319 [ui] Add "stopped" as a valid status on jobs index/job detail (#23328)
* Stopped status passed through to the statuses endpoint and observed on job model and steady-state panel

* Status passed to statuses endpoint and test for FE model statuses
2024-06-14 23:33:00 -04:00
Tim Gross
d9a10a6298 deps: update runc to 1.1.13 (#23331)
Update `runc` to 1.1.13 to pick up build support for Go 1.22.4+, in order to
ensure we've resolved errors cloning processes into Linux namespaces for
libcontainer (`exec` driver) with new versions of Go and older but still
supported versions of glibc.

This changeset has two minor quirks:

* Testing shows that the reported issues is already resolved on `main` by
  upgrading to Go 1.22.4 without this dependency bump, at least for glibc 2.31.
  Upgrading the dependency should make sure there isn't another glibc version
  where the problem will still appear.

* This version of `runc` refers to fields in `cilium/ebpf` which are not present
  in more recent versions of that library. So in order to build, we have to
  downgrade `cilium/ebpf`. Fortunately, `runc` is the only consumer of that
  transitive dependency.

Closes: https://github.com/hashicorp/nomad/issues/20212
Ref: https://hashicorp.atlassian.net/browse/NET-10078
2024-06-14 14:38:44 -04:00
David Yu
0cc2ab5ae9 Merge pull request #23322 from hashicorp/david-yu-patch-1
docs: install `consul-cni` manually or via linux packaging
2024-06-14 11:37:46 -07:00
David Yu
36f75c5f3e Update index.mdx 2024-06-14 11:25:23 -07:00
David Yu
b2d29340b6 Update index.mdx
remove LICENSE.txt from unzip
2024-06-14 11:00:49 -07:00
David Yu
be30e130fe Update index.mdx 2024-06-14 10:57:05 -07:00
David Yu
ac2a5a851f Update index.mdx 2024-06-14 10:25:52 -07:00
David Yu
b79d813e7d Update index.mdx 2024-06-14 10:12:34 -07:00
David Yu
dea70a356e Update index.mdx 2024-06-14 10:03:17 -07:00
David Yu
f974381253 Update index.mdx 2024-06-14 09:47:36 -07:00
David Yu
26a30ac908 Update index.mdx 2024-06-14 09:42:56 -07:00
Daniel Bennett
3b9283a2fd task schedule: fix end-of-month validation bug (#23329)
fix erroneous "end cannot be sooner than start" error condition
on the last day of the month
2024-06-14 11:26:35 -05:00
David Yu
947ecd1c77 Update website/content/docs/install/index.mdx
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-06-14 09:16:14 -07:00
Phil Renaud
eacf47a484 [ui] Remove simulacral allocation stat in favor of live-updating one (#23306)
* Remove simulacral allocation stat in favor of live-updating one

* Tests remove dependency on job-summary as well
2024-06-14 09:23:31 -04:00
Piotr Kazmierczak
85430be6dd raw_exec: oom_score_adj support (#23308) 2024-06-14 11:36:27 +02:00
David Yu
fe0e76cc3b Update index.mdx 2024-06-13 20:50:57 -07:00
David Yu
5d9d337727 Update index.mdx 2024-06-13 20:37:21 -07:00
David Yu
a08d6f5768 Update index.mdx 2024-06-13 20:10:31 -07:00