Commit Graph

26004 Commits

Author SHA1 Message Date
Daniel Bennett
32d8ec446f cni: fix parsing .conf and .json configs (#23629)
so we can support more than just .conflist format
like our docs claim we do
2024-07-18 14:55:13 -05:00
Tim Gross
857f20e0ba deps: update go-kms-wrapping and Azure SDK (#23622)
I'm pulling this out to a shared PR between the two, because it'll make
backporting easier.

Closes: #23621
Closes: #23589
2024-07-18 10:18:42 -04:00
Tim Gross
c970d22164 keyring: support external KMS for key encryption key (KEK) (#23580)
In Nomad 1.4.0, we shipped support for encrypted Variables and signed Workload
Identities, but the key material is protected only by a AEAD encrypting the
KEK. Add support for Vault transit encryption and external KMS from major cloud
providers. The servers call out to the external service to decrypt each key in
the on-disk keystore.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Fixes: https://github.com/hashicorp/nomad/issues/14852
2024-07-18 09:42:28 -04:00
Daniel Bennett
de10efa3fa e2e: hc-install consul-cni (#23612)
now that the version with tproxy CNI_ARGS is on releases.hashicorp.com
2024-07-17 14:26:40 -05:00
Daniel Bennett
afbd283c1b e2e: skip missing windows ami if windows clients=0 (#23610)
and tweak Makefile to generate a custom.tfvars
instead of specifying vars separately via CLI.
hoping this makes it a little more obvious
if there is no consul/nomad license.
2024-07-17 12:45:41 -05:00
Martina Santangelo
8cbd857ac9 cni: test Setup method (#23609)
Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
2024-07-17 13:02:23 -04:00
Juana De La Cuesta
3d93bd3778 Merge pull request #23607 from hashicorp/post-1.8.2-release
Post 1.8.2 release
2024-07-17 14:23:58 +02:00
Juanadelacuesta
656725a615 fix: updated ui assets 2024-07-17 13:59:51 +02:00
Juanadelacuesta
16677673e9 Merge release 1.8.2 files 2024-07-17 10:39:22 +02:00
Piotr Kazmierczak
f22ce921cd docker: adjust capabilities on Windows (#23599)
Adjusts Docker capabilities per OS, and checks for runtime on Windows.

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-07-17 09:01:45 +02:00
hc-github-team-nomad-core
c38b011c0c Prepare for next release 2024-07-17 00:00:37 +02:00
hc-github-team-nomad-core
6dc691da07 Generate files for 1.8.2 release 2024-07-17 00:00:36 +02:00
Martina Santangelo
bc81c85ec7 e2e: cni args tests (#23597)
Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
2024-07-15 17:08:50 -04:00
Tim Gross
d688b71f7f testing: fix serf join on keyring test and tighten serf config (#23594)
Nomad's default serf configuration has a full sync interval of 60s (the WAN
default configuration in the library). If tests need to join nodes and the
leader is not in the join set, the test can hang up to twice that interval
waiting for the new node to be seen by the leader and added to Raft.

This changeset includes the following tweaks to improve test timings:
* Ensure that nodes introduced later in the keyring replication test are joined
  to all peers. (Also updates the test to `shoenig/test`.)
* Update the `TestJoin` helper so that all servers passed are joined to the full
  set, instead of a set that's offset by 1, and use a single `Join` call for
  each server to reduce the number of messages sent.
* Reduce the `PushPullInterval` from 60s to 500ms in our unit test
  configuration, to force faster full syncs.
2024-07-15 14:17:46 -04:00
James Rasell
a65e5c126a docs: update quota docs and changelog to detail new cores feature. (#23592) 2024-07-15 10:07:34 +01:00
guifran001
1c44521543 client: Add a preferred address family option for network-interface (#23389)
to prefer ipv4 or ipv6 when deducing IP from network interface

Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
2024-07-12 15:30:38 -05:00
Martina Santangelo
b58b8114f9 fix cpucompat_default_test (#23575)
specifically !linux TestNUMA_topologyFromLegacy_plain
related: 7d73065066
2024-07-12 11:54:37 -05:00
Martina Santangelo
661011f5de cni: allow users to set CNI args in job spec (#23538) 2024-07-12 11:47:15 -04:00
Adrian Todorov
3f2729f7f5 remove mentions of old versions of Nomad in various docs (#23567) 2024-07-12 11:01:32 -04:00
Piotr Kazmierczak
fabae251c5 docs: correct deb and rpm registry installation instructions for podman driver (#23571) 2024-07-12 16:55:10 +02:00
Piotr Kazmierczak
b423276986 docs: update podman driver installation instructions (#23568)
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-07-12 16:30:55 +02:00
Piotr Kazmierczak
ddbb307fa6 e2e: purge the job in the UI stop_proxy() script (#23565)
otherwise namespace deletion fails due to non-terminal allocations
2024-07-12 10:13:51 +02:00
Piotr Kazmierczak
fa8ffedd74 api: handle newlines in JobSubmission vars correctly (#23560)
Fixes a bug where variable values in job submissions that contained newlines
weren't encoded correctly, and thus jobs that contained them couldn't be
resumed once stopped via the UI.

Internal ref: https://hashicorp.atlassian.net/browse/NET-9966
2024-07-12 08:04:27 +02:00
Phil Renaud
75722ef93e Actions pass job id instead of job name (#23553) 2024-07-11 14:55:37 -04:00
Phil Renaud
370952e390 didUpdateAttributes manually called on modify (#23548) 2024-07-11 14:55:01 -04:00
Phil Renaud
0324e781d4 [ui] Global token CRUD in the web UI (#23506)
* First pass at global token creation and regional awareness at token fetch time

* Reset and refetch token when you switch region but stay in place

* Ugly and functional global token save

* Tests and log cleanup
2024-07-11 14:54:39 -04:00
Deniz Onur Duzgun
c82dd76a1b security: update tls cipher suites (#23551) 2024-07-11 14:01:45 -04:00
Adrian Todorov
6589d7130b docs: remove mentions of 'new in Nomad X version' where X is an older version (#23552) 2024-07-11 13:43:28 -04:00
Adrian Todorov
622995df42 fix link to point to Sentinel Enfrocement Levels (#23531) 2024-07-11 12:37:20 -04:00
Adrian Todorov
69d2eed808 Improve the restrict-images Sentinel policy template to only apply to Docker/Podman tasks and to handle version numbers starting with v (#23530) 2024-07-11 12:36:57 -04:00
Daniel Bennett
372dfd3816 msgpack: omit empty fields on NetworkResource (#23540)
the ratio of optimized/unoptimized log size in TestPlanNormalize
has been increased several times as people have added to various
structs and coincidentally bumped into the magic limit.

we encountered another such case when adding to NetworkResource,
but here we omitempty on the struct instead of bumping the limit
in the test.

this has the added benefit of reducing the serialized struct size!
which was the original intent behind this test in the first place :P
the actual value of the ratio is now 0.628... but here the
test value is only dropped down to 0.66 to leave some wiggle room.
2024-07-11 09:59:24 -05:00
James Rasell
f3de47e63d quota: Allow cores to be configured within an enterprise quota. (#23543) 2024-07-11 14:54:25 +01:00
dependabot[bot]
81a5eed99b chore(deps): bump github.com/container-storage-interface/spec (#23514)
Bumps [github.com/container-storage-interface/spec](https://github.com/container-storage-interface/spec) from 1.7.0 to 1.10.0.
- [Release notes](https://github.com/container-storage-interface/spec/releases)
- [Commits](https://github.com/container-storage-interface/spec/compare/v1.7.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/container-storage-interface/spec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 07:56:03 -05:00
dependabot[bot]
9381febedb chore(deps): bump github.com/klauspost/cpuid/v2 from 2.2.5 to 2.2.8 (#23513)
Bumps [github.com/klauspost/cpuid/v2](https://github.com/klauspost/cpuid) from 2.2.5 to 2.2.8.
- [Release notes](https://github.com/klauspost/cpuid/releases)
- [Changelog](https://github.com/klauspost/cpuid/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/cpuid/compare/v2.2.5...v2.2.8)

---
updated-dependencies:
- dependency-name: github.com/klauspost/cpuid/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 07:55:00 -05:00
dependabot[bot]
4ccc613165 build(deps): bump github.com/gorilla/handlers from 1.5.1 to 1.5.2 (#23356)
Bumps [github.com/gorilla/handlers](https://github.com/gorilla/handlers) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/gorilla/handlers/releases)
- [Commits](https://github.com/gorilla/handlers/compare/v1.5.1...v1.5.2)

---
updated-dependencies:
- dependency-name: github.com/gorilla/handlers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 07:54:07 -05:00
dependabot[bot]
83b5a4cbfd chore(deps): bump github.com/shoenig/go-landlock from 1.2.0 to 1.2.1 (#23512)
Bumps [github.com/shoenig/go-landlock](https://github.com/shoenig/go-landlock) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/shoenig/go-landlock/releases)
- [Commits](https://github.com/shoenig/go-landlock/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/shoenig/go-landlock
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 07:53:31 -05:00
Piotr Kazmierczak
4212bfd669 docs: update documentation of namespace delete command (#23536) 2024-07-10 18:31:35 +02:00
Tim Gross
171305c5de docs: fix formatting in 1.6.10 changelog (#23532) 2024-07-10 10:57:56 -04:00
Tim Gross
b09c1146a9 CLI: fix prefix matching across multiple commands (#23502)
Several commands that inspect objects where the names are user-controlled share
a bug where the user cannot inspect the object if it has a name that is an exact
prefix of the name of another object (in the same namespace, where
applicable). For example, the object "test" can't be inspected if there's an
object with the name "testing".

Copy existing logic we have for jobs, node pools, etc. to the impacted commands:

* `plugin status`
* `quota inspect`
* `quota status`
* `scaling policy info`
* `service info`
* `volume deregister`
* `volume detach`
* `volume status`

If we get multiple objects for the prefix query, we check if any of them are an
exact match and use that object instead of returning an error. Where possible
because the prefix query signatures are the same, use a generic function that
can be shared across multiple commands.

Fixes: https://github.com/hashicorp/nomad/issues/13920
Fixes: https://github.com/hashicorp/nomad/issues/17132
Fixes: https://github.com/hashicorp/nomad/issues/23236
Ref: https://hashicorp.atlassian.net/browse/NET-10054
Ref: https://hashicorp.atlassian.net/browse/NET-10055
2024-07-10 09:04:10 -04:00
Jeff Boruszak
d3041a0e86 docs: Autoscaling agent 404 and navigation fix (#23524) 2024-07-09 15:45:57 -04:00
Piotr Kazmierczak
75a1df3390 namespaces: warn if deleting namespaces that have allocs, volumes, vars or quotas associated with them (#23499) 2024-07-09 17:10:09 +02:00
James Rasell
5bce4b531e changelog: add entry for #18876 (#23520)
Co-authored-by: Piotr Kazmierczak <470696+pkazmierczak@users.noreply.github.com>
2024-07-09 13:18:30 +01:00
Piotr Kazmierczak
7772711c89 plugins: fix nomadTopologyToProto panic on systems that don't support NUMA (#23399)
After changes introduced in #23284 we no longer need to make a if
!st.SupportsNUMA() check in the GetNodes() topology method. In fact this check
will now cause panic in nomadTopologyToProto method on systems that don't
support NUMA.
2024-07-09 08:41:52 +02:00
Phil Renaud
6560a0ce02 [ui] Generalized namespace handling, generalized facet searching, node pools facet search (#23468)
* Generalized namespace handling, generalized facet searching, node pools facet search

* Testfixes for namespace facet on jobs list

* Filter or not, need to watch for * namespaces
2024-07-08 16:57:11 -04:00
Deniz Onur Duzgun
ef6cdec884 security: add escape to arbitrary file access (#23319) 2024-07-08 14:00:09 -04:00
Charlie Voiselle
21818843f0 actions/setup-node v3.7.0 ==> v4.0.2 (#23503) 2024-07-08 09:47:02 -04:00
Phil Renaud
7cf6332632 [ui] When a job is deleted in the background, wait until redirect before cache unload (#23492)
* Wait until the job page is moved-off before unloading the job from ember data cache

* handle transitionAborted error
2024-07-04 17:04:30 -04:00
Deniz Onur Duzgun
441f8f21ff build: update to go1.22.5 (#23498) 2024-07-03 15:33:40 -04:00
Tim Gross
18fdda6242 vault: fix namespace reset for clients with unset namespace (#23491)
The Vault "logical" API doesn't allow configuring the namespace on a per-request
basis. Instead, it's set on the client. Our `vaultclient` wrapper locks access
to the API client and sets the namespace (and token, if applicable) for each
request, and then resets the namespace and unlocks the API client.

The logic for resetting the namespace incorrectly assumed that if the Vault
configuration didn't set the namespace that it was canonicalized to the
non-empty string `"default"`. This results in the API client's namespace getting
"stuck" whenever a job uses a non-default namespace if the configuration value
is empty. Update the logic to always go back to the configuration, rather than
accepting the "previous" namespace from the caller.

This changeset also removes some long-dead code in the Vault client wrapper.

Fixes: https://github.com/hashicorp/nomad/issues/22230
Ref: https://hashicorp.atlassian.net/browse/NET-10207
2024-07-03 10:13:20 -04:00
Piotr Kazmierczak
88e8973004 consul: additional unit test for consul config merging (#23495) 2024-07-03 16:09:16 +02:00