34 Commits

Author SHA1 Message Date
Charlie Voiselle
30ab8897d2 deps: Switch from mitchellh/cli to hashicorp/cli (#19321)
Co-authored-by: James Rasell <jrasell@hashicorp.com>
2024-12-19 15:41:11 +00:00
Seth Hoenig
4d83733909 tests: swap testify for test in more places (#20028)
* tests: swap testify for test in plugins/csi/client_test.go

* tests: swap testify for test in testutil/

* tests: swap testify for test in host_test.go

* tests: swap testify for test in plugin_test.go

* tests: swap testify for test in utils_test.go

* tests: swap testify for test in scheduler/

* tests: swap testify for test in parse_test.go

* tests: swap testify for test in attribute_test.go

* tests: swap testify for test in plugins/drivers/

* tests: swap testify for test in command/

* tests: fixup some test usages

* go: run go mod tidy

* windows: cpuset test only on linux
2024-02-29 12:11:35 -06:00
Luiz Aoqui
50c50a6328 cli: fix return code when job deployment succeeds (#19876)
When a job eval is blocked due to missing capacity, the `nomad job run`
command will monitor the deployment, which may succeed once additional
capacity is made available.

But the current implementation would return `2` even when the deployment
succeeded because it only took the first eval status into account.

This commit updates the eval monitoring logic to reset the scheduling
error state if the deployment eventually succeeds.
2024-02-05 18:32:25 -05:00
hashicorp-copywrite[bot]
a9d61ea3fd Update copyright file headers to BUSL-1.1 2023-08-10 17:27:29 -05:00
Tim Gross
9a6078a2ae node pools: implement support in scheduler (#17443)
Implement scheduler support for node pool:

* When a scheduler is invoked, we get a set of the ready nodes in the DCs that
  are allowed for that job. Extend the filter to include the node pool.
* Ensure that changes to a job's node pool are picked up as destructive
  allocation updates.
* Add `NodesInPool` as a metric to all reporting done by the scheduler.
* Add the node-in-pool the filter to the `Node.Register` RPC so that we don't
  generate spurious evals for nodes in the wrong pool.
2023-06-07 10:39:03 -04:00
hashicorp-copywrite[bot]
f005448366 [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
Seth Hoenig
b242957990 ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
Luiz Aoqui
e76557289a cli: include all possible scores in alloc status metric table (#11128) 2021-09-08 17:30:11 -04: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
James Rasell
f5567b3261 cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
Josh Soref
5c2988e2bd spelling: triggered 2018-03-11 19:06:15 +00:00
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Alex Dadgar
e3710a991e add prefix tests 2017-08-29 10:09:30 -07:00
Alex Dadgar
a77c6a4f71 Parallel 2017-07-20 21:24:21 -07:00
Alex Dadgar
da25a3d5ce Switch to in-process agent 2017-07-20 21:07:32 -07:00
Alex Dadgar
7515f778a9 Thread through warnings about deprecations 2017-05-09 20:52:47 -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
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
de3bc00a00 Detect a half-byte prefix and display a user-friendly error. 2016-01-21 20:53:05 +01:00
Ivo Verberk
9770a95608 Refactoring of full-id argument and id length constants
* full-id argument is now called verbose to be more future-proof
* constants for identifier length are a little more concise
2016-01-15 23:32:38 +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
0a85e74aae Make monitoring based on prefix optional 2016-01-07 15:25:08 -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
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
070af5b3a6 command/monitor: display scheduling errors 2015-09-22 10:45:06 -07:00
Ryan Uber
6719d22cd6 command/monitor: handle more alloc state changes 2015-09-22 10:45:06 -07:00
Ryan Uber
a5334910cb command/monitor: more tests 2015-09-22 10:45:06 -07:00
Ryan Uber
ef89626e53 command/monitor: tests 2015-09-22 10:45:06 -07:00