Michael Schurter
b5aa71a517
cli: fix drain monitoring formating
2018-03-30 14:20:30 -07:00
Michael Schurter
7199a2b960
cli: differentiate normal output vs info
2018-03-30 11:42:11 -07:00
Michael Schurter
0260bda046
cli: add color to drain output
2018-03-30 11:15:12 -07:00
Michael Schurter
88d0cdbb72
drain: add timestamps to cli output
...
Also toggle eligibility output based on value
2018-03-30 10:26:43 -07:00
Michael Schurter
ee3eddbac3
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
559dae984f
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
be7c759867
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
5eebd53223
Monitor node drains until completion in CLI
...
allow -detach like other commands
2018-03-21 16:51:45 -07:00
Alex Dadgar
7b2bad8c5e
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
ac4975cef4
Small refactor and cleanups
2018-03-21 16:51:44 -07:00
Alex Dadgar
c0f808205e
node eligibility command
2018-03-21 16:51:44 -07:00
Alex Dadgar
f44fbac66a
flag comment
2018-03-21 16:51:44 -07:00
Alex Dadgar
010228577e
Drain cli, api, http
2018-03-21 16:51:43 -07:00
Josh Soref
f28efbbc79
spelling: sanitize
2018-03-11 18:52:59 +00:00
Alex Dadgar
4173834231
Enable more linters
2017-09-26 15:26:33 -07:00
Alex Dadgar
96e226f1ee
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
93add81844
Check for errors initializing client for autocomplete
2017-08-29 14:29:32 -07:00
Alex Dadgar
52fa3396e7
use helper
2017-08-29 10:04:02 -07:00
Alex Dadgar
8c1573642d
status commands handle uuid prefixes with hyphens
2017-08-29 09:43:28 -07:00
Alex Dadgar
5182ebb8cf
don't limit on one arg
2017-08-28 13:40:04 -07:00
Alex Dadgar
1df249f1fb
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
d7d8661485
Search respects QueryOptions and returns QueryMeta
...
@chelseakomlo heads up on this change
2017-08-27 22:17:51 -07:00
Chelsea Holland Komlo
ed2a544502
add global flags to autocomplete
2017-08-23 22:58:44 +00:00
Chelsea Holland Komlo
2721e5890f
enable autocompletion of flags
2017-08-23 22:57:07 +00:00
Alex Dadgar
554e17c3e9
node drain
2017-08-22 13:13:44 -07:00
Alex Dadgar
40ca1298b3
Multiple matched objects now treated as an error condition.
2017-07-20 17:31:07 -07:00
Alex Dadgar
60153ed845
Add -self flag to node-drain
2016-04-11 15:20:49 -07:00
Diptanu Choudhury
b45387c03c
Fixes the logic for node drain confirmation prompt
2016-03-27 19:17:29 -07:00
Alex Dadgar
5d48a2bc71
Confirmation on destructive commands
2016-03-24 14:43:20 -07:00
Diptanu Choudhury
7ed107d04e
Always defaulting to prefix match
2016-03-17 17:25:38 -07:00
Alex Dadgar
436c13d26a
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
9ab2135b38
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
c44b4c8aa9
Do not use the exact internal field names in the CLI output
2016-01-21 21:35:56 +01:00
Ivo Verberk
d8ac284bdd
Detect a half-byte prefix and display a user-friendly error.
2016-01-21 20:53:05 +01:00
Alex Dadgar
68a5877c91
Change multiple match cli output
2016-01-06 15:08:47 -08:00
Ivo Verberk
9527fc254d
Improvements for short identifiers
...
* Fix tests
* Update documentation
2016-01-06 22:46:57 +01:00
Ivo Verberk
0c01ca49e6
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
Ivo Verberk
7838b2a57c
Refactoring
...
* Reverted changes to get methods
* Added prefix query parameter
* Updated node status to use prefix based searching
* Fixed tests
* Removed truncation logic
2015-12-22 23:44:33 +01:00
Ivo Verberk
a3d015c278
Allow short identifiers for node-drain command
2015-12-20 18:02:10 +01:00
Ryan Uber
7b5fd8a214
command: use meta struct for common options
2015-09-14 13:24:03 -07:00
Ryan Uber
18745e6e68
command: cleanup
2015-09-14 13:24:03 -07:00
Ryan Uber
c6fdb6060a
command: add node-drain command
2015-09-14 13:24:03 -07:00