Commit Graph

25064 Commits

Author SHA1 Message Date
hc-github-team-nomad-core 9f804b0b4c
backport of commit 46442f441f8de8d22dbc243af041aa38c58bd6bc (#19158)
Co-authored-by: Jorge Marey <6938602+jorgemarey@users.noreply.github.com>
2023-11-23 10:58:50 -05:00
Charlie Voiselle 78d7c2bbee
backport of commit 659c0945fc35a2a0a999be7ce531beb55cfeeeab (#19004) (#19129)
[core] Honor job's namespace when checking `distinct_hosts` feasibility
Manual backport because of conflicts in upgrade-specific.mdx
2023-11-20 14:06:51 -05:00
hc-github-team-nomad-core d21d4e85cf
backport of commit ff928a804590611111763632388161dc711adf88 (#19124)
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-11-17 15:10:23 -05:00
hc-github-team-nomad-core c742a55583
backport of commit a3f8a52fd4b192db339540152033b94f1e010b31 (#19123)
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-11-17 15:10:13 -05:00
hc-github-team-nomad-core ed9786c957
backport of commit 557b4942d0f1959bb8509ff9303fa0baa37c0276 (#19116)
Co-authored-by: codenoid <14269809+codenoid@users.noreply.github.com>
2023-11-17 09:05:59 -05:00
hc-github-team-nomad-core 7057c0c886
e2e: fix and modernize rescheduling test (#19105) (#19107)
The E2E test suite for rescheduling had a few bugs:
* Using the command line to stop a job with a failing deployment returns a non-zero exit
  code, which would cause an otherwise passing test to fail.
* Two of the input jobs were actually invalid but were only correctly detected
  as such because of #17342

This changeset also updates the whole test suite to move it off the v1
"framework". A few test assertions are also de-flaked.

Fixes: #19076

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-11-16 15:52:05 -05:00
Judith Malnick 5f5ed4161e docs: fix networking and licensing links (#19096) 2023-11-16 09:06:21 -05:00
hc-github-team-nomad-core fd4ba6ebb6
Backport of Move systemd unit file rate limits from [Service] to [Unit] block into release/1.6.x #19103
Co-authored-by: Adrian Todorov <adrian.todorov@hashicorp.com>
2023-11-16 08:41:47 -05:00
hc-github-team-nomad-core 70f69fc9e6
backport of commit 26746a4093169b703cf1d8e207c1c226b9b160be (#19092)
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-11-14 23:09:04 -05:00
hc-github-team-nomad-core 1a506eba24
backport of commit cf8dde0850a23d4e8b0b48bc5fea2f66388ab711 (#18544)
Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
2023-11-14 14:38:26 -05:00
hc-github-team-nomad-core f9dd34d816
backport of commit 533f293fa832c9f7343c952da08c819454b5eb1e (#18675)
Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
2023-11-14 14:36:54 -05:00
hc-github-team-nomad-core 9843620934
docs: fix link to dynamic node metadata API (#19086) (#19087)
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-11-14 11:28:58 -05:00
hc-github-team-nomad-core 1aad861d61
tools: bump version of `hc-install` (#19063) (#19065)
The version we have of `hc-install` doesn't allow installing Enterprise
binaries. Upgrade so that this is available to the development team and to our
E2E tests in the Enterprise repo.

(Cherry-pick also backports install of `go-modtool`)
2023-11-10 10:12:51 -05:00
hc-github-team-nomad-core 720248ddb0
Bump consul-template to 0.35.0 (#19032) (#19045)
Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
2023-11-09 10:30:55 -05:00
hc-github-team-nomad-core c160ce99e3
backport of commit ab36cf031c80253d9c2827852f8ecbeae3d6ff5b (#19027)
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-11-07 20:15:31 -05:00
hc-github-team-nomad-core 9634ef7bb2
backport of commit cf2f48efd4ecf68f2502d4443a60477d1e3fb0f5 (#19017)
Co-authored-by: Seth Hoenig <shoenig@duck.com>
2023-11-07 14:04:24 -06:00
hc-github-team-nomad-core db11c461ce
backport of commit e4f98a8d1da82e55e2943e07cb681e939c36cdcb (#19008)
Co-authored-by: Dave May <dmay@hashicorp.com>
2023-11-07 07:47:54 +00:00
hc-github-team-nomad-core b9581ad187
backport of commit 5f98e6473ccf2c5dd643fa6d79c43d113c56519b (#18987)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-11-03 08:59:05 +00:00
hc-github-team-nomad-core 3052ddf8f1
acl/client: fix incorrect denied error on calls with dangling policies. (#18972) (#18981)
When a user performs a client API call, the Nomad client will
perform an RPC which looks up the ACL policies which the callers
ACL token is assigned. If the ACL token includes dangling (deleted)
policies, the call would previously fail with a permission denied
error.

This change ensures this error is not returned and that the lookup
will succeed in the event of dangling policies.

Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-11-02 15:47:21 +00:00
James Rasell a6239adf76
cli: remove unused raft tool helper. (#18954) (#18971) 2023-11-02 08:19:04 +00:00
hc-github-team-nomad-core 8c4eff2d23
backport of commit 4ec27a97d163c010c2d00f49e9e81d20496c8e6e (#18953)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-11-01 13:57:21 +00:00
hc-github-team-nomad-core 74e03514fc
backport of commit 0748918a3a355ad5616e32c1aad041321a771418 (#18919)
Co-authored-by: Dave May <dmay@hashicorp.com>
2023-10-30 14:00:40 -04:00
Seth Hoenig 1a0fb2f4fa Merge branch 'release/1.6.3' into release/1.6.x 2023-10-30 17:38:56 +00:00
hc-github-team-nomad-core d799b95beb Prepare for next release 2023-10-30 12:58:17 +00:00
hc-github-team-nomad-core 8511d831e2 Generate files for 1.6.3 release 2023-10-30 12:58:10 +00:00
hc-github-team-nomad-core 90cb544835
scheduler: ensure dup alloc names are fixed before plan submit. (#18873) (#18891)
This change fixes a bug within the generic scheduler which meant
duplicate alloc indexes (names) could be submitted to the plan
applier and written to state. The bug originates from the
placements calculation notion that names of allocations being
replaced are blindly copied to their replacement. This is not
correct in all cases, particularly when dealing with canaries.

The fix updates the alloc name index tracker to include minor
duplicate tracking. This can be used when computing placements to
ensure duplicate are found, and a new name picked before the plan
is submitted. The name index tracking is now passed from the
reconciler to the generic scheduler via the results, so this does
not have to be regenerated, or another data structure used.

Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-27 17:04:04 +01:00
hc-github-team-nomad-core 50c9af53b7
backport of commit e8efe2d251bf3628f13c7eb3ce2422eb7e5b85f6 (#18884)
Co-authored-by: Juana De La Cuesta <juanita.delacuestamorales@hashicorp.com>
2023-10-27 17:20:53 +02:00
hc-github-team-nomad-core c21331bc21
backport of commit 9ae4b10dc68cdec4a9a8498ddc9fa466e6b04b5a (#18887)
Co-authored-by: Seth Hoenig <shoenig@duck.com>
2023-10-27 07:32:38 -05:00
hc-github-team-nomad-core d8ec23da45
backport of commit b3e41bec2d593ae9bb24f7c6fe252854914d795f (#18862)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-25 09:32:10 +01:00
hc-github-team-nomad-core 76b2360213
backport of commit 9b3c38b3ed886f06cd945a3dfd34aa7d8f8817c1 (#18859)
Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
2023-10-24 16:23:44 -07:00
hc-github-team-nomad-core 497d91f4bc
backport of commit b46b41a2e99ad85d18189b44836f6436a2149a8b (#18855)
Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
2023-10-24 11:51:04 -05:00
hc-github-team-nomad-core c3546e80a1
backport of commit f64ade2304583ba338c4da3c6c11de722ea4b497 (#18852)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-24 17:15:35 +01:00
Tim Gross 2d65dc418c
metrics: prevent negative counter from iowait decrease (#18849)
The iowait metric obtained from `/proc/stat` can under some circumstances
decrease. The relevant condition is when an interrupt arrives on a different
core than the one that gets woken up for the IO, and a particular counter in the
kernel for that core gets interrupted. This is documented in the man page for
the `proc(5)` pseudo-filesystem, and considered an unfortunate behavior that
can't be changed for the sake of ABI compatibility.

In Nomad, we get the current "busy" time (everything except for idle) and
compare it to the previous busy time to get the counter incremeent. If the
iowait counter decreases and the idle counter increases more than the increase
in the total busy time, we can get a negative total. This previously caused a
panic in our metrics collection (see #15861) but that is being prevented by
reporting an error message.

Fix the bug by putting a zero floor on the values we return from the host CPU
stats calculator.

Backport-of: #18835
2023-10-24 10:37:46 -04:00
hc-github-team-nomad-core 922512677e
backport of commit b55dcb39672e00686b70b1ec5f6b99c66c5397ce (#18841)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-24 08:08:35 +01:00
hc-github-team-nomad-core 95cd0bcdda
backport of commit 1a0d1efb0d10f7508cdf5919a3e5d9bc72cadf5d (#18816)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-20 08:49:59 +01:00
hc-github-team-nomad-core 63c2013ec1
backport of commit ca9e08e6b5eee00d055b9429df5976a70cdcb2d6 (#18813)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-20 08:35:54 +01:00
hc-github-team-nomad-core 8f1713dcd4
backport of commit 99e54da9a9aeb3a62a05f50af1dcc74c06cd9657 (#18797)
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-10-18 10:22:36 -04:00
hc-github-team-nomad-core 897bcef932
backport: do not embed *Server (#18786) (#18789)
these structs embedding Server, then Server _also embedding them_,
confused my IDE, isn't necessary, and just feels wrong!
2023-10-17 15:55:56 -05:00
Daniel Bennett b6298dc073
Only generate default workload identity once per alloc task - 1.6.x (#18783)
this can save a bit of cpu when
running plans for tasks that already exist,
and prevents Nomad tokens from changing,
which can cause task template{}s to restart
unnecessarily.
2023-10-17 13:06:20 -05:00
hc-github-team-nomad-core 657c430e0b
backport of commit 1ffdd576bbcea1f32aa179934b63450808c022c4 (#18772)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-16 16:19:58 +01:00
hc-github-team-nomad-core fe612a4d18
backport of commit 6dcc4021882fcaecb7ee73655bd46eb84e4671d4 (#18767)
Co-authored-by: Kevin Wang <kwangsan@gmail.com>
2023-10-16 09:15:16 +01:00
hc-github-team-nomad-core 17f752e896
backport of commit cb2363f2fbbb771af9c8a62ed09a60250df647a2 (#18763)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 08:47:57 +01:00
hc-github-team-nomad-core c96ca6f81c
vault: use an importable const for Vault header string. (#18740) (#18750)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-13 08:11:54 +01:00
hc-github-team-nomad-core a532f3c321
chore(deps): bump golang.org/x/net from 0.14.0 to 0.17.0 (#18734) (#18738)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 08:43:51 +01:00
hc-github-team-nomad-core f6900307e8
backport deps: remove Vault SDK into release/1.6.x (#18727)
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-10-11 12:02:48 -04:00
hc-github-team-nomad-core 60747ed93d
Backport of build: bump to go 1.21.3 into release/1.6.x (#18722)
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-10-11 08:51:43 -04:00
hc-github-team-nomad-core 441d733046
backport of commit ef6814388c1adae3ee2bbe317719aded15275648 (#18720)
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-10-10 17:34:58 -04:00
hc-github-team-nomad-core 7725931942
backport of commit 9c57ddd8383c2302884272d0b01b034e2509f194 (#18714)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-10 10:15:23 +01:00
hc-github-team-nomad-core 20a928805f
backport of commit 9a38a9c188533c856affda84f272a83856085942 (#18711)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 09:37:13 +01:00
hc-github-team-nomad-core db61b01482
backport of commit fbf792f895dffbf7e53fd9922de1a8d50a5ab58a (#18708)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 08:46:09 +01:00