Luiz Aoqui
5bd7cdd5c3
api: add StartedAt
in Node.DrainStrategy
2019-11-13 17:54:40 -05:00
Jasmine Dahilig
8d980edd2e
add create and modify timestamps to evaluations ( #5881 )
2019-08-07 09:50:35 -07:00
Lang Martin
0b97175a16
node_endpoint preserve both messages as rpcs and in raft
2019-07-10 13:56:20 -04:00
Lang Martin
a95225d754
NodeDeregisterBatch -> NodeBatchDeregister match JobBatch pattern
2019-07-10 13:56:20 -04:00
Lang Martin
fa5649998e
node endpoint support new NodeDeregisterBatchRequest
2019-07-10 13:56:19 -04:00
Lang Martin
82349aba5d
node_endpoint argument setup
2019-07-10 13:56:19 -04:00
Lang Martin
09fd05bd8f
node_endpoint raft store then shutdown, test deprecation
2019-07-10 13:56:19 -04:00
Lang Martin
3e2d1f0338
node_endpoint improve error messages
2019-07-10 13:56:19 -04:00
Lang Martin
b176066d42
node_endpoint deregister the batch of nodes
2019-07-10 13:56:19 -04:00
Mahmood Ali
6bdbeed319
set node.StatusUpdatedAt in raft
...
Fix a case where `node.StatusUpdatedAt` was manipulated directly in
memory.
This ensures that StatusUpdatedAt is set in raft layer, and ensures that
the field is updated when node drain/eligibility is updated too.
2019-05-21 16:13:32 -04:00
Alex Dadgar
4bdccab550
goimports
2019-01-22 15:44:31 -08:00
Alex Dadgar
3c19d01d7a
server
2018-09-15 16:23:13 -07:00
Nick Ethier
d35bf6d184
nomad: handle edge case where node drain event shouldn't be emitted
2018-06-06 14:02:10 -04:00
Preetha Appan
647ccc2dc3
fix bug where disabling a node drain when there is no drain strategy set causes scheduling eligibility to stay ineligible
2018-05-30 12:28:46 -05:00
Alex Dadgar
21c5ed850d
Register events
2018-05-22 14:06:33 -07:00
Alex Dadgar
1fe9cb4f00
update error message
2018-05-22 14:04:59 -07:00
Alex Dadgar
5f2080bc26
Emit events based on eligibility
2018-05-22 14:04:59 -07:00
Alex Dadgar
b6ecb75af9
update error message
2018-05-22 14:01:43 -07:00
Alex Dadgar
0cb31feb1f
Add node event when draining is set/removed/updated
2018-05-10 16:54:43 -07:00
Alex Dadgar
a35248d1d8
Plumb event via FSM
2018-05-10 16:30:54 -07:00
Alex Dadgar
8d50955054
Fix typos
2018-05-07 14:50:01 -05:00
Preetha Appan
a569d34f25
Add custom status description for rescheduling follow up evals, and make unit test robust
2018-04-10 15:30:15 -05:00
Preetha Appan
b3402efd0b
Adds a new custom description for update alloc triggered evals to make it easier to unit test.
2018-04-10 14:00:07 -05:00
Preetha Appan
d1cb5df477
Batch evals for rescheduling failed allocs correctly and group them by job ID
2018-04-09 14:05:31 -05:00
Alex Dadgar
58a3ec3fb2
Improve Vault error handling
2018-04-03 14:29:22 -07:00
Alex Dadgar
de4b3772f1
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
Alex Dadgar
5dacb057b7
Only track nodes if the conn is from the node
...
Fixes a bug in which a connection to a Nomad server was treated as a
connection to a node because the server forwarded a node specific RPC.
2018-03-27 09:59:31 -07:00
Alex Dadgar
e63bcb474d
Drainer
2018-03-21 16:51:44 -07:00
Alex Dadgar
a37329189a
Improve DeadlineTime helper
2018-03-21 16:51:44 -07:00
Alex Dadgar
8289cc3c6f
HTTP and API
2018-03-21 16:51:44 -07:00
Alex Dadgar
0fba0101b6
RPC/FSM/State Store for Eligibility
2018-03-21 16:51:44 -07:00
Alex Dadgar
b3d2346419
Upgrade path
2018-03-21 16:51:43 -07:00
Alex Dadgar
2f5309d82a
Remove update time
2018-03-21 16:51:43 -07:00
Alex Dadgar
e459a666ed
Node.Drain takes strategy
2018-03-21 16:49:48 -07:00
Alex Dadgar
db4a634072
RPC, FSM, State Store for marking DesiredTransistion
...
fix build tag
2018-03-21 16:49:48 -07:00
Michael Schurter
c0542474db
drain: initial drainv2 structs and impl
2018-03-21 16:49:48 -07:00
Alex Dadgar
b8607ad6d6
Heartbeat uses client rpc advertise and server defaults server rpc advertise addr
2018-03-16 16:47:08 -07:00
Alex Dadgar
85be2d99b3
Drop ACL todo
2018-03-14 16:41:46 -07:00
Chelsea Komlo
810eedfa2a
Merge pull request #3945 from hashicorp/f-add-node-events
...
Add node events
2018-03-14 08:42:55 -04:00
Preetha
360d6e5a92
Merge pull request #3968 from hashicorp/f-nicer-vault-error
...
Make server side error messages from vault more clearer
2018-03-13 20:49:39 -05:00
Alex Dadgar
d3c3deffad
fixes
2018-03-13 18:08:22 -07:00
Chelsea Holland Komlo
b41501e442
code review feedback
2018-03-13 18:08:21 -07:00
Chelsea Holland Komlo
1488b076d1
code review feedback
2018-03-13 18:08:21 -07:00
Chelsea Holland Komlo
93b732f97e
move adding node registration event to the state store
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
e7e4a31f5d
fix up error logging
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
4ede27a3c8
RPC, FSM, state store for Node.EmitEvent
...
add node event when registering a node for the first time
2018-03-13 18:05:40 -07:00
Preetha Appan
be4c30112d
Code review comment
2018-03-13 17:52:33 -05:00
Preetha Appan
9618f52746
Remove error wrapping and make vault connection server side errors clearer.
2018-03-13 17:09:03 -05:00
Josh Soref
173ce63fe9
spelling: transition
2018-03-11 19:06:05 +00:00
Alex Dadgar
6dd1c9f49d
Refactor
2018-02-15 13:59:00 -08:00
Alex Dadgar
13bbf3fbbb
Track client connections
2018-02-15 13:59:00 -08:00
Preetha Appan
b7e59e8037
Fix logging levels per code review
2018-01-31 09:58:05 -06:00
Preetha
ec1de50d01
replace err with warn
2018-01-31 09:58:05 -06:00
Preetha Appan
52a665836e
Remove extra fields set in client allocations during update
2018-01-31 09:58:05 -06:00
Preetha Appan
9c600c6d6c
Clean up comments, and one more unit test
2018-01-31 09:56:53 -06:00
Preetha Appan
f3eb343ffa
Reconcile against reschedule tracker api changes
2018-01-31 09:56:53 -06:00
Preetha Appan
2567b51c58
Edge trigger evaluation when allocations client status is failed
2018-01-31 09:56:53 -06:00
Preetha Appan
d340c3adb1
Always set modify time on allocations, and other changes addressing review comments
2017-11-01 15:13:48 -05:00
Preetha Appan
39d70be009
Add ModifyTime to Allocation and update it both on plan applies and client initiated updates
2017-11-01 15:13:48 -05:00
Alex Dadgar
08ffcd6dd1
spelling error
2017-10-31 13:32:31 -07:00
Alex Dadgar
586eeedd3c
Merge pull request #3447 from hashicorp/f-node-purge-api
...
Added the purge API on node endpoints
2017-10-27 10:42:26 -07:00
Alex Dadgar
51795a6cb4
GetClientAllocs handles garbage collection events
2017-10-26 17:24:54 -07:00
Diptanu Choudhury
2868389c25
Added ACLs to the node de-register endpoint
2017-10-26 14:12:17 -07:00
Diptanu Choudhury
9b18737d15
Added the purge API on node endpoints
2017-10-25 23:51:53 -07:00
Michael Schurter
93cea382dd
Remove support for pre-0.5 nodes
...
Nodes before 0.5 did not have a SecretID. Since SecretID is now a
required field and 0.4.x is >2 point releases ago, drop support for it.
2017-10-13 11:28:47 -07:00
Michael Schurter
15b991e039
base64 migrate token
...
HTTP header values must be ASCII.
Also constant time compare tokens and test the generate and compare
helper functions.
2017-10-13 10:59:13 -07:00
Michael Schurter
021b4c1ae9
Fix AuthToken use on Node.GetAllocs
2017-10-12 17:12:41 -07:00
Michael Schurter
ab7b6d1315
Allow Node.SecretID for GetNode and GetAlloc
2017-10-12 16:27:33 -07:00
Michael Schurter
84d8a51be1
SecretID -> AuthToken
2017-10-12 15:16:33 -07:00
Alex Dadgar
53f2ea88a5
Small fixes
...
This commit:
* Fixes the error checking in migration tests now that we are using the
canonical ErrPermissionDenied error
* Guard against NPE when looking up objects to generate the migration
token
* Handle an additional case in ShouldMigrate()
2017-10-11 17:13:50 -07:00
Chelsea Holland Komlo
c67bfc2ee4
fixups from code review
...
change creation of a migrate token to be for a previous allocation
2017-10-11 17:13:50 -07:00
Chelsea Holland Komlo
410adaf726
Add functionality for authenticated volumes
2017-10-11 17:09:20 -07:00
Chelsea Holland Komlo
36ad6bc6bf
add MigrateTokens to server response for allocs
2017-10-11 17:09:20 -07:00
Michael Schurter
e50acae1a9
ForceLeave endpoint must use Server.ResolveToken
...
The ForceLeaveRequest endpoint may only be called on servers, but the
code was using a Client to resolve tokens. This would cause a panic when
an agent wasn't both a Server and a Client.
2017-10-09 15:49:04 -07:00
Michael Schurter
a66c53d45a
Remove structs
import from api
...
Goes a step further and removes structs import from api's tests as well
by moving GenerateUUID to its own package.
2017-09-29 10:36:08 -07:00
Michael Schurter
816e7e544e
Filter Node.GetAllocs results by readable namespaces
2017-09-15 14:27:11 -07:00
Michael Schurter
01816af088
Node.List ACL enforcement
2017-09-14 22:01:18 -07:00
Michael Schurter
aca9e337aa
Node.GetAllocs ACL enforcement
2017-09-14 21:42:19 -07:00
Michael Schurter
4fc44c686c
Node.GetNode ACL enforcement
2017-09-14 20:59:18 -07:00
Michael Schurter
21ee5f4720
Node.Evaluate ACL enforcement
2017-09-14 20:41:44 -07:00
Michael Schurter
0cfaaa0a4d
Node.UpdateDrain ACL enforcement
2017-09-14 20:33:31 -07:00
Alex Dadgar
84d06f6abe
Sync namespace changes
2017-09-07 17:04:21 -07:00
Luke Farnell
f0ced87b95
fixed all spelling mistakes for goreport
2017-08-07 17:13:05 -04:00
Alex Dadgar
54a4d01bf6
Fix error checking
2017-03-29 13:59:43 -07:00
Michael Schurter
507862ade3
Add WrapRecoverable helper
2017-03-27 15:37:15 -07:00
Michael Schurter
0e6c564406
Improve artifact download error message
...
Fixes #2289
Unfortunately took more RecoverableError hijinx than I would have liked.
There might be a better way.
2017-03-24 15:26:05 -07:00
Alex Dadgar
c1d4927088
Debug lines
2017-03-06 10:25:26 -08:00
Alex Dadgar
743cf410ef
Include alloc on server side err/logs
2017-02-14 16:26:49 -08:00
Alex Dadgar
dea460281d
Merge pull request #2282 from hashicorp/f-raft-v2-stage-one
...
Update to Raft V2 stage one
2017-02-08 15:26:16 -08:00
Alex Dadgar
b51ba01d54
Merge pull request #2293 from hashicorp/f-vendor-memdb
...
Vendor MemDB
2017-02-08 14:51:01 -08:00
Alex Dadgar
b69b357c7f
Nomad builds
2017-02-07 20:31:23 -08:00
Alex Dadgar
6f9866ca69
Fix forwarded recoverable error
2017-02-05 13:14:24 -08:00
Alex Dadgar
ee368762ae
It builds
2017-02-02 16:07:15 -08:00
Brad Sickles
c67f10166d
fmt
2017-02-01 16:37:19 -05:00
Brad Sickles
da12d8811a
Third time is a charm.
2017-02-01 16:18:12 -05:00
Brad Sickles
5a8f2d3f60
Properly dealing with non-nil errors.
2017-02-01 16:07:19 -05:00
Brad Sickles
429fdb3ce7
Preventing panics of RecoverableError casts
2017-02-01 14:38:59 -05:00
Michael Schurter
a3a3656dbb
Switch to use recoverable errors from Cleanup
...
TaskRunner handles retrying but Cleanup handles all of CreatedResources.
2017-01-13 16:46:08 -08:00
Alex Dadgar
fde7a24865
Consul-template fixes + PreviousAlloc in api
2016-10-28 15:50:35 -07:00
Alex Dadgar
03fde26656
Fix inplace update for pre secret node
2016-10-26 22:05:44 -07:00