Lukas W
0e5958d671
CLI: Return non-zero exit code when deployment fails in nomad run
( #11550 )
...
* Exit non-zero from run command if deployment fails
* Fix typo in deployment monitor introduced in 0edda11
2021-12-09 09:09:28 -05:00
Luiz Aoqui
4dd8b6b571
cli: include all possible scores in alloc status metric table ( #11128 )
2021-09-08 17:30:11 -04:00
Isabel Suchanek
e3cde4f4b3
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
dfaef2468c
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
48a260fc33
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
b1490fe2dd
update log output to clarify that nodes were filtered out rather than down
2020-03-17 14:45:11 -04:00
Drew Bailey
a7adc54235
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
d03201adf8
Fix formatting of allocation score metrics
2018-10-30 12:03:23 -05:00
Preetha Appan
254e90ba0e
Fix linting
2018-09-04 16:10:11 -05:00
Preetha Appan
9bc0962527
Track top k nodes by norm score rather than top k nodes per scorer
2018-09-04 16:10:11 -05:00
Preetha Appan
6ed527c636
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
8e7870b590
cli: remove info color on monitored output
2018-03-30 15:51:48 -07:00
Josh Soref
f28efbbc79
spelling: sanitize
2018-03-11 18:52:59 +00:00
Alex Dadgar
c1cc51dbee
sync
2017-10-13 14:36:02 -07:00
Alex Dadgar
4173834231
Enable more linters
2017-09-26 15:26:33 -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
9f016606aa
Fix some tests, eval monitor shows deployment id and deployment cancels based on version
2017-07-07 12:12:48 -07:00
Diptanu Choudhury
487c66b84d
Removing the queued state of Job Summary and alloc desired status false
2016-07-13 13:20:46 -06:00
Alex Dadgar
b1298bb658
plan shows failure reasons and ordered annotations
2016-05-31 21:51:23 +00:00
Alex Dadgar
b7ca0669b8
output and test fix
2016-05-24 18:42:05 -07:00
Alex Dadgar
fcc57fbc66
rename SpawnedBlockedEval and simplify map safety check
2016-05-24 18:12:59 -07:00
Alex Dadgar
e4cb2d400b
print spawned eval in monitor
2016-05-19 13:16:10 -07:00
Alex Dadgar
16353c48a7
Show task group failures in eval-monitor
2016-05-18 22:02:51 -07:00
Alex Dadgar
d2d59905a2
Shorted eval id and only print waiting if time > 0
2016-02-06 16:09:39 -08:00
Alex Dadgar
837ca9ab86
limit length of string, taking into account its length
2016-01-27 10:42:10 -08: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
Ivo Verberk
9c46eceeac
Cleanup code and add comments
2016-01-20 00:02:17 +01:00
Ivo Verberk
91a9f2c4ce
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
3ff5e98d25
commnet
2016-01-07 15:43:30 -08:00
Alex Dadgar
dca1a9ad85
Make monitoring based on prefix optional
2016-01-07 15:25:08 -08:00
Alex Dadgar
68a5877c91
Change multiple match cli output
2016-01-06 15:08:47 -08:00
Alex Dadgar
ce22c049db
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
9527fc254d
Improvements for short identifiers
...
* Fix tests
* Update documentation
2016-01-06 22:46:57 +01:00
Alex Dadgar
c0721e45f6
Fix bug, add tests, and cli output
2016-01-04 14:23:06 -08: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
33f73a1e8e
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
5ce6f4bb64
command: better output for alloc-status
2015-09-27 13:59:27 -07:00
Ryan Uber
5fdc10befc
command/monitor: set initial status to 'pending'
2015-09-22 10:45:08 -07:00
Ryan Uber
306a6dc81f
command: print a warning if we get 0 evaluated nodes
2015-09-22 10:45:08 -07:00
Ryan Uber
75c79b705e
command: monitor output updates
2015-09-22 10:45:08 -07:00
Ryan Uber
d7f3697e5d
command: adjustments to monitor logs
2015-09-22 10:45:07 -07:00
Ryan Uber
cf8fe7e8d7
command: remove unnecessary alloc-status command
2015-09-22 10:45:07 -07:00
Ryan Uber
6f8d0040f9
command: return 2 for scheduling failures when using monitor
2015-09-22 10:45:07 -07:00
Ryan Uber
aa8bee0cfa
command: allocation monitor adjustments
2015-09-22 10:45:07 -07:00
Ryan Uber
277e5ae8d6
command: simplify alloc status, dump during job run
2015-09-22 10:45:07 -07:00
Ryan Uber
fd61e29d01
command/monitor: dump info regardless of initial status
2015-09-22 10:45:07 -07:00