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.
- 24 Aug, 2022 7 commits
-
-
Jai Bhagat authored
-
Jai Bhagat authored
-
Piotr Kazmierczak authored
This PR adds the functionality of allowing custom scripts to be executed on template change. Resolves #2707
-
Luiz Aoqui authored
-
Luiz Aoqui authored
In #13491 the version of `go-discover` was updated in `go.mod` but the comment above it mentions that it also needs to be updated in the `replace` directive.
-
Piotr Kazmierczak authored
This PR documents a change made in the enterprise version of nomad that addresses the following issue: When a user tries to filter audit logs, they do so with a stanza that looks like the following: audit { enabled = true filter "remove deletes" { type = "HTTPEvent" endpoints = ["*"] stages = ["OperationComplete"] operations = ["DELETE"] } } When specifying both an "endpoint" and a "stage", the events with both matching a "endpoint" AND a matching "stage" will be filtered. When specifying both an "endpoint" and an "operation" the events with both matching a "endpoint" AND a matching "operation" will be filtered. When specifying both a "stage" and an "operation" the events with a matching a "stage" OR a matching "operation" will be filtered. The "OR" logic with stages and operations is unexpected and doesn't allow customers to get specific on which events they want to filter. For instance the following use-case is impossible to achieve: "I want to filter out all OperationReceived events that have the DELETE verb".
-
Seth Hoenig authored
This PR activates the osuergo build tag in GNUMakefile. This forces the os/user package to be compiled without CGO. Doing so seems to resolve a race condition in getpwnam_r that causes alloc creation to hang or panic on `user.Lookup("nobody")`.
-
- 23 Aug, 2022 8 commits
-
-
Luiz Aoqui authored
-
Michael Schurter authored
This moves LicenseConfig and its Copy method to a shared file so that it can be shared with enterprise code.
-
Luiz Aoqui authored
The current implementation uses the task's finishedAt field to determine if a task is active of not, but this check is not accurate. A task in the "pending" state will not have finishedAt value but it's also not active. This discrepancy results in some components, like the inline stats chart of the task row component, to be displayed even whey they shouldn't.
-
Luiz Aoqui authored
-
Tim Gross authored
-
Seth Hoenig authored
docs: update check documentation with NSD specifics
-
Seth Hoenig authored
Co-authored-by:
Piotr Kazmierczak <phk@mm.st>
-
Seth Hoenig authored
build: go.mod should require go1.19
-
- 22 Aug, 2022 14 commits
-
-
Luiz Aoqui authored
The current implementation for the task coordinator unblocks tasks by performing destructive operations over its internal state (like closing channels and deleting maps from keys). This presents a problem in situations where we would like to revert the state of a task, such as when restarting an allocation with tasks that have already exited. With this new implementation the task coordinator behaves more like a finite state machine where task may be blocked/unblocked multiple times by performing a state transition. This initial part of the work only refactors the task coordinator and is functionally equivalent to the previous implementation. Future work will build upon this to provide bug fixes and enhancements.
-
Phil Renaud authored
-
Tim Gross authored
The original design for workload identities and ACLs allows for operators to extend the automatic capabilities of a workload by using a specially-named policy. This has shown to be potentially unsafe because of naming collisions, so instead we'll allow operators to explicitly attach a policy to a workload identity. This changeset adds workload identity fields to ACL policy objects and threads that all the way down to the command line. It also a new secondary index to the ACL policy table on namespace and job so that claim resolution can efficiently query for related policies.
-
Charlie Voiselle authored
-
Charlie Voiselle authored
-
Seth Hoenig authored
e2e: add e2e tests for nomad service disco checks
-
Seth Hoenig authored
This PR adds 2 e2e tests for ensuring nomad service discovery checks get created and produce status results as expected.
-
Luiz Aoqui authored
When a Nomad agent starts and loads jobs that already existed in the cluster, the default template uid and gid was being set to 0, since this is the zero value for int. This caused these jobs to fail in environments where it was not possible to use 0, such as in Windows clients. In order to differentiate between an explicit 0 and a template where these properties were not set we need to use a pointer.
-
Michael Schurter authored
In #14139 this code was changed to use the original copy of the config, but Config.AllocDir is updated in the `Client.init()` method for dev agents. This uses the latest version of the alloc dir (which cannot change further at runtime without a client restart which would reinitialize the stats collector as well).
-
Seth Hoenig authored
This PR updates the checks documentation to mention support for checks when using the Nomad service provider. There are limitations of NSD compared to Consul, and those configuration options are now noted as being Consul-only.
-
Phil Renaud authored
Adds service fragments to allocations and union taskGroup and task services
-
Seth Hoenig authored
cli: display nomad service check status output in CLI commands
-
James Rasell authored
gitter is not an officially supported forum, so we should not link to it from the readme.
-
Seth Hoenig authored
Since we started using atomic.Pointer, we should specify the go1.19 requirement in our go.mod files.
-
- 19 Aug, 2022 3 commits
-
-
Michael Schurter authored
Since the state store returns a pointer to the shared job structs in memdb we must always copy it before mutating it and applying the new version via raft. Otherwise if the rpc fails before the mutated job is committed to raft (either due to validation, bug, crash, or other exit condition), the leader server will have an updated copy of the job that other servers will not have.
-
Seth Hoenig authored
This PR adds some NSD check status output to the CLI. 1. The 'nomad alloc status' command produces nsd check summary output (if present) 2. The 'nomad alloc checks' sub-command is added to produce complete nsd check output (if present)
-
dependabot[bot] authored
Bumps [github.com/shoenig/test](https://github.com/shoenig/test) from 0.3.0 to 0.3.1. - [Release notes](https://github.com/shoenig/test/releases) - [Commits](https://github.com/shoenig/test/compare/v0.3.0...v0.3.1 ) --- updated-dependencies: - dependency-name: github.com/shoenig/test dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by:
dependabot[bot] <support@github.com> Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- 18 Aug, 2022 8 commits
-
-
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!"
-
Derek Strickland authored
* sentinel: add ability to reference Nomad ACL Token and Namespace in Sentinel policies
-
Michael Schurter authored
-
Seth Hoenig authored
build: print installed go version in cricle on windows
-
Seth Hoenig authored
This PR fixes the circle workflow step on windows where we print the go version. Like the other commands that use Go, we must inject the install path into PATH first.
-
Seth Hoenig authored
cleanup: fixing warnings and refactoring of command package, part 2
-
Seth Hoenig authored
This PR continues the cleanup of the command package, removing linter warnings, refactoring to use helpers, making tests easier to read, etc.
-
Seth Hoenig authored
cleanup: first pass at fixing command package warnings
-