38 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
Ville Vesilehto
2c463bb038 chore(lint): use Go stdlib variables for HTTP methods and status codes (#17968) 2023-07-26 15:28:09 +01:00
hashicorp-copywrite[bot]
f005448366 [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
Shishir
c86642bae4 Add os to NodeListStub struct. (#12497)
* Add os to NodeListStub struct.

Signed-off-by: Shishir Mahajan <smahajan@roblox.com>

* Add os as a query param to /v1/nodes.

Signed-off-by: Shishir Mahajan <smahajan@roblox.com>

* Add test: os as a query param to /v1/nodes.

Signed-off-by: Shishir Mahajan <smahajan@roblox.com>
2022-04-15 17:22:45 -07:00
Seth Hoenig
b242957990 ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
Chris Baker
140e7b3aaa Node Drain Metadata (#10250) 2021-05-07 13:58:40 -04:00
Chris Baker
93d5187e7b removed deprecated fields from Drain structs and API
node drain: use msgtype on txn so that events are emitted
wip: encoding extension to add Node.Drain field back to API responses

new approach for hiding Node.SecretID in the API, using `json` tag
documented this approach in the contributing guide
refactored the JSON handlers with extensions
modified event stream encoding to use the go-msgpack encoders with the extensions
2021-03-21 15:30:11 +00:00
Drew Bailey
7ce0b5017c Events/msgtype cleanup (#9117)
* use msgtype in upsert node

adds message type to signature for upsert node, update tests, remove placeholder method

* UpsertAllocs msg type test setup

* use upsertallocs with msg type in signature

update test usage of delete node

delete placeholder msgtype method

* add msgtype to upsert evals signature, update test call sites with test setup msg type

handle snapshot upsert eval outside of FSM and ignore eval event

remove placeholder upsertevalsmsgtype

handle job plan rpc and prevent event creation for plan

msgtype cleanup upsertnodeevents

updatenodedrain msgtype

msg type 0 is a node registration event, so set the default  to the ignore type

* fix named import

* fix signature ordering on upsertnode to match
2020-10-19 09:30:15 -04:00
Mahmood Ali
d5db765005 tests: remove TestHTTP_NodeDrain_Compat
Nomad 0.11 servers no longer support having pre-0.8 clients.
2020-03-30 07:06:52 -04:00
Mahmood Ali
ed6a8d80c0 tests: deflake TestHTTP_NodeDrain
A node may be recognized as not running any allocs and have its drain
flag reset before the test queries it.
2020-03-30 07:06:52 -04:00
Eli Shvartsman
b2d40e7ef7 take NodeID from url in api for node eligibility 2019-07-15 18:34:53 +03:00
Preetha Appan
d053e5323d Use constant in test 2018-05-30 17:27:04 -05:00
Preetha Appan
44aef6567e Add unit test to verify compatibility code for node drains 2018-05-30 17:14:53 -05:00
Alex Dadgar
cfc9d1fbbd Register events 2018-05-22 14:06:33 -07:00
Alex Dadgar
400cbcf128 Create evals for system jobs when drain is unset
This PR creates evals for system jobs when:

* Drain is unset and mark eligible is true
* Eligibility is restored to the node
2018-03-27 15:53:24 -07:00
Michael Schurter
aab1fb7672 Fix linting errors 2018-03-21 16:51:45 -07:00
Alex Dadgar
7d58209927 code review 2018-03-21 16:51:44 -07:00
Alex Dadgar
0fb9ba7732 HTTP and API 2018-03-21 16:51:44 -07:00
Alex Dadgar
2bdeacebff Drain cli, api, http 2018-03-21 16:51:43 -07:00
Alex Dadgar
eceabb66f8 nodeevents -> events 2018-03-13 18:08:22 -07:00
Chelsea Holland Komlo
6eb9911caf code review feedback 2018-03-13 18:08:21 -07:00
Chelsea Holland Komlo
fc819754a4 Ensure node updates don't strip node events
Add node events to CLI
2018-03-13 18:05:40 -07:00
Preetha Appan
bbeb658831 Populate DisplayMessage in various http endpoints that return allocations, plus unit tests. 2017-11-17 14:53:26 -06:00
Diptanu Choudhury
fa2cbb6f0c Added the purge API on node endpoints 2017-10-25 23:51:53 -07:00
Alex Dadgar
a73e945067 More parallel 2017-07-20 09:36:34 -07:00
Alex Dadgar
873587381d New test agent 2017-07-19 22:14:36 -07:00
Diptanu Choudhury
03c6692f98 Fixed some bugs 2016-07-25 17:26:38 -07:00
Alex Dadgar
410ae593e7 Fix double pull with introduction of AllocModifyIndex 2016-02-01 15:43:59 -08:00
Ivo Verberk
60d8180279 Add additional API endpoint for requesting client specific node allocations. 2016-01-29 20:01:21 +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
Ivo Verberk
62951082e2 Improvements for short identifiers
* Fix tests
* Update documentation
2016-01-06 22:46:57 +01:00
Ivo Verberk
e89b5af338 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
Armon Dadgar
c9d17611bf nomad: rename region1 to global. Fixes #41 2015-09-13 18:18:40 -07:00
Armon Dadgar
c27a0725cc nomad: cleanup API descrepencies 2015-09-06 20:47:42 -07:00
Armon Dadgar
6ee7f111dc Rename client endpoint to node endpoint 2015-09-06 20:31:32 -07:00
Armon Dadgar
2d9c3fb9f3 http: adding the drain toggle endpoint 2015-09-06 20:03:59 -07:00
Armon Dadgar
60d32f218a http: Adding nodes list 2015-09-06 14:31:17 -07:00
Armon Dadgar
4893acf6fa http/node: adding a few node endpoints 2015-09-06 14:18:11 -07:00