Commit Graph

16736 Commits

Author SHA1 Message Date
James Rasell
0ea8fdfa81 cli: add system command and subcmds to interact with system API.
The system command includes gc and reconcile-summaries subcommands
which covers all currently available system API calls. The help
information is largely pulled from the current Nomad website API
documentation.
2020-01-13 11:34:46 +01:00
Tim Gross
56937bf87f commit a hclfmt to eliminate diffs after 'make dev' 2020-01-09 08:18:51 -05:00
Tim Gross
587ac82aa1 changelog for GH-6916 2020-01-09 08:16:41 -05:00
Tim Gross
f31482ae8a interpolate environment for services in script checks (#6916)
In 0.10.2 (specifically 387b016) we added interpolation to group
service blocks and centralized the logic for task environment
interpolation. This wasn't also added to script checks, which caused a
regression where the IDs for script checks for services w/
interpolated fields (ex. the service name) didn't match the service ID
that was registered with Consul.

This changeset calls the same taskenv interpolation logic during
`script_check` configuration, and adds tests to reduce the risk of
future regressions by comparing the IDs of service hook and the check hook.
2020-01-09 08:12:54 -05:00
Charlie Voiselle
fa3a000191 Merge pull request #6915 from hashicorp/d-consul-warning
[docs] Change consul agent note to callout
2020-01-08 13:40:27 -05:00
Charlie Voiselle
bdaf9cda91 Change consul agent note to callout
Because this is such a common misconfig, it is probably worth
highlighting
2020-01-08 13:08:54 -05:00
Charlie Voiselle
c16c69a858 Typo fix
Synopsis needs to start with uppercase to match other commands
2020-01-08 10:44:00 -05:00
Tim Gross
6f3f857568 changelog for GH-6912 2020-01-08 08:25:37 -05:00
James Rasell
8e6a7bce69 cli: include namespace in output when querying job stauts. (#6912) 2020-01-08 08:24:03 -05:00
Drew Bailey
41686cee4e Merge pull request #6902 from hashicorp/b-update-tainted-evict-to-lost
Update Evicted allocations to lost when lost
2020-01-07 14:02:55 -05:00
Tim Gross
93cab3f04e changelog for GH-6907 2020-01-07 13:45:41 -05:00
James Rasell
bbf0bdbb2a Fix error parsing config when setting consul.timeout. (#6907)
When parsing a config file which had the consul.timeout param set,
Nomad was reporting an error causing startup to fail. This seems
to be caused by the HCL decoder interpreting the timeout type as
an int rather than a string. This is caused by the struct
TimeoutHCL param having a hcl key of timeout alongside a Timeout
struct param of type time.Duration (int). Ensuring the decoder
ignores the Timeout struct param ensure the decoder runs
correctly.
2020-01-07 13:40:55 -05:00
Drew Bailey
8d73cda788 update changelog 2020-01-07 13:37:38 -05:00
Drew Bailey
81a24098f0 Update Evicted allocations to lost when lost
If an alloc is being preempted and marked as evict, but the underlying
node is lost before the migration takes place, the allocation currently
stays as desired evict, status running forever, or until the node comes
back online.

This commit updates updateNonTerminalAllocsToLost to check for a
destired status of Evict as well as Stop when updating allocations on
tainted nodes.

switch to table test for lost node cases
2020-01-07 13:34:18 -05:00
Mahmood Ali
8e4a5f161d Merge pull request #6899 from hashicorp/docs-podman
docs: add podman as an external task driver plugin
2020-01-06 10:29:33 -05:00
Michael Schurter
34568d8e91 docs: add podman as an external task driver plugin
Tested using https://github.com/schmichael/nomad-podman-vagrant
2020-01-03 12:58:17 -08:00
Michael Schurter
4f95897c8d docs: fix lxc anchor link 2020-01-03 12:57:48 -08:00
Michael Schurter
3d48383ef0 docs: fix capitalization 2020-01-03 12:57:27 -08:00
Michael Schurter
fc1a1f5901 Merge pull request #6898 from hashicorp/hicks/fix-typo
Fix typo, Ethier -> Either
2020-01-02 14:52:18 -08:00
Kris Hicks
e9a9ef7d56 Fix typo, Ethier -> Either 2020-01-02 14:42:27 -08:00
Michael Schurter
edc62acd91 Merge pull request #6888 from hashicorp/r-remove-dead-disk-code
nomad/state: remove dead upgrade path code
2019-12-20 14:36:28 -08:00
Michael Schurter
177a21b1d2 nomad/state: remove dead upgrade path code
It is uncalled so there hsould be no runtime changes.
2019-12-20 11:10:22 -08:00
Charlie Voiselle
380d67564f Merge pull request #6885 from hashicorp/docs/cv/web-ui-urlfix
docs: Fix bad link to UI Guide track
2019-12-20 11:14:30 -05:00
Tim Gross
6aab515ab0 e2e: give metrics longer to settle (#6884)
Increase the shortened timeout after the first loop so that metrics
that take longer to come in aren't failing the test unnecessarily.

Move the check for empty alloc metrics into the loop so that if the
first values we get are empty we don't fail the test too early.
2019-12-20 10:39:35 -05:00
Charlie Voiselle
9496105486 Fix bad link
Corrected link to Nomad UI track from comments in #6876
2019-12-20 09:33:57 -05:00
Tim Gross
ac7990f2a7 client: fix trace log message in alloc hook update (#6881) 2019-12-19 16:44:04 -05:00
Charlie Voiselle
ff501b4aaa [docs] Migrating Web-UI and Governance Guides to learn (#6876)
* [docs] Migrating Web-UI and Governance Guides to learn

* fix 404s caught in checks
2019-12-19 15:32:23 -05:00
Charlie Voiselle
0ff7c64e20 cli: Allow user to specify dest filename for nomad init (#6520)
* Allow user to specify dest filename for nomad init
* Create changelog entry for GH-6520
2019-12-19 14:59:12 -05:00
Drew Bailey
c47076d197 Merge pull request #6879 from hashicorp/update-changelog
Update CHANGELOG.md
2019-12-19 14:26:14 -05:00
Drew Bailey
704698f3e7 Update CHANGELOG.md 2019-12-19 14:06:15 -05:00
Preetha
11753a3faf Update CHANGELOG.md 2019-12-19 11:54:06 -06:00
Mahmood Ali
792fe74fc0 Merge pull request #6831 from hashicorp/add_inmemory_certificate
Add option to set certificate in-memory
2019-12-19 08:54:32 -05:00
Drew Bailey
f57574287c Merge pull request #6746 from hashicorp/f-shutdown-delay-tg
Group shutdown_delay
2019-12-18 16:01:30 -05:00
Drew Bailey
f6975298ae Merge pull request #6872 from hashicorp/dep-gohclog
update go-hclog to latest release
2019-12-18 13:24:56 -05:00
Drew Bailey
6b7debd2bf update go-hclog to latest release 2019-12-18 12:53:33 -05:00
John Schlederer
81592734b5 Making pull activity timeout configurable in Docker
* Making pull activity timeout configurable in Docker plugin config, first pass

* Fixing broken function call

* Fixing broken tests

* Fixing linter suggestion

* Adding documentation on new parameter in Docker plugin config

* Adding unit test

* Setting min value for pull_activity_timeout, making pull activity duration a private var
2019-12-18 12:58:53 +01:00
Lang Martin
309b4ff17a test: quota: relax multierror message matching to Contains 2019-12-17 13:20:14 -05:00
Lang Martin
7ea127e64e test: build quota_apply_test, remove the tests that require ent 2019-12-17 13:20:14 -05:00
Mahmood Ali
8abb4e6323 Merge pull request #6865 from hashicorp/b-cli-error-formatting
cli: sequence cli.Ui operations
2019-12-16 16:06:13 -05:00
Drew Bailey
22d521c317 update changelog for group shutdown_delay 2019-12-16 11:41:37 -05:00
Drew Bailey
8c1f9b4128 docs for shutdown delay
update docs, address pr comments

ensure pointer is not nil

use pointer for diff tests, set vs unset
2019-12-16 11:38:35 -05:00
Drew Bailey
3b033b2ef5 allow only positive shutdown delay
more explicit test case, remove select statement
2019-12-16 11:38:30 -05:00
Drew Bailey
672b76056b shutdown delay for task groups
copy struct values

ensure groupserviceHook implements RunnerPreKillhook

run deregister first

test that shutdown times are delayed

move magic number into variable
2019-12-16 11:38:16 -05:00
Mahmood Ali
af2e2bc7ed cli: sequence cli.Ui operations
Fixes a bug where if a command flag parsing errors, the resulting error
and help usage messages get interleaved in unexpected and non-user
friendly way.

The reason is that we have flag parsing library effectively writes to
ui.Error in a goroutine.  This is problematic: first, we lose the sequencing between help
usage and error message; second, cli.Ui methods are not concurrent safe.

Here, we introduce a custom error writer that buffers result and calls
ui.Error() in the write method and in the same goroutine.

For context, we need to wrap ui.Error because it's line-oriented, while
flags library expects a io.Writer which is bytes oriented.
2019-12-16 10:08:17 -05:00
Danielle
acde3e11d8 env_aws: Disable Retries and set Session cfg (#6860)
env_aws: Disable Retries and set Session cfg
2019-12-16 15:25:29 +01:00
Danielle
59eb882197 Update client/fingerprint/env_aws.go
Co-Authored-By: Mahmood Ali <mahmood@hashicorp.com>
2019-12-16 14:48:52 +01:00
Seth Hoenig
2cdb89b1f8 Merge pull request #6848 from hashicorp/b-log-less-in-node-drainer
tests: remove trace statements from nodeDrainWatcher.watch
2019-12-16 07:47:52 -06:00
Tim Gross
820309ed69 e2e: run client/allocs metrics nightly tests vs Windows (#6850)
Adds Windows targets to the client/allocs metrics tests. Removes the
`allocstats` test, which covers less than these tests and is now
redundant.

Adds a firewall rule to our Windows instances so that the prometheus
server can scrape the Nomad HTTP API for metrics.
2019-12-16 08:34:17 -05:00
Michel Vocks
8439654c0c Add raw field for ClientCert and ClientKey 2019-12-16 14:30:00 +01:00
Seth Hoenig
3163bbe797 tests: remove trace statements from nodeDrainWatcher.watch
Avoid logging in the `watch` function as much as possible, since
it is not waited on during a server shutdown. When the logger
logs after a test passes, it may or may not cause the testing
framework to panic.

More info in:
https://github.com/golang/go/issues/29388#issuecomment-453648436
2019-12-16 07:08:11 -06:00