Commit Graph

55 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
a9d61ea3fd Update copyright file headers to BUSL-1.1 2023-08-10 17:27:29 -05:00
hashicorp-copywrite[bot]
f005448366 [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
James Rasell
f2197188a8 cli: ensure node status and drain use correct cmd name. (#13656) 2022-07-11 09:50:42 +02:00
Chris Baker
140e7b3aaa Node Drain Metadata (#10250) 2021-05-07 13:58:40 -04:00
Kris Hicks
85ed8ddd4f Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
Tim Gross
8a66f11bb3 docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
Tim Gross
89f4f51746 command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
Kris Hicks
e9a9ef7d56 Fix typo, Ethier -> Either 2020-01-02 14:42:27 -08:00
Michael Schurter
4a70644df0 drain: fix node drain monitoring
The whole approach to monitoring drains has ordering issues and lacks
state to output useful error messages.

AFAICT to get the tests passing reliably I needed to change the behavior
of monitoring.

Parts of these tests are skipped in CI, and they should be rewritten as
e2e tests.
2019-01-08 09:35:16 -08:00
Nick Ethier
10be0d5355 command: add docs for node drain -monitor flag 2018-05-24 06:37:28 -04:00
Nick Ethier
6287ac0009 command: use 0 as index for monitor request 2018-05-24 06:37:28 -04:00
Nick Ethier
d7b17a719c command: add '-monitor' flag to node drain 2018-05-24 06:37:25 -04:00
Nick Ethier
45b0ce9177 command: improve help text when invalid arguments are given 2018-04-18 12:02:11 -04:00
Michael Schurter
6fcfee7b92 cli: fix drain monitoring formating 2018-03-30 14:20:30 -07:00
Michael Schurter
7ff790bc7d cli: differentiate normal output vs info 2018-03-30 11:42:11 -07:00
Michael Schurter
55b98ee299 cli: add color to drain output 2018-03-30 11:15:12 -07:00
Michael Schurter
4d22c08b09 drain: add timestamps to cli output
Also toggle eligibility output based on value
2018-03-30 10:26:43 -07:00
Michael Schurter
4cefb6f06a drain: block cli until all allocs stop
Before the drain CLI would block until the node was marked as completing
drain operations. While technically correct, it could lead operators (or
more likely: scripts) to shutdown drained nodes before all of its
allocations had *actually* terminated.

This change makes the CLI block until all allocations have terminated
(unless ignoring system jobs).
2018-03-29 10:56:09 -07:00
Michael Schurter
c032d4da65 drain: give cli more time before exiting
May want to bump this a bit more as the drain often completes amidst a
flurry of alloc updates.
2018-03-27 14:24:02 -07:00
Michael Schurter
e669e8213a Improve drain log messages
Also delay "node complete" after the node has been marked complete to
capture a few more alloc events. There are other ways to implement this
that could trade off correctness for responsiveness as technically a
node is considered drained when all of its allocs have been marked to
stop and not when they've actually stopped (which may not happen for a
long time).
2018-03-21 16:51:45 -07:00
Michael Schurter
11d0eae5ed Monitor node drains until completion in CLI
allow -detach like other commands
2018-03-21 16:51:45 -07:00
Alex Dadgar
d15371405f Toggle Drain allows resetting eligibility
This PR allows marking a node as eligible for scheduling while toggling
drain. By default the `nomad node drain -disable` commmand will mark it
as eligible but the drainer will maintain in-eligibility.
2018-03-21 16:51:44 -07:00
Alex Dadgar
d65ae92dfa Small refactor and cleanups 2018-03-21 16:51:44 -07:00
Alex Dadgar
378c566294 node eligibility command 2018-03-21 16:51:44 -07:00
Alex Dadgar
5c101de725 flag comment 2018-03-21 16:51:44 -07:00
Alex Dadgar
2bdeacebff Drain cli, api, http 2018-03-21 16:51:43 -07:00
Josh Soref
e1eb3e4684 spelling: sanitize 2018-03-11 18:52:59 +00:00
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Alex Dadgar
c85e8aa02f Merge pull request #3127 from hashicorp/b-tls-api
Fix TLSServerName for Node API Client
2017-08-29 16:10:58 -07:00
Alex Dadgar
5d65af523d Check for errors initializing client for autocomplete 2017-08-29 14:29:32 -07:00
Alex Dadgar
b86e05b4a0 use helper 2017-08-29 10:04:02 -07:00
Alex Dadgar
0852c0ab3a status commands handle uuid prefixes with hyphens 2017-08-29 09:43:28 -07:00
Alex Dadgar
ce3c316592 don't limit on one arg 2017-08-28 13:40:04 -07:00
Alex Dadgar
85a1899dfa Reduce startup time on Mac
This PR moves creating the API client into the returned predict
function. The creation of the client causes a lookup of all the system
certificates and doing that for each command on mac was extremely slow.
2017-08-28 11:29:27 -07:00
Alex Dadgar
4d97b302a0 Search respects QueryOptions and returns QueryMeta
@chelseakomlo heads up on this change
2017-08-27 22:17:51 -07:00
Chelsea Holland Komlo
e88228cc5d add global flags to autocomplete 2017-08-23 22:58:44 +00:00
Chelsea Holland Komlo
c1e5c7132a enable autocompletion of flags 2017-08-23 22:57:07 +00:00
Alex Dadgar
f18fbc6ba4 node drain 2017-08-22 13:13:44 -07:00
Alex Dadgar
3cd8d50bbc Multiple matched objects now treated as an error condition. 2017-07-20 17:31:07 -07:00
Alex Dadgar
e6e3225c5c Add -self flag to node-drain 2016-04-11 15:20:49 -07:00
Diptanu Choudhury
66b67e5994 Fixes the logic for node drain confirmation prompt 2016-03-27 19:17:29 -07:00
Alex Dadgar
f1b485511e Confirmation on destructive commands 2016-03-24 14:43:20 -07:00
Diptanu Choudhury
3fd9aaafea Always defaulting to prefix match 2016-03-17 17:25:38 -07:00
Alex Dadgar
7847357382 Merge pull request #692 from iverberk/f-detect-half-byte-prefix
Detect a half-byte prefix
2016-01-21 14:12:27 -08:00
Ivo Verberk
cc4fea99fc Provide a consistent user experience with prefix based lookups.
* Require at least two characters for identifier
* Automatically strip off the last character in case of uneven length
2016-01-21 22:21:35 +01:00
Ivo Verberk
2559bd68c8 Do not use the exact internal field names in the CLI output 2016-01-21 21:35:56 +01:00
Ivo Verberk
de3bc00a00 Detect a half-byte prefix and display a user-friendly error. 2016-01-21 20:53:05 +01:00
Alex Dadgar
012db31100 Change multiple match cli output 2016-01-06 15:08:47 -08:00
Ivo Verberk
62951082e2 Improvements for short identifiers
* Fix tests
* Update documentation
2016-01-06 22:46:57 +01:00
Ivo Verberk
905742249e Refactoring continued
* Refactor other cli commands to new design
* Add PrefixList method to api package
* Add more tests
2015-12-24 20:53:37 +01:00