Commit Graph

59 Commits

Author SHA1 Message Date
Isabel Suchanek
ca010f9f87 cli: check deployment exists before monitoring (#10757)
System and batch jobs don't create deployments, which means nomad tries
to monitor a non-existent deployment when it runs a job and outputs an
error message. This adds a check to make sure a deployment exists before
monitoring. Also fixes some formatting.

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-06-14 16:42:38 -07:00
Isabel Suchanek
0edda116ad cli: add monitor flag to deployment status
Adding '-verbose' will print out the allocation information for the
deployment. This also changes the job run command so that it now blocks
until deployment is complete and adds timestamps to the output so that
it's more in line with the output of node drain.

This uses glint to print in place in running in a tty. Because glint
doesn't yet support cmd/powershell, Windows workflows use a different
library to print in place, which results in slightly different
formatting: 1) different margins, and 2) no spinner indicating
deployment in progress.
2021-06-09 16:18:45 -07:00
Kris Hicks
0e09747d5b Update monitor func not to take a prefix (#9251)
The only user of monitor(evalID, true) was command/eval_status, and
eval_status had a duplicate of the prefix-handling code inside it, so in
all cases the complete evalID was being passed to monitor.

Given that, we can remove the prefix code from command/monitor, and
remove the boolean arg.
2020-11-02 10:24:49 -08:00
Derek Strickland
3ed990296b update log output to clarify that nodes were filtered out rather than down 2020-03-17 14:45:11 -04:00
Drew Bailey
6980ab0a81 Prevent nomad alloc status output inconsistency
Prevent random map ordering and sort alphabetically

better variable name
2019-11-01 14:01:32 -04:00
Preetha Appan
4a35d62887 Fix formatting of allocation score metrics 2018-10-30 12:03:23 -05:00
Preetha Appan
b8facd8756 Fix linting 2018-09-04 16:10:11 -05:00
Preetha Appan
f6cbfbfef6 Track top k nodes by norm score rather than top k nodes per scorer 2018-09-04 16:10:11 -05:00
Preetha Appan
4d68d935e4 Use heap to store top K scoring nodes.
Scoring metadata is now aggregated by scorer type to make it easier
to parse when reading it in the CLI.
2018-09-04 16:10:11 -05:00
Michael Schurter
56997eac67 cli: remove info color on monitored output 2018-03-30 15:51:48 -07:00
Josh Soref
e1eb3e4684 spelling: sanitize 2018-03-11 18:52:59 +00:00
Alex Dadgar
f6fbb36054 sync 2017-10-13 14:36:02 -07:00
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -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
fe990ca3e0 Fix some tests, eval monitor shows deployment id and deployment cancels based on version 2017-07-07 12:12:48 -07:00
Diptanu Choudhury
42ba68a201 Removing the queued state of Job Summary and alloc desired status false 2016-07-13 13:20:46 -06:00
Alex Dadgar
c77026f5da plan shows failure reasons and ordered annotations 2016-05-31 21:51:23 +00:00
Alex Dadgar
ed94128d68 output and test fix 2016-05-24 18:42:05 -07:00
Alex Dadgar
92bddbc3a5 rename SpawnedBlockedEval and simplify map safety check 2016-05-24 18:12:59 -07:00
Alex Dadgar
9f5ab6648f print spawned eval in monitor 2016-05-19 13:16:10 -07:00
Alex Dadgar
154875c0bc Show task group failures in eval-monitor 2016-05-18 22:02:51 -07:00
Alex Dadgar
0764b8f161 Shorted eval id and only print waiting if time > 0 2016-02-06 16:09:39 -08:00
Alex Dadgar
4836bd5656 limit length of string, taking into account its length 2016-01-27 10:42:10 -08: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
Ivo Verberk
4330157b78 Cleanup code and add comments 2016-01-20 00:02:17 +01:00
Ivo Verberk
ab9409184a Shorten CLI identifiers
* Truncate all UUID identifiers to eight characters by default
* Refactor the node identifier to an auto-generated UUID
* Created and updated tests and mocks
2016-01-14 21:57:43 +01:00
Alex Dadgar
37d9c4d9f7 commnet 2016-01-07 15:43:30 -08:00
Alex Dadgar
0a85e74aae Make monitoring based on prefix optional 2016-01-07 15:25:08 -08:00
Alex Dadgar
012db31100 Change multiple match cli output 2016-01-06 15:08:47 -08:00
Alex Dadgar
cf3152d924 Merge pull request #575 from nautsio/f-short-ids
Allow lookups based on short identifiers
2016-01-06 14:36:19 -08:00
Ivo Verberk
62951082e2 Improvements for short identifiers
* Fix tests
* Update documentation
2016-01-06 22:46:57 +01:00
Alex Dadgar
892c7ddee3 Fix bug, add tests, and cli output 2016-01-04 14:23:06 -08: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
Ivo Verberk
91075e130a Short identifiers functionality
* Use go-memdb prefix indexer for lookups
* Add Job lookups
* Update state store with new ByIDPrefix get methods
* Call new methods when exact lookup fails or is not applicable
2015-12-19 21:55:28 +01:00
Ryan Uber
a58b60b8ea command: better output for alloc-status 2015-09-27 13:59:27 -07:00
Ryan Uber
243d15fba7 command/monitor: set initial status to 'pending' 2015-09-22 10:45:08 -07:00
Ryan Uber
7d64e1fa2d command: print a warning if we get 0 evaluated nodes 2015-09-22 10:45:08 -07:00
Ryan Uber
5596f8419d command: monitor output updates 2015-09-22 10:45:08 -07:00
Ryan Uber
4445730c67 command: adjustments to monitor logs 2015-09-22 10:45:07 -07:00
Ryan Uber
2f5c40cb4b command: remove unnecessary alloc-status command 2015-09-22 10:45:07 -07:00
Ryan Uber
ceab11b3f4 command: return 2 for scheduling failures when using monitor 2015-09-22 10:45:07 -07:00
Ryan Uber
b3301ea0c8 command: allocation monitor adjustments 2015-09-22 10:45:07 -07:00
Ryan Uber
ebfc98e0b6 command: simplify alloc status, dump during job run 2015-09-22 10:45:07 -07:00
Ryan Uber
4de3cb7040 command/monitor: dump info regardless of initial status 2015-09-22 10:45:07 -07:00
Ryan Uber
0410be0259 command/monitor: cleanup 2015-09-22 10:45:07 -07:00
Ryan Uber
070af5b3a6 command/monitor: display scheduling errors 2015-09-22 10:45:06 -07:00