-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport of Multiple instances of a periodic job are run simultaneously, when prohibit_overlap is true into release/1.5.x #16661
Commits on Mar 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c5d54ab - Browse repository at this point
Copy the full SHA c5d54abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0deb5c4 - Browse repository at this point
Copy the full SHA 0deb5c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b739144 - Browse repository at this point
Copy the full SHA b739144View commit details
Commits on Mar 2, 2023
-
Merge pull request #16284 from hashicorp/post-1.5.0-rc.1-release
admin: post 1.5.0 rc.1 release
Configuration menu - View commit details
-
Copy full SHA for cf5b14c - Browse repository at this point
Copy the full SHA cf5b14cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba6d20b - Browse repository at this point
Copy the full SHA ba6d20bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 01d049e - Browse repository at this point
Copy the full SHA 01d049eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4734c02 - Browse repository at this point
Copy the full SHA 4734c02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 646a82b - Browse repository at this point
Copy the full SHA 646a82bView commit details -
client: use RPC address and not serf after initial Consul discovery (#…
…16217) Nomad servers can advertise independent IP addresses for `serf` and `rpc`. Somewhat unexpectedly, the `serf` address is also used for both Serf and server-to-server RPC communication (including Raft RPC). The address advertised for `rpc` is only used for client-to-server RPC. This split was introduced intentionally in Nomad 0.8. When clients are using Consul discovery for connecting to servers, they get an initial discovery set from Consul and use the correct `rpc` tag in Consul to get a list of adddresses for servers. The client then makes a `Status.Peers` RPC to get the list of those servers that are raft peers. But this endpoint is shared between servers and clients, and provides the address used for Raft. Most of the time this is harmless because servers will bind on 0.0.0.0 anyways., But in topologies where servers are on a private network and clients are on separate subnets (or even public subnets), clients will make initial contact with the server to get the list of peers but then populate their local server set with unreachable addresses. Cluster administrators can work around this problem by using `server_join` with specific IP addresses (or DNS names), because the `Node.UpdateStatus` endpoint returns the correct set of RPC addresses when updating the node. So once a client has registered, it will get the correct set of RPC addresses. This changeset updates the client logic to query `Status.Members` instead of `Status.Peers`, and then extract the correctly advertised address and port from the response body.
Configuration menu - View commit details
-
Copy full SHA for a9bb8e9 - Browse repository at this point
Copy the full SHA a9bb8e9View commit details -
tests: add functionality to skip a test if it's not running in CI and…
… not with root user (#16222)
Configuration menu - View commit details
-
Copy full SHA for fbd0dcb - Browse repository at this point
Copy the full SHA fbd0dcbView commit details -
deps: update go-plugin to 1.4.9 (#16292)
Fixes #16288. An earlier version of `go-plugin` introduced a warning log if `SecureConfig` is unset. For Nomad and other applications that have "internal" `go-plugin` consumers where the application runs itself as a plugin, this causes spurious warn-level logs. For Nomad in particular this means every task driver and logmon invocation emits the log, which is our primary operation. The change was reverted upstream, so this changeset picks up the reverted version.
Configuration menu - View commit details
-
Copy full SHA for 9102a24 - Browse repository at this point
Copy the full SHA 9102a24View commit details -
handle
FSM.Apply
errors inraftApply
(#16287)The signature of the `raftApply` function requires that the caller unwrap the first returned value (the response from `FSM.Apply`) to see if it's an error. This puts the burden on the caller to remember to check two different places for errors, and we've done so inconsistently. Update `raftApply` to do the unwrapping for us and return any `FSM.Apply` error as the error value. Similar work was done in Consul in hashicorp/consul#9991. This eliminates some boilerplate and surfaces a few minor bugs in the process: * job deregistrations of already-GC'd jobs were still emitting evals * reconcile job summaries does not return scheduler errors * node updates did not report errors associated with inconsistent service discovery or CSI plugin states Note that although _most_ of the `FSM.Apply` functions return only errors (which makes it tempting to remove the first return value entirely), there are few that return `bool` for some reason and Variables relies on the response value for proper CAS checking.
Configuration menu - View commit details
-
Copy full SHA for bbd41c8 - Browse repository at this point
Copy the full SHA bbd41c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for f88e3b0 - Browse repository at this point
Copy the full SHA f88e3b0View commit details -
Merge pull request #16293 from hashicorp/post-1.5.0-release
admin: Post 1.5.0 release
Configuration menu - View commit details
-
Copy full SHA for f553dc8 - Browse repository at this point
Copy the full SHA f553dc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 273b76a - Browse repository at this point
Copy the full SHA 273b76aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f89910d - Browse repository at this point
Copy the full SHA f89910dView commit details
Commits on Mar 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 64d27c6 - Browse repository at this point
Copy the full SHA 64d27c6View commit details -
api: add new test case for force-leave (#16260)
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Configuration menu - View commit details
-
Copy full SHA for 2ec6575 - Browse repository at this point
Copy the full SHA 2ec6575View commit details -
service: fix regression in task access to list/read endpoint (#16316)
When native service discovery was added, we used the node secret as the auth token. Once Workload Identity was added in Nomad 1.4.x we needed to use the claim token for `template` blocks, and so we allowed valid claims to bypass the ACL policy check to preserve the existing behavior. (Invalid claims are still rejected, so this didn't widen any security boundary.) In reworking authentication for 1.5.0, we unintentionally removed this bypass. For WIs without a policy attached to their job, everything works as expected because the resulting `acl.ACL` is nil. But once a policy is attached to the job the `acl.ACL` is no longer nil and this causes permissions errors. Fix the regression by adding back the bypass for valid claims. In future work, we should strongly consider getting turning the implicit policies into real `ACLPolicy` objects (even if not stored in state) so that we don't have these kind of brittle exceptions to the auth code.
Configuration menu - View commit details
-
Copy full SHA for a4f7926 - Browse repository at this point
Copy the full SHA a4f7926View commit details -
cli: use shared logic for resolving job prefix (#16306)
Several `nomad job` subcommands had duplicate or slightly similar logic for resolving a job ID from a CLI argument prefix, while others did not have this functionality at all. This commit pulls the shared logic to the command Meta and updates all `nomad job` subcommands to use it.
Configuration menu - View commit details
-
Copy full SHA for 0e824d3 - Browse repository at this point
Copy the full SHA 0e824d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 158d6a9 - Browse repository at this point
Copy the full SHA 158d6a9View commit details -
remove backcompat support for non-atomic job registration (#16305)
In Nomad 0.12.1 we introduced atomic job registration/deregistration, where the new eval was written in the same raft entry. Backwards-compatibility checks were supposed to have been removed in Nomad 1.1.0, but we missed that. This is long safe to remove.
Configuration menu - View commit details
-
Copy full SHA for ceed255 - Browse repository at this point
Copy the full SHA ceed255View commit details -
api: set last index and request time on alloc stop (#16319)
Some of the methods in `Allocations()` incorrectly use the `putQuery` in API calls where `put` is more appropriate since they are not reading information back. These methods are also not returning request metadata such as `LastIndex` back to callers, which can be useful to have in some scenarios. They also provide poor developer experience as they take an `*api.Allocation` struct when only the allocation ID is necessary. This can lead consumers to make unnecessary API calls to fetch the full allocation. Fixing these problems require updating the methods' signatures so they take `*WriteOptions` instead of `*QueryOptions` and return `*WriteMeta`, but this is a breaking change that requires advanced notice to consumers. This commit adds a future breaking change notice and also fixes the `Stop` method so it properly returns request metadata in a backwards compatible way.
Configuration menu - View commit details
-
Copy full SHA for b24dddc - Browse repository at this point
Copy the full SHA b24dddcView commit details -
Configuration menu - View commit details
-
Copy full SHA for b07af57 - Browse repository at this point
Copy the full SHA b07af57View commit details
Commits on Mar 6, 2023
-
[ui] Fix: Wildcard-datacenter system/sysbatch jobs stopped showing cl…
…ient links/chart (#16274) * Fix for wildcard DC sys/sysbatch jobs * A few extra modules for wildcard DC in systemish jobs * doesMatchPattern moved to its own util as match-glob * DC glob lookup using matchGlob * PR feedback
Configuration menu - View commit details
-
Copy full SHA for a57f97e - Browse repository at this point
Copy the full SHA a57f97eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78bcd32 - Browse repository at this point
Copy the full SHA 78bcd32View commit details -
Configuration menu - View commit details
-
Copy full SHA for 605f155 - Browse repository at this point
Copy the full SHA 605f155View commit details
Commits on Mar 7, 2023
-
scheduler: correctly detect inplace update with wildcard datacenters (#…
…16362) Wildcard datacenters introduced a bug where a job with any wildcard datacenters will always be treated as a destructive update when we check whether a datacenter has been removed from the jobspec. Includes updating the helper so that callers don't have to loop over the job's datacenters.
Configuration menu - View commit details
-
Copy full SHA for 6f52a91 - Browse repository at this point
Copy the full SHA 6f52a91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03d6a8c - Browse repository at this point
Copy the full SHA 03d6a8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 003a567 - Browse repository at this point
Copy the full SHA 003a567View commit details -
Configuration menu - View commit details
-
Copy full SHA for b677ec7 - Browse repository at this point
Copy the full SHA b677ec7View commit details -
docker: fix bug where network pause containers would be erroneously r…
…econciled (#16352) * docker: fix bug where network pause containers would be erroneously gc'd * docker: cl: thread context from driver into pause container restoration
Configuration menu - View commit details
-
Copy full SHA for b3f7559 - Browse repository at this point
Copy the full SHA b3f7559View commit details -
e2e: fix permissions on nomad data directory (#16376)
This PR updates the provisioning step where we create /opt/nomad/data, such that it is with 0700 permissions in line with our security guidance.
Configuration menu - View commit details
-
Copy full SHA for 24af468 - Browse repository at this point
Copy the full SHA 24af468View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d5740b - Browse repository at this point
Copy the full SHA 5d5740bView commit details
Commits on Mar 8, 2023
-
build(deps): bump golang.org/x/crypto from 0.5.0 to 0.7.0 (#16337)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.5.0 to 0.7.0. - [Release notes](https://github.com/golang/crypto/releases) - [Commits](golang/crypto@v0.5.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto 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>
Configuration menu - View commit details
-
Copy full SHA for 37e9eca - Browse repository at this point
Copy the full SHA 37e9ecaView commit details -
Update ioutil library references to os and io respectively for command (
#16329) No user facing changes so I assume no change log is required
Configuration menu - View commit details
-
Copy full SHA for 99f43c1 - Browse repository at this point
Copy the full SHA 99f43c1View commit details -
Update ioutil library references to os and io respectively for e2e he…
…lper nomad (#16332) No user facing changes so I assume no change log is required
Configuration menu - View commit details
-
Copy full SHA for 962b65f - Browse repository at this point
Copy the full SHA 962b65fView commit details -
Update ioutil library references to os and io respectively for API an…
…d Plugins package (#16330) No user facing changes so I assume no change log is required
Configuration menu - View commit details
-
Copy full SHA for 0e74431 - Browse repository at this point
Copy the full SHA 0e74431View commit details -
deps: Update ioutil library references to os and io respectively for …
…drivers package (#16331) * Update ioutil library references to os and io respectively for drivers package No user facing changes so I assume no change log is required * Fix failing tests
Configuration menu - View commit details
-
Copy full SHA for 3160c76 - Browse repository at this point
Copy the full SHA 3160c76View commit details -
deps: Update ioutil deprecated library references to os and io respec…
…tively in the client package (#16318) * Update ioutil deprecated library references to os and io respectively * Deal with the errors produced. Add error handling to filEntry info Add error handling to info
Configuration menu - View commit details
-
Copy full SHA for 48e7d70 - Browse repository at this point
Copy the full SHA 48e7d70View commit details -
[ui] Fix: New toast notifications no longer last forever (#16384)
* Removes an errant console.log and corrects a default sticky=true on toast notifications * Default so no need to refault
Configuration menu - View commit details
-
Copy full SHA for fcd51dc - Browse repository at this point
Copy the full SHA fcd51dcView commit details -
e2e: setup nomad permissions correctly (client vs. server) (#16399)
This PR configures - server nodes with a systemd unit running the agent as the nomad service user - client nodes with a root owned nomad data directory
Configuration menu - View commit details
-
Copy full SHA for 40ab325 - Browse repository at this point
Copy the full SHA 40ab325View commit details -
client: disable running artifact downloader as nobody (#16375)
* client: disable running artifact downloader as nobody This PR reverts a change from Nomad 1.5 where artifact downloads were executed as the nobody user on Linux systems. This was done as an attempt to improve the security model of artifact downloading where third party tools such as git or mercurial would be run as the root user with all the security implications thereof. However, doing so conflicts with Nomad's own advice for securing the Client data directory - which when setup with the recommended directory permissions structure prevents artifact downloads from working as intended. Artifact downloads are at least still now executed as a child process of the Nomad agent, and on modern Linux systems make use of the kernel Landlock feature for limiting filesystem access of the child process. * docs: update upgrade guide for 1.5.1 sandboxing * docs: add cl * docs: add title to upgrade guide fix
Configuration menu - View commit details
-
Copy full SHA for 95359b8 - Browse repository at this point
Copy the full SHA 95359b8View commit details
Commits on Mar 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1227615 - Browse repository at this point
Copy the full SHA 1227615View commit details -
scheduling: prevent self-collision in dynamic port network offerings (#…
…16401) When the scheduler tries to find a placement for a new allocation, it iterates over a subset of nodes. For each node, we populate a `NetworkIndex` bitmap with the ports of all existing allocations and any other allocations already proposed as part of this same evaluation via its `SetAllocs` method. Then we make an "ask" of the `NetworkIndex` in `AssignPorts` for any ports we need and receive an "offer" in return. The offer will include both static ports and any dynamic port assignments. The `AssignPorts` method was written to support group networks, and it shares code that selects dynamic ports with the original `AssignTaskNetwork` code. `AssignTaskNetwork` can request multiple ports from the bitmap at a time. But `AssignPorts` requests them one at a time and does not account for possible collisions, and doesn't return an error in that case. What happens next varies: 1. If the scheduler doesn't place the allocation on that node, the port conflict is thrown away and there's no problem. 2. If the node is picked and this is the only allocation (or last allocation), the plan applier will reject the plan when it calls `SetAllocs`, as we'd expect. 3. If the node is picked and there are additional allocations in the same eval that iterate over the same node, their call to `SetAllocs` will detect the impossible state and the node will be rejected. This can have the puzzling behavior where a second task group for the job without any networking at all can hit a port collision error! It looks like this bug has existed since we implemented group networks, but there are several factors that add up to making the issue rare for many users yet frustratingly frequent for others: * You're more likely to hit this bug the more tightly packed your range for dynamic ports is. With 12000 ports in the range by default, many clusters can avoid this for a long time. * You're more likely to hit case (3) for jobs with lots of allocations or if a scheduler has to iterate over a large number of nodes, such as with system jobs, jobs with `spread` blocks, or (sometimes) jobs using `unique` constraints. For unlucky combinations of these factors, it's possible that case (3) happens repeatedly, preventing scheduling of a given job until a client state change (ex. restarting the agent so all its allocations are rescheduled elsewhere) re-opens the range of dynamic ports available. This changeset: * Fixes the bug by accounting for collisions in dynamic port selection in `AssignPorts`. * Adds test coverage for `AssignPorts`, expands coverage of this case for the deprecated `AssignTaskNetwork`, and tightens the dynamic port range in a scheduler test for spread scheduling to more easily detect this kind of problem in the future. * Adds a `String()` method to `Bitmap` so that any future "screaming" log lines have a human-readable list of used ports.
Configuration menu - View commit details
-
Copy full SHA for c36d3bd - Browse repository at this point
Copy the full SHA c36d3bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f7ad3b - Browse repository at this point
Copy the full SHA 0f7ad3bView commit details -
docs: update content-conformance package (#16412)
Bryce Kalow authoredMar 9, 2023 Configuration menu - View commit details
-
Copy full SHA for 1dd3203 - Browse repository at this point
Copy the full SHA 1dd3203View commit details -
cli: remove hard requirement on
list-jobs
(#16380)Most job subcommands allow for job ID prefix match as a convenience functionality so users don't have to type the full job ID. But this introduces a hard ACL requirement that the token used to run these commands have the `list-jobs` permission, even if the token has enough permission to execute the basic command action and the user passed an exact job ID. This change softens this requirement by not failing the prefix match in case the request results in a permission denied error and instead using the information passed by the user directly.
Configuration menu - View commit details
-
Copy full SHA for 4fdb5c4 - Browse repository at this point
Copy the full SHA 4fdb5c4View commit details -
env/aws: update ec2 cpu info data (#16417)
Update AWS EC2 CPU tables using `make ec2info`
Configuration menu - View commit details
-
Copy full SHA for 730adaa - Browse repository at this point
Copy the full SHA 730adaaView commit details
Commits on Mar 10, 2023
-
cli: add
-json
and-t
flag foralloc checks
command (#16405)* cli: add -json flag to alloc checks for completion * CLI: Expand test to include testing the json flag for allocation checks * Documentation: Add the checks command * Documentation: Add example for alloc check command * Update website/content/docs/commands/alloc/checks.mdx Co-authored-by: James Rasell <jrasell@users.noreply.github.com> * CLI: Add template flag to alloc checks command * Update website/content/docs/commands/alloc/checks.mdx Co-authored-by: James Rasell <jrasell@users.noreply.github.com> * CLI: Extend test to include -t flag for alloc checks * func: add changelog for added flags to alloc checks * cli[doc]: Make usage section on alloc checks clearer * Update website/content/docs/commands/alloc/checks.mdx Co-authored-by: James Rasell <jrasell@users.noreply.github.com> * Delete modd.conf * cli[doc]: add -t flag to command description for alloc checks --------- Co-authored-by: James Rasell <jrasell@users.noreply.github.com> Co-authored-by: Juanita De La Cuesta Morales <juanita.delacuestamorales@juanita.delacuestamorales-LHQ7X0QG9X>
Configuration menu - View commit details
-
Copy full SHA for 712c669 - Browse repository at this point
Copy the full SHA 712c669View commit details -
allocrunner: fix health check monitoring for Consul services (#16402)
Services must be interpolated to replace runtime variables before they can be compared against the values returned by Consul.
Configuration menu - View commit details
-
Copy full SHA for 419c4bf - Browse repository at this point
Copy the full SHA 419c4bfView commit details -
e2e fixes: cli output, timing issue, and some cleanups (#16418)
* e2e: job expects alloc to run until stopped * e2e: fix case changed by #16306 * e2e: couldn't find a bug but improved test+jobspecs
Configuration menu - View commit details
-
Copy full SHA for 9fefc18 - Browse repository at this point
Copy the full SHA 9fefc18View commit details
Commits on Mar 13, 2023
-
acl: prevent privilege escalation via workload identity
ACL policies can be associated with a job so that the job's Workload Identity can have expanded access to other policy objects, including other variables. Policies set on the variables the job automatically has access to were ignored, but this includes policies with `deny` capabilities. Additionally, when resolving claims for a workload identity without any attached policies, the `ResolveClaims` method returned a `nil` ACL object, which is treated similarly to a management token. While this was safe in Nomad 1.4.x, when the workload identity token was exposed to the task via the `identity` block, this allows a user with `submit-job` capabilities to escalate their privileges. We originally implemented automatic workload access to Variables as a separate code path in the Variables RPC endpoint so that we don't have to generate on-the-fly policies that blow up the ACL policy cache. This is fairly brittle but also the behavior around wildcard paths in policies different from the rest of our ACL polices, which is hard to reason about. Add an `ACLClaim` parameter to the `AllowVariableOperation` method so that we can push all this logic into the `acl` package and the behavior can be consistent. This will allow a `deny` policy to override automatic access (and probably speed up checks of non-automatic variable access).
Configuration menu - View commit details
-
Copy full SHA for d0ddd5e - Browse repository at this point
Copy the full SHA d0ddd5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 669495b - Browse repository at this point
Copy the full SHA 669495bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c91cc8 - Browse repository at this point
Copy the full SHA 6c91cc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 172f49f - Browse repository at this point
Copy the full SHA 172f49fView commit details -
Merge pull request #16445 from hashicorp/post-1.5.1-release
Post 1.5.1 release
Configuration menu - View commit details
-
Copy full SHA for 2a0e45b - Browse repository at this point
Copy the full SHA 2a0e45bView commit details -
deps: remove replace statement for go-discover (#16304)
Which we no longer need since we no longer have consul as a dependency
Configuration menu - View commit details
-
Copy full SHA for a34925f - Browse repository at this point
Copy the full SHA a34925fView commit details -
scheduler: add simple benchmark for tasksUpdated (#16422)
In preperation for some refactoring to tasksUpdated, add a benchmark to the old code so it's easy to compare with the changes, making sure nothing goes off the rails for performance.
Configuration menu - View commit details
-
Copy full SHA for 12688f2 - Browse repository at this point
Copy the full SHA 12688f2View commit details -
scheduler: refactor system util tests (#16416)
The tests for the system allocs reconciling code path (`diffSystemAllocs`) include many impossible test environments, such as passing allocs for the wrong node into the function. This makes the test assertions nonsensible for use in walking yourself through the correct behavior. I've pulled this changeset out of PR #16097 so that we can merge these improvements and revisit the right approach to fix the problem in #16097 with less urgency now that the PFNR bug fix has been merged. This changeset breaks up a couple of tests, expands test coverage, and makes test assertions more clear. It also corrects one bit of production code that behaves fine in production because of canonicalization, but forces us to remember to set values in tests to compensate.
Configuration menu - View commit details
-
Copy full SHA for b6d6cc4 - Browse repository at this point
Copy the full SHA b6d6cc4View commit details -
build(deps): bump go.uber.org/goleak from 1.2.0 to 1.2.1 (#16439)
Bumps [go.uber.org/goleak](https://github.com/uber-go/goleak) from 1.2.0 to 1.2.1. - [Release notes](https://github.com/uber-go/goleak/releases) - [Changelog](https://github.com/uber-go/goleak/blob/master/CHANGELOG.md) - [Commits](uber-go/goleak@v1.2.0...v1.2.1) --- updated-dependencies: - dependency-name: go.uber.org/goleak 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>
Configuration menu - View commit details
-
Copy full SHA for 5febe9b - Browse repository at this point
Copy the full SHA 5febe9bView commit details -
build: update from go1.20.1 to go1.20.2 (#16427)
* build: update from go1.20.1 to go1.20.2 Note that the CVE fixed in go1.20.2 does *not* impact Nomad. golang/go#58647
Configuration menu - View commit details
-
Copy full SHA for 5f37b2f - Browse repository at this point
Copy the full SHA 5f37b2fView commit details -
doc: Update
nomad fmt
doc to run against non-deprecated HCL2 jobspe……c only (#16435) Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Configuration menu - View commit details
-
Copy full SHA for f3a527b - Browse repository at this point
Copy the full SHA f3a527bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b2c8732 - Browse repository at this point
Copy the full SHA b2c8732View commit details -
acl: update job eval requirement to
submit-job
(#16463)The job evaluate endpoint creates a new evaluation for the job which is a write operation. This change modifies the necessary capability from `read-job` to `submit-job` to better reflect this.
Configuration menu - View commit details
-
Copy full SHA for f2bfbfa - Browse repository at this point
Copy the full SHA f2bfbfaView commit details -
cgv1: do not disable cpuset manager if reserved interface already exi…
…sts (#16467) * cgv1: do not disable cpuset manager if reserved interface already exists This PR fixes a bug where restarting a Nomad Client on a machine using cgroups v1 (e.g. Ubuntu 20.04) would cause the cpuset cgroups manager to disable itself. This is being caused by incorrectly interpreting a "file exists" error as problematic when ensuring the reserved cpuset exists. If we get a "file exists" error, that just means the Client was likely restarted. Note that a machine reboot would fix the issue - the groups interfaces are ephemoral. * cl: add cl
Configuration menu - View commit details
-
Copy full SHA for a42a33f - Browse repository at this point
Copy the full SHA a42a33fView commit details
Commits on Mar 14, 2023
-
agent: trim space when parsing X-Nomad-Token header (#16469)
Our auth token parsing code trims space around the `Authorization` header but not around `X-Nomad-Token`. When using the UI, it's easy to accidentally introduce a leading or trailing space, which results in spurious authentication errors. Trim the space at the HTTP server.
Configuration menu - View commit details
-
Copy full SHA for c70bbd1 - Browse repository at this point
Copy the full SHA c70bbd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 101e5d0 - Browse repository at this point
Copy the full SHA 101e5d0View commit details -
cli: Add
-json
and-t
flags tonamespace status
command (#16442)* cli: Add and flag to namespace status command * Update command/namespace_status.go Co-authored-by: James Rasell <jrasell@users.noreply.github.com> * cli: update tests for namespace status command to use must --------- Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for eaf22f2 - Browse repository at this point
Copy the full SHA eaf22f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 362f752 - Browse repository at this point
Copy the full SHA 362f752View commit details -
Merge pull request #16484 from hashicorp/tunzor-patch-1
Update for enterprise trial wording and link
Configuration menu - View commit details
-
Copy full SHA for d5e0130 - Browse repository at this point
Copy the full SHA d5e0130View commit details -
scheduler: annotate tasksUpdated with reason and purge DeepEquals (#1…
…6421) * scheduler: annotate tasksUpdated with reason and purge DeepEquals * cr: move opaque into helper * cr: swap affinity/spread hashing for slice equal * contributing: update checklist-jobspec with notes about struct methods * cr: add more cases to wait config equal method * cr: use reflect when comparing envoy config blocks * cl: add cl
Configuration menu - View commit details
-
Copy full SHA for 1a01e87 - Browse repository at this point
Copy the full SHA 1a01e87View commit details
Commits on Mar 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bdf468c - Browse repository at this point
Copy the full SHA bdf468cView commit details -
test: set BuildDate in default TestAgent config (#16499)
so enterprise tests don't fail due to the default zero time
Configuration menu - View commit details
-
Copy full SHA for e4963b9 - Browse repository at this point
Copy the full SHA e4963b9View commit details
Commits on Mar 16, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 323abf7 - Browse repository at this point
Copy the full SHA 323abf7View commit details -
artifact: use specific version link for zipbomb artifact (#16513)
Fix the e2e case where we download the go-getter bomb.zip test file, which is being removed on main. We can still get it from the version tag - yay git!
Configuration menu - View commit details
-
Copy full SHA for 098650e - Browse repository at this point
Copy the full SHA 098650eView commit details -
artifact: do not set process attributes on darwin (#16511)
This PR fixes the non-root macOS use case where artifact downloads stopped working. It seems setting a Credential on a SysProcAttr used by the exec package will always cause fork/exec to fail - even if the credential contains our own UID/GID or nil UID/GID. Technically we do not need to set this as the child process will inherit the parent UID/GID anyway... and not setting it makes things work again ... /shrug
Configuration menu - View commit details
-
Copy full SHA for ea727df - Browse repository at this point
Copy the full SHA ea727dfView commit details -
docs: dispatch_payload and jobs api docs had some weirdness (#16514)
* docs: dispatch_payload docs had some weirdness Docs said "Examples" when there was only 1 example. Not sure what the floating "to" in the description was for. * docs: missing a heading level on jobs api docs
Configuration menu - View commit details
-
Copy full SHA for 46ae102 - Browse repository at this point
Copy the full SHA 46ae102View commit details -
artifact: git needs more files for private repositories (#16508)
* landlock: git needs more files for private repositories This PR fixes artifact downloading so that git may work when cloning from private repositories. It needs - file read on /etc/passwd - dir read on /root/.ssh - file write on /root/.ssh/known_hosts Add these rules to the landlock rules for the artifact sandbox. * cr: use nonexistent instead of devnull Co-authored-by: Michael Schurter <mschurter@hashicorp.com> * cr: use go-homdir for looking up home directory * pr: pull go-homedir into explicit require * cr: fixup homedir tests in homeless root cases * cl: fix root test for real --------- Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
Configuration menu - View commit details
-
Copy full SHA for 995ab41 - Browse repository at this point
Copy the full SHA 995ab41View commit details -
client: don't use
Status
RPC for Consul discovery (#16490)In #16217 we switched clients using Consul discovery to the `Status.Members` endpoint for getting the list of servers so that we're using the correct address. This endpoint has an authorization gate, so this fails if the anonymous policy doesn't have `node:read`. We also can't check the `AuthToken` for the request for the client secret, because the client hasn't yet registered so the server doesn't have anything to compare against. Instead of hitting the `Status.Peers` or `Status.Members` RPC endpoint, use the Consul response directly. Update the `registerNode` method to handle the list of servers we get back in the response; if we get a "no servers" or "no path to region" response we'll kick off discovery again and retry immediately rather than waiting 15s.
Configuration menu - View commit details
-
Copy full SHA for 8684183 - Browse repository at this point
Copy the full SHA 8684183View commit details -
Enable ACLs on E2E test clients (#16530)
* e2e: uniformly enable acls across all agents * docs: clarify that acls should be set everywhere
Configuration menu - View commit details
-
Copy full SHA for 282e3bc - Browse repository at this point
Copy the full SHA 282e3bcView commit details
Commits on Mar 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 57a3cbe - Browse repository at this point
Copy the full SHA 57a3cbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 76649df - Browse repository at this point
Copy the full SHA 76649dfView commit details -
nsd: always set deregister flag after deregistration of group (#16289)
* services: always set deregister flag after deregistration of group This PR fixes a bug where the group service hook's deregister flag was not set in some cases, causing the hook to attempt deregistrations twice during job updates (alloc replacement). In the tests ... we used to assert on the wrong behvior (remove twice) which has now been corrected to assert we remove only once. This bug was "silent" in the Consul provider world because the error logs for double deregistration only show up in Consul logs; with the Nomad provider the error logs are in the Nomad agent logs. * services: cleanup group service hook tests
Configuration menu - View commit details
-
Copy full SHA for ed498f8 - Browse repository at this point
Copy the full SHA ed498f8View commit details -
cli: nomad login command should not require a -type flag and should r…
…espect default auth method (#16504) nomad login command does not need to know ACL Auth Method's type, since all method names are unique. Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for b95b105 - Browse repository at this point
Copy the full SHA b95b105View commit details -
tls enforcement flaky tests (#16543)
* tests: add WaitForLeaders helpers using must/wait timings * tests: start servers for mtls tests together Fixes #16253 (hopefully)
Configuration menu - View commit details
-
Copy full SHA for 1cfa95e - Browse repository at this point
Copy the full SHA 1cfa95eView commit details
Commits on Mar 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cd8615d - Browse repository at this point
Copy the full SHA cd8615dView commit details -
cli: Add
json
and-t
flags toserver members
command (#16444)* cli: Add and flags to server members * Update website/content/docs/commands/server/members.mdx Co-authored-by: James Rasell <jrasell@users.noreply.github.com> * Update website/content/docs/commands/server/members.mdx Co-authored-by: James Rasell <jrasell@users.noreply.github.com> * cli: update the server memebers tests to use must * cli: add flags addition to changelog --------- Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 151147b - Browse repository at this point
Copy the full SHA 151147bView commit details -
cli: add
-json
and-t
flags toquota status
command (#16485)* cli: add json and t flags to quota status command * cli: add entry to changelog * Update command/quota_status.go Co-authored-by: James Rasell <jrasell@users.noreply.github.com> --------- Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 26b4fcc - Browse repository at this point
Copy the full SHA 26b4fccView commit details -
Add
-json
flag toquota inspect
command (#16478)* Added and flag to command * cli[style]: small refactor to avoid confussion with tmpl variable * Update inspect.mdx * cli: add changelog entry * Update .changelog/16478.txt Co-authored-by: James Rasell <jrasell@users.noreply.github.com> * Update command/quota_inspect.go Co-authored-by: James Rasell <jrasell@users.noreply.github.com> --------- Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for cc110f4 - Browse repository at this point
Copy the full SHA cc110f4View commit details -
[ui] Perform common job tasks with keyboard shortcuts (#16378)
* Throw your mouse into traffic * Add node metadata with a shortcut * Re-labelled * Adds a toast notification to job start/stop on keyboard shortcut * Typo fix
Configuration menu - View commit details
-
Copy full SHA for 0071844 - Browse repository at this point
Copy the full SHA 0071844View commit details -
Configuration menu - View commit details
-
Copy full SHA for 96740b5 - Browse repository at this point
Copy the full SHA 96740b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for aacc7c6 - Browse repository at this point
Copy the full SHA aacc7c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 695df42 - Browse repository at this point
Copy the full SHA 695df42View commit details -
client/metadata: fix crasher caused by AllowStale = false (#16549)
Fixes #16517 Given a 3 Server cluster with at least 1 Client connected to Follower 1: If a NodeMeta.{Apply,Read} for the Client request is received by Follower 1 with `AllowStale = false` the Follower will forward the request to the Leader. The Leader, not being connected to the target Client, will forward the RPC to Follower 1. Follower 1, seeing AllowStale=false, will forward the request to the Leader. The Leader, not being connected to... well hoppefully you get the picture: an infinite loop occurs.
Configuration menu - View commit details
-
Copy full SHA for fb08518 - Browse repository at this point
Copy the full SHA fb08518View commit details
Commits on Mar 21, 2023
-
changelog: update #16427 to improvement (#16565)
The security fix in Go 1.20.2 does not apply to Nomad.
Configuration menu - View commit details
-
Copy full SHA for a633b79 - Browse repository at this point
Copy the full SHA a633b79View commit details -
contrib: architecture guide to the drainer (#16569)
The drainer component is fairly complex. As part of upcoming work to fix some of the drainer's rough edges, document the drainer's architecture from a Nomad developer perspective.
Configuration menu - View commit details
-
Copy full SHA for a90df9d - Browse repository at this point
Copy the full SHA a90df9dView commit details -
Update csi_plugin.mdx (#16584)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 5309325 - Browse repository at this point
Copy the full SHA 5309325View commit details -
Windows fixes for e2e tests (#16592)
* e2e: skip task api test when windows too old * e2e: don't run proxy on windows
Configuration menu - View commit details
-
Copy full SHA for a73a399 - Browse repository at this point
Copy the full SHA a73a399View commit details -
E2E: fix events tests (#16595)
In #12916 we updated the events test as part of a larger set of changes around mapstructure serialization fixes. But the changes to the jobs we're deploying in the tests had invalid task configs so they never result in good deployments and the test will always fail. Make the before/after jobs identical (except for the version bump) and make them valid. Also wait for allocations for the 2nd job run to appear before checking the deployment list, so that we don't race with the scheduler.
Configuration menu - View commit details
-
Copy full SHA for aece7b0 - Browse repository at this point
Copy the full SHA aece7b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 337a8d2 - Browse repository at this point
Copy the full SHA 337a8d2View commit details -
taskapi: use HasSuffix to detect errors from rpcs (#16594)
Matches the "normal" HTTP error detection logic in the same file.
Configuration menu - View commit details
-
Copy full SHA for 4d31fd3 - Browse repository at this point
Copy the full SHA 4d31fd3View commit details
Commits on Mar 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 39ec124 - Browse repository at this point
Copy the full SHA 39ec124View commit details -
Fix broken test for quotas CLI (#16610)
* fix: fix broken test * fix: fix broken test for quota status
Configuration menu - View commit details
-
Copy full SHA for cb9ce8b - Browse repository at this point
Copy the full SHA cb9ce8bView commit details -
[ui] Copyable server and client attribute values (#16548)
* Copyable server and client attribute values * Changelog
Configuration menu - View commit details
-
Copy full SHA for 2a22d71 - Browse repository at this point
Copy the full SHA 2a22d71View commit details -
* Generate files for 1.5.2 release * Prepare for next release * add 1.4.7 and 1.3.12 to the changelog --------- Co-authored-by: hc-github-team-nomad-core <github-team-nomad-core@hashicorp.com>
Configuration menu - View commit details
-
Copy full SHA for 1a53d9c - Browse repository at this point
Copy the full SHA 1a53d9cView commit details
Commits on Mar 23, 2023
-
drainer: test refactoring to clarify behavior around delete/down nodes (
#16612) This changeset refactors the tests of the draining node watcher so that we don't mock the node watcher's `Remove` and `Update` methods for its own tests. Instead we'll mock the node watcher's dependencies (the job watcher and deadline notifier) and now unit tests can cover the real code. This allows us to remove a bunch of TODOs in `watch_nodes.go` around testing and clarify some important behaviors: * Nodes that are down or disconnected will still be watched until the scheduler decides what to do with their allocations. This will drive the job watcher but not the node watcher, and that lets the node watcher gracefully handle cases where a heartbeat fails but the node heartbeats again before its allocs can be evicted. * Stop watching nodes that have been deleted. The blocking query for nodes set the maximum index to the highest index of a node it found, rather than the index of the nodes table. This misses updates to the index from deleting nodes. This was done as an performance optimization to avoid excessive unblocking, but because the query is over all nodes anyways there's no optimization to be had here. Remove the optimization so we can detect deleted nodes without having to wait for an update to an unrelated node.
Configuration menu - View commit details
-
Copy full SHA for 23b3647 - Browse repository at this point
Copy the full SHA 23b3647View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1061ddd - Browse repository at this point
Copy the full SHA 1061dddView commit details -
cli: job restart command (#16278)
Implement the new `nomad job restart` command that allows operators to restart allocations tasks or reschedule then entire allocation. Restarts can be batched to target multiple allocations in parallel. Between each batch the command can stop and hold for a predefined time or until the user confirms that the process should proceed. This implements the "Stateless Restarts" alternative from the original RFC (https://gist.github.com/schmichael/e0b8b2ec1eb146301175fd87ddd46180). The original concept is still worth implementing, as it allows this functionality to be exposed over an API that can be consumed by the Nomad UI and other clients. But the implementation turned out to be more complex than we initially expected so we thought it would be better to release a stateless CLI-based implementation first to gather feedback and validate the restart behaviour. Co-authored-by: Shishir Mahajan <smahajan@roblox.com>
Configuration menu - View commit details
-
Copy full SHA for fffdbdf - Browse repository at this point
Copy the full SHA fffdbdfView commit details
Commits on Mar 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b84c455 - Browse repository at this point
Copy the full SHA b84c455View commit details -
scheduler: fix reconciliation of reconnecting allocs (#16609)
When a disconnect client reconnects the `allocReconciler` must find the allocations that were created to replace the original disconnected allocations. This process was being done in only a subset of non-terminal untainted allocations, meaning that, if the replacement allocations were not in this state the reconciler didn't stop them, leaving the job in an inconsistent state. This inconsistency is only solved in a future job evaluation, but at that point the allocation is considered reconnected and so the specific reconnection logic was not applied, leading to unexpected outcomes. This commit fixes the problem by running reconnecting allocation reconciliation logic earlier into the process, leaving the rest of the reconciler oblivious of reconnecting allocations. It also uses the full set of allocations to search for replacements, stopping them even if they are not in the `untainted` set. The system `SystemScheduler` is not affected by this bug because disconnected clients don't trigger replacements: every eligible client is already running an allocation.
Configuration menu - View commit details
-
Copy full SHA for 72ad885 - Browse repository at this point
Copy the full SHA 72ad885View commit details
Commits on Mar 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6626965 - Browse repository at this point
Copy the full SHA 6626965View commit details -
Multiple instances of a periodic job are run simultaneously, when pro…
…hibit_overlap is true Fixes #11052 When restoring periodic dispatcher, all periodic jobs are forced without checking for previous childre.
Configuration menu - View commit details
-
Copy full SHA for 51249fc - Browse repository at this point
Copy the full SHA 51249fcView commit details -
Multiple instances of a periodic job are run simultaneously, when pro…
…hibit_overlap is true Fixes #11052 When restoring periodic dispatcher, all periodic jobs are forced without checking for previous children.
Configuration menu - View commit details
-
Copy full SHA for e9850f3 - Browse repository at this point
Copy the full SHA e9850f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c858a9 - Browse repository at this point
Copy the full SHA 3c858a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c59344 - Browse repository at this point
Copy the full SHA 4c59344View commit details -
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 8ac3e0e - Browse repository at this point
Copy the full SHA 8ac3e0eView commit details -
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 90db021 - Browse repository at this point
Copy the full SHA 90db021View commit details -
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 23807bd - Browse repository at this point
Copy the full SHA 23807bdView commit details -
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for eb6cd35 - Browse repository at this point
Copy the full SHA eb6cd35View commit details -
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for f4c24bc - Browse repository at this point
Copy the full SHA f4c24bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for a2ce7f0 - Browse repository at this point
Copy the full SHA a2ce7f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cbe024 - Browse repository at this point
Copy the full SHA 6cbe024View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c363fd - Browse repository at this point
Copy the full SHA 2c363fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for a7260c0 - Browse repository at this point
Copy the full SHA a7260c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2385f05 - Browse repository at this point
Copy the full SHA 2385f05View commit details -
Configuration menu - View commit details
-
Copy full SHA for 124700a - Browse repository at this point
Copy the full SHA 124700aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 096cb3b - Browse repository at this point
Copy the full SHA 096cb3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fd336a - Browse repository at this point
Copy the full SHA 4fd336aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b431198 - Browse repository at this point
Copy the full SHA b431198View commit details