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.
- 11 Apr, 2022 1 commit
-
-
James Rasell authored
Some tests may chose to deregister jobs to check Nomad cleanup logic, however, it is still possible for the test to fail and exit before this is hit. This therefore adds a cancellable cleanup func which can be deferred, using context to control whether it gets run or not.
-
- 08 Apr, 2022 11 commits
-
-
Tim Gross authored
-
Luiz Aoqui authored
-
Luiz Aoqui authored
-
Seth Hoenig authored
docs: fixup title formatting in upgrade guide
-
Seth Hoenig authored
-
Luiz Aoqui authored
-
Luiz Aoqui authored
-
James Rasell authored
-
Luiz Aoqui authored
-
Seth Hoenig authored
Add custom variable validation to docs
-
Seth Hoenig authored
-
- 07 Apr, 2022 15 commits
-
-
Thomas Wunderlich authored
Custom variable validation is a useful feature that is supported by Nomad and not just Terraform. As such it should be documented on the input variable page. I've cribbed the content from the terraform docs so this should be consistent across projects
-
Luiz Aoqui authored
-
Luiz Aoqui authored
-
Jasmine Dahilig authored
docs: add token_last_renewal and token_next_renewal to server metrics and key metrics #12435 (#12505)
-
hc-github-team-nomad-core authored
-
Luiz Aoqui authored
-
Luiz Aoqui authored
-
Phil Renaud authored
* Capitalize methods * Let ESLint yell at us again * Dasherize
-
Tim Gross authored
We introduced a `pprof-interval` argument to `operator debug` in #11938, and unfortunately this has resulted in a lot of test flakes. The actual command in use is mostly fine (although I've fixed some quirks here), so what's really happened is that the change has revealed some existing issues in the tests. Summary of changes: * Make first pprof collection synchronous to preserve the existing behavior for the common case where the pprof interval matches the duration. * Clamp `operator debug` pprof timing to that of the command. The `pprof-duration` should be no more than `duration` and the `pprof-interval` should be no more than `pprof-duration`. Clamp the values rather than throwing errors, which could change the commands that existing users might already have in debugging scripts * Testing: remove test parallelism The `operator debug` tests that stand up servers can't be run in parallel, because we don't have a way of canceling the API calls for pprof. The agent will still be running the last pprof when we exit, and that breaks the next test that talks to that same agent. (Because you can only run one pprof at a time on any process!) We could split off each subtest into its own server, but this test suite is already very slow. In future work we should fix this "for real" by making the API call cancelable. * Testing: assert against unexpected errors in `operator debug` tests. If we assert there are no unexpected error outputs, it's easier for the developer to debug when something is going wrong with the tests because the error output will be presented as a failing test, rather than just a failing exit code check. Or worse, no failing exit code check! This also forces us to be explicit about which tests will return 0 exit codes but still emit (presumably ignorable) error outputs. Additional minor bug fixes (mostly in tests) and test refactorings: * Fix text alignment on pprof Duration in `operator debug` output * Remove "done" channel from `operator debug` event stream test. The goroutine we're blocking for here already tells us it's done by sending a value, so block on that instead of an extraneous channel * Event stream test timer should start at current time, not zero * Remove noise from `operator debug` test log output. The `t.Logf` calls already are picked out from the rest of the test output by being prefixed with the filename. * Remove explicit pprof args so we use the defaults clamped from duration/interval
-
Seth Hoenig authored
client: set environment variable indicating set of reserved cpu cores
-
James Rasell authored
-
Seth Hoenig authored
-
Lars Lehtonen authored
-
Seth Hoenig authored
This PR injects the 'NOMAD_CPU_CORES' environment variable into tasks that have been allocated reserved cpu cores. The value uses normal cpuset notation, as found in cpuset.cpu cgroup interface files. Note this value is not necessiarly the same as the content of the actual cpuset.cpus interface file, which will also include shared cpu cores when using cgroups v2. This variable is a workaround for users who used to be able to read the reserved cgroup cpuset file, but lose the information about distinct reserved cores when using cgroups v2. Side discussion in: https://github.com/hashicorp/nomad/issues/12374
-
Derek Strickland authored
-
- 06 Apr, 2022 13 commits
-
-
Tim Gross authored
We expect every Nomad API client to use a single connection to any given agent, so take advantage of keep-alive by switching the default transport to `DefaultPooledClient`. Provide a facility to close idle connections for testing purposes. Restores the previously reverted #12409 Co-authored-by:
Ben Buzbee <bbuzbee@cloudflare.com>
-
Luiz Aoqui authored
-
Luiz Aoqui authored
-
Seth Hoenig authored
exec: fix exec handler test
-
Luiz Aoqui authored
-
James Rasell authored
When a service is updated, the service hooks update a number of internal fields which helps generate the new workload. This also needs to update the namespace for the service provider. It is possible for these to be different, and in the case of Nomad and Consul running OSS, this is to be expected.
-
James Rasell authored
This change modifies the template task runner to utilise the new consul-template which includes Nomad service lookup template funcs. In order to provide security and auth to consul-template, we use a custom HTTP dialer which is passed to consul-template when setting up the runner. This method follows Vault implementation. Co-authored-by:
Michael Schurter <mschurter@hashicorp.com>
-
Seth Hoenig authored
Fixup this test to handle cgroups v2, as well as the :misc: cgroup
-
Jasmine Dahilig authored
-
Jasmine Dahilig authored
-
Luiz Aoqui authored
-
James Rasell authored
-