Commit Graph

26034 Commits

Author SHA1 Message Date
Jeanne Angeles Franco
cfce3e56be Add artifacts manifest (automatically generated) (#23719) 2024-08-02 09:15:43 -04:00
Tim Gross
0c01b2d4e4 build: remove inactive CE versions from being backport eligible (#23720)
As of Nomad 1.8.0 LTS we're no longer backporting changes to Nomad CE versions
1.7.x and 1.6.x. We never got around to removing the flags in the file the
backport assistant uses to control automated backports.
2024-08-01 14:56:34 -04:00
Tim Gross
9d4686c0df tls: remove deprecated prefer_server_cipher_suites field (#23712)
The TLS configuration object includes a deprecated `prefer_server_cipher_suites`
field. In version of Go prior to 1.17, this property controlled whether a TLS
connection would use the cipher suites preferred by the server or by the
client. This field is ignored as of 1.17 and, according to the `crypto/tls`
docs: "Servers now select the best mutually supported cipher suite based on
logic that takes into account inferred client hardware, server hardware, and
security."

This property has been long-deprecated and leaving it in place may lead to false
assumptions about how cipher suites are negotiated in connection to a server. So
we want to remove it in Nomad 1.9.0.

Fixes: https://github.com/hashicorp/nomad-enterprise/issues/999
Ref: https://hashicorp.atlassian.net/browse/NET-10531
2024-08-01 08:52:05 -04:00
Tim Gross
8c5ae0783d docs: fix incorrect header size in changelog (#23716) 2024-08-01 08:50:16 -04:00
Tim Gross
2ee6043cab tls: support setting min version to TLS1.3 (#23713)
Nomad already supports TLS1.3, but not as a minimum version
configuration. Update our config validation to allow setting `tls_min_version`
to 1.3. Update the documentation to match Vault and warn that the
`tls_cipher_suites` field is ignored when TLS is 1.3

Fixes: https://github.com/hashicorp/nomad/issues/20131
Ref: https://hashicorp.atlassian.net/browse/NET-10530
2024-08-01 08:46:32 -04:00
Juana De La Cuesta
2e62c37676 Merge pull request #23618 from hashicorp/nj-remove-wrong-changelog
fix: Remove the changelog from v1.6.13
2024-08-01 10:04:35 +02:00
Adrian Todorov
b1212bae59 Fix a Sentinel policy template (#23686)
Fix a multiline comment missing an opening `#`
2024-07-31 14:18:14 -04:00
sbenoistmics
8ce942b5b3 Allow static ports duplication on network host with multiple matches (#23702) 2024-07-30 11:39:56 -05:00
Tim Gross
c06859e5bc docs: add note about removing support for older clients in 1.9 (#23695)
In Nomad 1.6.0 we started sending the node secret with RPCs that previously did
not include it. We planned to deprecate the older auth workflow but didn't set a
release. Removing the legacy support means that nodes running <1.6.0 will fail
to heartbeat.

Ref: https://hashicorp.atlassian.net/browse/NET-10009
2024-07-26 13:26:24 -04:00
Phil Renaud
08eab0045a [ui] Unescape csi/ in plugin GET requests (#23625)
* Unescape csi/ in plugin GET requests

* CSI de-prefixing no longer necessary in mirage mocked endpoint
2024-07-26 13:19:42 -04:00
Tim Gross
d5ca07a247 docs: notices of upcoming deprecations and backports (#23683)
Add a section to the docs describing planned upcoming deprecations and
removals. Also added some missing upgrade guide sections missed during the last
release.
2024-07-25 10:20:18 -04:00
James Rasell
6a7eb15590 release: explicitly set Linux service file user and group param. (#23687)
The default root:root is used as this provides permissions to run
both server and client agents. The comment details what changes
can be made to operators if needed.

When running the service file prior to this change, root:root
would be the default.
2024-07-25 15:18:47 +01:00
Tim Gross
92d216f3b8 scaling: fix state store corruption bug for job scaling events (#23673)
When updating a `JobScalingEvent`, the state store function did not copy the
existing object before mutating it. This corrupts the state store because it
modifies the leaf node without committing it in a transaction. It can also cause
the Nomad server to crash with a "fatal error: concurrent map read and map
write" if its `ScalingEvents` map is read via the `ScaleStatus` RPC at the same
time as it's being written.

This changeset also removes some mostly-unused public methods on the struct that
dangerously encourage you to mutate it outside of a copy.

Ref: https://hashicorp.atlassian.net/browse/NET-10529
2024-07-24 09:18:03 -04:00
Tim Gross
c8be863bc8 reporting: allow export interval and address to be configurable (#23674)
The go-census library supports configuration to send metrics to a local
development version of the collector. Add "undocumented" configuration options
to the `reporting` block allow developers to debug and verify we're sending the
data we expect with real Nomad servers and not just unit tests.

Ref: https://hashicorp.atlassian.net/browse/NET-10057
Ref: https://github.com/hashicorp/nomad-enterprise/pull/1708
2024-07-24 08:29:59 -04:00
Tim Gross
c280891703 template: allow change_mode script to run after client restart (#23663)
For templates with `change_mode = "script"`, we set a driver handle in the
poststart method, so the template runner can execute the script inside the
task. But when the client is restarted and the template contents change during
that window, we trigger a change_mode in the prestart method. In that case, the
hook will not have the handle and so returns an errror trying to run the change
mode.

We restore the driver handle before we call any prestart hooks, so we can pass
that handle in the constructor whenever it's available. In the normal task start
case the handle will be empty but also won't be called.

The error messages are also misleading, as there's no capabilities check
happening here. Update the error messages to match.

Fixes: https://github.com/hashicorp/nomad/issues/15851
Ref: https://hashicorp.atlassian.net/browse/NET-9338
2024-07-24 08:29:39 -04:00
Deniz Onur Duzgun
7a2c70e3f6 deps: bump azidentity to v1.7.0 (#23664) 2024-07-22 15:03:19 -04:00
Daniel Bennett
10d3f1749b e2e: test all cni config formats (#23650) 2024-07-22 10:17:03 -05:00
Tim Gross
0f4014b4a9 docs: external KMS configuration (#23600)
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the
documentation from that PR to keep the review manageable and present it to a
wider set of reviewers.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: https://github.com/hashicorp/nomad/issues/14852
Ref: https://github.com/hashicorp/nomad/pull/23580
2024-07-19 15:08:54 -04:00
Tim Gross
a29f9b6fc0 keyring: E2E testing for KMS/rotation (#23601)
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the E2E
infrastructure and testing from that PR to keep the review manageable.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: https://github.com/hashicorp/nomad/issues/14852
Ref: https://github.com/hashicorp/nomad/pull/23580
2024-07-19 13:49:48 -04:00
Tim Gross
2f4353412d keyring: support prepublishing keys (#23577)
When a root key is rotated, the servers immediately start signing Workload
Identities with the new active key. But workloads may be using those WI tokens
to sign into external services, which may not have had time to fetch the new
public key and which might try to fetch new keys as needed.

Add support for prepublishing keys. Prepublished keys will be visible in the
JWKS endpoint but will not be used for signing or encryption until their
`PublishTime`. Update the periodic key rotation to prepublish keys at half the
`root_key_rotation_threshold` window, and promote prepublished keys to active
after the `PublishTime`.

This changeset also fixes two bugs in periodic root key rotation and garbage
collection, both of which can't be safely fixed without implementing
prepublishing:

* Periodic root key rotation would never happen because the default
  `root_key_rotation_threshold` of 720h exceeds the 72h maximum window of the FSM
  time table. We now compare the `CreateTime` against the wall clock time instead
  of the time table. (We expect to remove the time table in future work, ref
  https://github.com/hashicorp/nomad/issues/16359)
* Root key garbage collection could GC keys that were used to sign
  identities. We now wait until `root_key_rotation_threshold` +
  `root_key_gc_threshold` before GC'ing a key.
* When rekeying a root key, the core job did not mark the key as inactive after
  the rekey was complete.

Ref: https://hashicorp.atlassian.net/browse/NET-10398
Ref: https://hashicorp.atlassian.net/browse/NET-10280
Fixes: https://github.com/hashicorp/nomad/issues/19669
Fixes: https://github.com/hashicorp/nomad/issues/23528
Fixes: https://github.com/hashicorp/nomad/issues/19368
2024-07-19 13:29:41 -04:00
Piotr Kazmierczak
78bc8e7843 scheduler: fix TestAllocSet_filterByTainted (#23648) 2024-07-19 17:41:06 +02:00
Tim Gross
a8ab2d13b4 docs: explain how to use insecure registries with Docker (#23642)
The documentation for the `SSL` option for the Docker driver is
misleading inasmuch as it's both deprecated and non-functional in current
versions of Docker. Remove this option from the docs and add a section
explaining how to use insecure registries.

Fixes: https://github.com/hashicorp/nomad/issues/23616
2024-07-19 11:18:47 -04:00
Phil Renaud
5df6fe6a57 [ui] Pack metadata booleanified and added to the statuses endpoint (#23404)
* Pack metadata booleanified and added to the statuses endpoint

* Simplify job.IsPack declaration
2024-07-19 11:16:43 -04:00
dependabot[bot]
cf6ce224b3 chore(deps): bump github.com/hashicorp/go-checkpoint (#23588) 2024-07-19 15:13:43 +01:00
James Rasell
de0a86a55a docs: Fix ACL login API path documentation. (#23624) 2024-07-19 11:56:15 +01:00
Juana De La Cuesta
236a519181 Update CHANGELOG.md 2024-07-19 12:51:35 +02:00
Piotr Kazmierczak
f81b72e0bf exec2: update documentation with oom_score_adj settings (#23327) 2024-07-19 09:09:27 +02:00
Juana De La Cuesta
4f99d2b7f8 Merge pull request #23617 from hashicorp/nj-changelog
Add the missing v on the changelog call
2024-07-18 22:47:33 +02:00
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
Juanadelacuesta
be1f7fbdc9 fix: remove the changelog from v1.6.13 2024-07-18 13:31:47 +02:00
Juanadelacuesta
52ff858ff8 Add the missing v on the changelog call 2024-07-18 10:00:21 +02: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