This project is mirrored from https://gitee.com/mirrors/nomad.git.
Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
- 09 Sep, 2022 1 commit
-
-
Michael Schurter authored
Before this change, Client had 2 copies of the config object: config and configCopy. There was no guidance around which to use where (other than configCopy's comment to pass it to alloc runners), both are shared among goroutines and mutated in data racy ways. At least at one point I think the idea was to have `config` be mutable and then grab a lock to overwrite `configCopy`'s pointer atomically. This would have allowed alloc runners to read their config copies in data race safe ways, but this isn't how the current implementation worked. This change takes the following approach to safely handling configs in the client: 1. `Client.config` is the only copy of the config and all access must go through the `Client.configLock` mutex 2. Since the mutex *only protects the config pointer itself and not fields inside the Config struct:* all config mutation must be done on a *copy* of the config, and then Client's config pointer is overwritten while the mutex is acquired. Alloc runners and other goroutines with the old config pointer will not see config updates. 3. Deep copying is implemented on the Config struct to satisfy the previous approach. The TLS Keyloader is an exception because it has its own internal locking to support mutating in place. An unfortunate complication but one I couldn't find a way to untangle in a timely fashion. 4. To facilitate deep copying I made an *internally backward incompatible API change:* our `helper/funcs` used to turn containers (slices and maps) with 0 elements into nils. This probably saves a few memory allocations but makes it very easy to cause panics. Since my new config handling approach uses more copying, it became very difficult to ensure all code that used containers on configs could handle nils properly. Since this code has caused panics in the past, I fixed it: nil containers are copied as nil, but 0-element containers properly return a new 0-element container. No more "downgrading to nil!"
-
- 15 Mar, 2022 1 commit
-
-
James Rasell authored
This commit performs refactoring to pull out common service registration objects into a new `client/serviceregistration` package. This new package will form the base point for all client specific service registration functionality. The Consul specific implementation is not moved as it also includes non-service registration implementations; this reduces the blast radius of the changes as well.
-
- 31 Mar, 2021 1 commit
-
-
Tim Gross authored
This commit includes a new test client that allows overriding the RPC protocols. Only the RPCs that are passed in are registered, which lets you implement a mock RPC in the server tests. This commit includes an example of this for the ClientCSI RPC server.
-
- 13 Oct, 2020 1 commit
-
-
Seth Hoenig authored
As newer versions of Consul are released, the minimum version of Envoy it supports as a sidecar proxy also gets bumped. Starting with the upcoming Consul v1.9.X series, Envoy v1.11.X will no longer be supported. Current versions of Nomad hardcode a version of Envoy v1.11.2 to be used as the default implementation of Connect sidecar proxy. This PR introduces a change such that each Nomad Client will query its local Consul for a list of Envoy proxies that it supports (https://github.com/hashicorp/consul/pull/8545) and then launch the Connect sidecar proxy task using the latest supported version of Envoy. If the `SupportedProxies` API component is not available from Consul, Nomad will fallback to the old version of Envoy supported by old versions of Consul. Setting the meta configuration option `meta.connect.sidecar_image` or setting the `connect.sidecar_task` stanza will take precedence as is the current behavior for sidecar proxies. Setting the...
-
- 23 Jan, 2019 1 commit
-
-
Michael Schurter authored
-
- 22 Jan, 2019 3 commits
-
-
Michael Schurter authored
I wanted a different color bikeshed, so I get to paint it
-
Alex Dadgar authored
-
Alex Dadgar authored
-
- 12 Jan, 2019 2 commits
-
-
Preetha Appan authored
-
Preetha Appan authored
Added a unit test with custom statedb implementation that errors, to use to verify destroy errors
-
- 20 Dec, 2018 1 commit
-
-
Michael Schurter authored
-
- 16 Dec, 2018 1 commit
-
-
Mahmood Ali authored
I intended to remove this line in 29ef7ecf - see my notes there for details.
-
- 15 Dec, 2018 1 commit
-
-
Mahmood Ali authored
The assertion here is causing many spurious failures that aren't actually relevant to the test itself. We are tracking the cause for this failure independently, and it would make more sense to have a dedicated test for clean shutdown.
-
- 11 Dec, 2018 2 commits
-
-
Mahmood Ali authored
-
Mahmood Ali authored
Noticed few places where tests seem to block indefinitely and panic after the test run reaches the test package timeout. I intend to follow up with the proper fix later, but timing out is much better than indefinitely blocking.
-
- 17 Oct, 2018 1 commit
-
-
Michael Schurter authored
-
- 16 Oct, 2018 5 commits
-
-
Nick Ethier authored
-
Alex Dadgar authored
-
Michael Schurter authored
-
Michael Schurter authored
Sadly can't move the fingerprint timeout tweak into the helper due to circular imports.
-
Alex Dadgar authored
-
- 13 Sep, 2018 1 commit
-
-
Alex Dadgar authored
-
- 12 Jun, 2018 1 commit
-
-
Alex Dadgar authored
-
- 21 Mar, 2018 1 commit
-
-
Alex Dadgar authored
-
- 15 Feb, 2018 2 commits
-
-
Alex Dadgar authored
-
Alex Dadgar authored
-