Preetha Appan
31a3c81c3b
Show a section on upcoming delayed evaluations when applicable
2018-03-19 21:42:37 -05:00
Preetha Appan
33a5a72323
Make suggested interval round to seconds, and more end to end test cases
2018-03-19 14:56:52 -05:00
James Rasell
15afef9b77
Allow Nomads Consul health checks to be configurable.
...
This change allows the client HTTP and the server HTTP, Serf and
RPC health check names within Consul to be configurable with the
defaults as previous. The configuration can be done via either a
config file or using CLI flags.
Closes #3988
2018-03-19 19:37:56 +01:00
Alex Dadgar
9e05c9a50e
Merge pull request #3997 from hashicorp/b-serf-addr
...
RPC Advertise used exclusively for Clients
2018-03-19 09:30:20 -07:00
Alex Dadgar
2baa1c38f2
clarify comment
2018-03-16 16:47:08 -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
52b7fb5361
Separate client and server rpc advertise addresses
2018-03-16 16:47:08 -07:00
Michael Schurter
c3e8f6319c
gofmt -s (simplify) files
2018-03-16 16:31:16 -07:00
Alex Dadgar
b3ab063132
Merge pull request #3992 from hashicorp/f-vault-orphan
...
Allow and recommend Orphaned Vault tokens
2018-03-16 10:59:54 -07:00
Alex Dadgar
6a44e6092f
Pull snapshotting out of loop
2018-03-16 10:54:26 -07:00
Alex Dadgar
7545c0053e
job gc uses batch endpoint
2018-03-16 10:53:03 -07:00
Alex Dadgar
586ae36d13
Batch Deregister RPC
2018-03-16 10:53:03 -07:00
Alex Dadgar
c152774997
Allow and recommend Orphaned Vault tokens
...
This PR removes enforcement that the Vault token role disallows orphaned
tokens and recommends orphaned tokens to simplify the
bootstrapping/upgrading of Nomad clusters. The requirement that Nomad's
Vault token never expire and be shared by all instances of Nomad servers
is not operationally friendly.
2018-03-15 15:32:08 -07:00
Alex Dadgar
fc782d5942
List unblocks on summary changes
2018-03-15 10:22:03 -07:00
Alex Dadgar
85be2d99b3
Drop ACL todo
2018-03-14 16:41:46 -07:00
Alex Dadgar
3537c73289
Merge pull request #3978 from hashicorp/b-core-sched
...
Always add core scheduler
2018-03-14 16:13:15 -07:00
Preetha Appan
56e60e5840
Fix linting warning
2018-03-14 16:12:22 -05:00
Preetha Appan
9a5e6edf1f
Rename DelayCeiling to MaxDelay
2018-03-14 16:10:32 -05:00
Preetha Appan
4193015e48
Update comment
2018-03-14 16:10:32 -05:00
Preetha Appan
3e96c6c4e0
Address more code review feedback
2018-03-14 16:10:32 -05:00
Preetha Appan
9749b7a05c
Avoids unnecessary timer object creation
2018-03-14 16:10:32 -05:00
Preetha Appan
9fed0d2103
Get reschedule policy from the alloc directly
2018-03-14 16:10:32 -05:00
Preetha Appan
4d5e9bcb45
Extra comments, remove unnecessary if condition
2018-03-14 16:10:32 -05:00
Preetha Appan
c6f333c90f
Move delayheap to lib package
2018-03-14 16:10:32 -05:00
Preetha Appan
1ab8f2b57a
Address some code review comments
2018-03-14 16:10:32 -05:00
Preetha Appan
7887f39ff4
Added a delay heap to track evals with WaitUntil set, and use in eval broker
2018-03-14 16:10:32 -05:00
Preetha Appan
342c3fb961
Added FollowupEvalID field and helper methods to calculate reschedule eligibility based on delay
2018-03-14 16:10:32 -05:00
Preetha Appan
87538fc87d
Fix formatting
2018-03-14 16:10:32 -05:00
Preetha Appan
51ec6ec15e
Formatting and linting fixes
2018-03-14 16:10:32 -05:00
Preetha Appan
5f50c3d618
Add new reschedule options to API layer and unit tests
2018-03-14 16:10:32 -05:00
Preetha Appan
10c9662222
New delayed rescheduling options, validation function and unit tests
2018-03-14 16:10:32 -05:00
Alex Dadgar
92cb552ff6
Always add core scheduler and detect invalid schedulers
2018-03-14 10:53:27 -07:00
Alex Dadgar
55e4f5cdc4
Require core scheduler
2018-03-14 10:37:49 -07:00
Preetha Appan
948d917a60
lint warning fixed
2018-03-14 11:30:09 -05:00
Preetha Appan
a924183604
Remove compat code for upgrade stanza that copied state from job level update stanza
2018-03-14 10:21:46 -05: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
Preetha Appan
7b5955826d
Fix lint warning
2018-03-13 20:49:01 -05:00
Alex Dadgar
de6ebb6e6c
small cleanup
2018-03-13 18:08:22 -07:00
Alex Dadgar
63e14b7d63
nodeevents -> events
2018-03-13 18:08:22 -07: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
8f109c344c
make check fixes
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
19ef872769
keep state store functions in one file
2018-03-13 18:08:21 -07:00
Chelsea Holland Komlo
a8655320fd
fix up go check warnings
2018-03-13 18:08:21 -07:00
Chelsea Holland Komlo
a8bcbd81e6
batch submitting node events
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
d30c269fbe
code review feedback
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
0f306aa0dd
move all structs to structs file
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
311cb857ac
add node id to tests; check for node events in state store
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
00d9923454
Ensure node updates don't strip node events
...
Add node events to CLI
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
ae7a2d6eb1
code review feedback
2018-03-13 18:05:40 -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
Chelsea Holland Komlo
9e10e26387
NodeEvents struct
2018-03-13 18:05:40 -07:00
Preetha Appan
e08ecb7da2
Fix incorrect comment
2018-03-13 18:25:41 -05: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
Preetha Appan
9a4fcaaf34
Fix bug with not including namespace in indexing blocked evals
2018-03-13 13:23:11 -05:00
Alex Dadgar
93b0e42e6c
Fix merge change
2018-03-12 16:25:49 -07:00
Alex Dadgar
4844317cc2
Merge pull request #3890 from hashicorp/b-heartbeat
...
Heartbeat improvements and handling failures during establishing leadership
2018-03-12 14:41:59 -07:00
Michael Schurter
7dd7fbcda2
non-Existent -> nonexistent
...
Reverting from #3963
https://www.merriam-webster.com/dictionary/existent
2018-03-12 11:59:33 -07:00
Josh Soref
18c5659474
spelling: version
2018-03-11 19:13:25 +00:00
Josh Soref
0ced826ed3
spelling: usage
2018-03-11 19:11:59 +00:00
Josh Soref
001f664ab1
spelling: update
2018-03-11 17:44:04 +00:00
Josh Soref
173ce63fe9
spelling: transition
2018-03-11 19:06:05 +00:00
Josh Soref
c4c4645f46
spelling: summary
2018-03-11 19:00:07 +00:00
Josh Soref
6aa0a05998
spelling: scheduling
2018-03-11 18:53:11 +00:00
Josh Soref
f28efbbc79
spelling: sanitize
2018-03-11 18:52:59 +00:00
Josh Soref
f78d5685ee
spelling: routines
2018-03-11 18:52:35 +00:00
Josh Soref
3140a5dcf9
spelling: response
2018-03-11 18:48:24 +00:00
Josh Soref
4e40338cfa
spelling: rescheduling
2018-03-11 18:40:32 +00:00
Josh Soref
fdd7b5ee9d
spelling: reschedule
2018-03-11 18:50:50 +00:00
Josh Soref
6f06f0e6f2
spelling: requeuing
2018-03-11 18:43:05 +00:00
Josh Soref
9f2732f405
spelling: requested
2018-03-11 18:43:21 +00:00
Josh Soref
c384e14f3d
spelling: request
2018-03-11 18:42:43 +00:00
Josh Soref
258d76ec13
spelling: registry
2018-03-11 18:41:13 +00:00
Josh Soref
64546b4f99
spelling: referenced
2018-03-11 18:40:45 +00:00
Josh Soref
052623bda1
spelling: primitive
2018-03-11 18:38:46 +00:00
Josh Soref
eb127482a4
spelling: policies
2018-03-11 18:37:37 +00:00
Josh Soref
7ab998803b
spelling: periodic
2018-03-11 18:37:05 +00:00
Josh Soref
88537de497
spelling: passed
2018-03-11 18:36:49 +00:00
Josh Soref
e4b6eed49b
spelling: only
2018-03-11 18:33:52 +00:00
Josh Soref
3c72f0208e
spelling: needed
2018-03-11 18:30:06 +00:00
Josh Soref
822a4178d5
spelling: namespace
2018-03-11 18:29:24 +00:00
Josh Soref
fb5beb664d
spelling: monotonically
2018-03-11 18:28:31 +00:00
Josh Soref
33a0a04941
spelling: missing
2018-03-11 18:27:02 +00:00
Josh Soref
7da15e6ee5
spelling: minimum
2018-03-11 18:26:53 +00:00
Josh Soref
2c79e590ec
spelling: maintenance
2018-03-11 18:26:20 +00:00
Josh Soref
b56ebdf350
spelling: invoke
2018-03-11 18:00:32 +00:00
Josh Soref
bc4320df3a
spelling: incremented
2018-03-11 18:15:17 +00:00
Josh Soref
69af44e69e
spelling: identifying
2018-03-11 18:15:05 +00:00
Josh Soref
b9d1b98756
spelling: healthy
2018-03-11 18:12:57 +00:00
Josh Soref
85fabc63c8
spelling: expected
2018-03-11 17:57:01 +00:00
Josh Soref
7f6e4012a0
spelling: existent
2018-03-11 18:30:37 +00:00
Josh Soref
444341a278
spelling: example
2018-03-11 18:05:59 +00:00
Josh Soref
d300623abe
spelling: evaluation
2018-03-11 18:01:35 +00:00
Josh Soref
a0452dd7f5
spelling: evaluate
2018-03-11 18:01:29 +00:00
Josh Soref
f1d21bfdfe
spelling: enqueuing
2018-03-11 18:00:07 +00:00
Josh Soref
d9ce1f7882
spelling: deregister
2018-03-11 17:53:22 +00:00
Josh Soref
0869d9c4ee
spelling: deployments
2018-03-11 17:53:43 +00:00
Josh Soref
bf05f146cd
spelling: deployment
2018-03-11 17:57:49 +00:00
Josh Soref
f7e09cbecf
spelling: correlate
2018-03-11 17:51:05 +00:00
Josh Soref
24c76dbcca
spelling: cores
2018-03-11 17:51:20 +00:00
Josh Soref
c9b86bbc2f
spelling: controls
2018-03-11 17:50:39 +00:00
Josh Soref
95f8098e99
spelling: configuration
2018-03-11 17:48:04 +00:00
Josh Soref
d0a76b328d
spelling: captures
2018-03-11 17:46:35 +00:00
Josh Soref
ef07cc63d3
spelling: autorevert
2018-03-11 17:42:45 +00:00
Josh Soref
5180b04d39
spelling: arguments
2018-03-11 17:40:28 +00:00
Josh Soref
b8b46d3f74
spelling: allocation
2018-03-11 17:37:22 +00:00
Josh Soref
fb608094ef
spelling: admitting
2018-03-11 17:35:27 +00:00
Josh Soref
3232f6f27e
spelling: abandoned
2018-03-11 17:34:16 +00:00
Preetha Appan
0b3754c05e
Fix error message string in test
2018-03-09 15:07:52 -06:00
Preetha Appan
f1c2a37f57
Update error message
2018-03-09 14:25:53 -06:00
Preetha Appan
9d3980b253
update comment
2018-03-09 08:56:54 -06:00
Preetha Appan
c6b975428b
Always retry on token validation instead of special casing vault sealing
2018-03-08 20:27:49 -06:00
Preetha Appan
4421025372
Retry when vault is sealed
2018-03-08 16:53:54 -06:00
Chelsea Komlo
7c7e2f4d0b
Merge pull request #3873 from hashicorp/r-edge-trigger-node-watcher
...
Edge trigger node updates
2018-03-01 15:18:59 -05:00
Preetha Appan
eaedffc7f7
Fix go vet errors
2018-02-28 12:21:27 -06:00
Chelsea Holland Komlo
b4b0c7cdcf
fix up linting
2018-02-28 12:58:44 -05:00
Chelsea Holland Komlo
a72aaaf47f
add network resources equal method, use time ticker
...
remove impossible test case
2018-02-27 12:42:53 -05:00
Alex Dadgar
e6ca70b9af
logging
2018-02-21 10:23:49 -08:00
Alex Dadgar
354faf2820
Fix flaky test
2018-02-20 16:05:43 -08:00
Alex Dadgar
f10ff54d21
add a revoke leadership test
2018-02-20 15:49:03 -08:00
Alex Dadgar
64a45a1603
Need to revoke leadership to clean up in case there was a failure during leadership establishment
2018-02-20 12:52:00 -08:00
Alex Dadgar
040599dae9
Fix leaking time.After function
2018-02-20 12:47:43 -08:00
Alex Dadgar
9a54abd3a8
timers
2018-02-20 10:23:11 -08:00
Alex Dadgar
601177c250
Add escape hatches when non-leader
2018-02-20 10:22:15 -08:00
Alex Dadgar
ab57db1fad
Increase maximum ACL token length
...
This mitigates issues when generating Nomad ACL tokens from Vault.
2018-02-20 09:52:40 -08:00
Alex Dadgar
e916940cfb
vet
2018-02-15 17:08:58 -08:00
Alex Dadgar
6810c66bd8
Fix autopilot tests
2018-02-15 15:48:32 -08:00
Alex Dadgar
f9fd1ce98c
fix unknown rpc tests
2018-02-15 15:29:31 -08:00
Alex Dadgar
a1faab0e58
Server TLS
2018-02-15 15:03:12 -08:00
Alex Dadgar
5b9806590b
add logging
2018-02-15 13:59:03 -08:00
Alex Dadgar
4c60a7ea40
improve test
2018-02-15 13:59:03 -08:00
Alex Dadgar
a8908ad380
Fix incorrect deletion of node conn
...
This PR fixes an issue where if the client has multiple connections to a
server, a single connection closing would cause the routing to the node
to be lost.
2018-02-15 13:59:03 -08:00
Alex Dadgar
0e85ae77b4
fix flaky gc tests
2018-02-15 13:59:03 -08:00
Alex Dadgar
38b695b69c
feedback and rebasing
2018-02-15 13:59:03 -08:00
Alex Dadgar
c5e9ebb656
Use helper for forwarding
2018-02-15 13:59:03 -08:00
Alex Dadgar
9117ef4650
HTTP agent
2018-02-15 13:59:03 -08:00
Alex Dadgar
d7029965ca
Server side impl + touch ups
2018-02-15 13:59:02 -08:00
Alex Dadgar
e685211892
Code review feedback
2018-02-15 13:59:02 -08:00
Alex Dadgar
317485e4f7
Streaming helper
2018-02-15 13:59:02 -08:00
Alex Dadgar
dc75501c69
Respond to comments
2018-02-15 13:59:02 -08:00
Alex Dadgar
64ad3119d0
Implement MultiplexV2 RPC handling
...
Implements and tests the V2 multiplexer. This will not be used until
several versions of Nomad have been released to mitigate upgrade
concerns.
2018-02-15 13:59:02 -08:00
Alex Dadgar
cea77df6a7
Add Streaming RPC ack
...
This PR introduces an ack allowing the receiving end of the streaming
RPC to return any error that may have occured during the establishment
of the streaming RPC.
2018-02-15 13:59:02 -08:00
Alex Dadgar
2f9d33f479
vet
2018-02-15 13:59:02 -08:00
Alex Dadgar
6b74c8b49e
move error
2018-02-15 13:59:02 -08:00
Alex Dadgar
be081b461f
Server implementation of stream
2018-02-15 13:59:02 -08:00
Alex Dadgar
ce3674ea17
Server stat/list impl
2018-02-15 13:59:02 -08:00
Alex Dadgar
8854b35b34
Agent logs
2018-02-15 13:59:02 -08:00
Alex Dadgar
857b0ab6c7
client tests
2018-02-15 13:59:02 -08:00
Alex Dadgar
69def2ff22
Server tests of logs
2018-02-15 13:59:02 -08:00
Alex Dadgar
6c1fa878ea
Forwarding
2018-02-15 13:59:02 -08:00
Alex Dadgar
c6827dc63d
Refactor client RPCs from server
2018-02-15 13:59:02 -08:00
Alex Dadgar
9479cb7f25
Remove logging
2018-02-15 13:59:01 -08:00
Alex Dadgar
ddd67f5f11
Server streaming
2018-02-15 13:59:01 -08:00
Alex Dadgar
ca9379be09
Logs over RPC w/ lots to touch up
2018-02-15 13:59:01 -08:00
Alex Dadgar
2c0ad26374
New RPC Modes and basic setup for streaming RPC handlers
2018-02-15 13:59:01 -08:00
Alex Dadgar
b5037f20db
Remove circular dependency
2018-02-15 13:59:01 -08:00
Alex Dadgar
3f786b904b
use server manager
2018-02-15 13:59:01 -08:00
Alex Dadgar
63d8b42620
code review
2018-02-15 13:59:01 -08:00
Alex Dadgar
46770d57e5
Forwarding
2018-02-15 13:59:01 -08:00
Alex Dadgar
401a510643
Add RPC for querying for Node connections
2018-02-15 13:59:01 -08:00
Alex Dadgar
cfe9afc567
Store connection time
2018-02-15 13:59:01 -08:00
Alex Dadgar
4e1cb1d96e
Test RPC from server
2018-02-15 13:59:00 -08:00
Alex Dadgar
6dd1c9f49d
Refactor
2018-02-15 13:59:00 -08:00
Alex Dadgar
a6dfffa4fa
Add testing interfaces
2018-02-15 13:59:00 -08:00
Alex Dadgar
ad7bc0c6bd
Server can forward ClientStats.Stats
2018-02-15 13:59:00 -08:00
Alex Dadgar
940a2df8a1
Pull inmem codec to helper
2018-02-15 13:59:00 -08:00
Alex Dadgar
7a23659ea8
Conn Pool can emit new connections to listeners.
...
This PR enables the client to listen for new connections and then bind
an RPC listener to each connection in an upcoming PR.
2018-02-15 13:59:00 -08:00
Alex Dadgar
8058ab039f
Store the whole verified certificate chain
2018-02-15 13:59:00 -08:00
Alex Dadgar
13bbf3fbbb
Track client connections
2018-02-15 13:59:00 -08:00
Alex Dadgar
4243438661
Improve TLS cluster testing
2018-02-15 13:59:00 -08:00
Alex Dadgar
ba5ecb8c1a
Dynamic RPC servers with context
2018-02-15 13:59:00 -08:00
Alex Dadgar
288b3c0e05
Helper to populate RPC server endpoints
2018-02-15 13:59:00 -08:00
Kyle Havlovitz
54b691f538
Merge pull request #3852 from hashicorp/autopilot-cleanup
...
Clean up some leftover autopilot differences from Consul
2018-02-14 10:42:32 -08:00
Kyle Havlovitz
709b693d39
Clean up some leftover autopilot differences from Consul
2018-02-08 10:27:26 -08:00
Preetha Appan
8ac05d4462
Reuse default policy structs in api, and other code review feedback
2018-01-31 16:33:00 -06:00
Preetha Appan
2a5df68e9a
Change the default mode for client side restarts to fail from delay
2018-01-31 10:39:11 -06:00
Preetha Appan
8ecb6ca91b
Code review feedback and more test cases
2018-01-31 09:58:05 -06:00
Preetha Appan
28d2439810
Consider dead job status and modify unit test setup for correctness
2018-01-31 09:58:05 -06:00
Preetha Appan
4fd2691323
Use next alloc id being set, move outside structs package and other code review feedback
2018-01-31 09:58:05 -06:00
Preetha Appan
009df8b986
Unit test for alloc struct's GCEligible method
2018-01-31 09:58:05 -06:00
Preetha Appan
5a4c913879
Make garbage collection be aware of rescheduling info in allocations
2018-01-31 09:58:05 -06:00
Preetha Appan
4cad96a1c3
Remove unnecessary newlines
2018-01-31 09:58:05 -06:00
Preetha Appan
d016cbdf7b
Unit test for alloc struct's GCEligible method
2018-01-31 09:58:05 -06:00
Preetha Appan
dd91a2f5be
Make garbage collection be aware of rescheduling info in allocations
2018-01-31 09:58:05 -06: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
5f501f632b
s/assert/require/g
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
57e20b6399
Fix flaky test that fails when there is CPU contention
2018-01-31 09:56:53 -06:00
Preetha Appan
0c56a12a77
Add RescheduleTracker to allocations API struct
2018-01-31 09:56:53 -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
ea4a889e28
Address more code review feedback
2018-01-31 09:56:53 -06:00
Preetha Appan
031c566ada
Reschedule previous allocs and track their reschedule attempts
2018-01-31 09:56:53 -06:00
Preetha Appan
6fcd9f67a8
Named fields in unit test and one more test case
2018-01-31 09:56:53 -06:00
Preetha Appan
5ee3cdecc5
Clean up the copy method + unit test
2018-01-31 09:56:53 -06:00
Preetha Appan
8408835af8
Wrap reschedule events in another struct and other review feedback
2018-01-31 09:56:53 -06:00
Preetha Appan
0a39f213e3
Export RescheduleEligible method for accessibility from UpdateAlloc endpoint
2018-01-31 09:56:53 -06:00
Preetha Appan
e2eabffcbd
Add comment
2018-01-31 09:56:53 -06:00
Preetha Appan
28364331cc
New structs and methods for reschedule policy, reschedule tracking and unit tests
2018-01-31 09:56:53 -06:00
Kyle Havlovitz
cb2321353c
Merge pull request #3812 from hashicorp/autopilot-config-change
...
Refactor redundancy_zone/upgrade_version out of client meta
2018-01-30 16:14:26 -08:00
Kyle Havlovitz
0eb0acacdc
Fix remaining issues with autopilot change
2018-01-30 15:21:28 -08:00
Kyle Havlovitz
2ccf565bf6
Refactor redundancy_zone/upgrade_version out of client meta
2018-01-29 20:03:38 -08:00
Alex Dadgar
31e212f467
Merge pull request #3684 from jrasell/f_gh_3678
...
Update `node-status` verbose command to include node address.
2018-01-29 15:32:14 -08:00
Preetha Appan
288ff0b6f0
Add test case to verify setting next alloc id correctly
2018-01-24 17:55:29 -06:00
Preetha Appan
fd2fbefa4c
Add a field to track the next allocation during a replacement
2018-01-24 17:55:05 -06:00
Kyle Havlovitz
a162b9ce14
Move server health loop into autopilot leader actions
2018-01-23 12:57:02 -08:00
Chelsea Komlo
d09cc2a69f
Merge pull request #3492 from hashicorp/f-client-tls-reload
...
Client/Server TLS dynamic reload
2018-01-23 05:51:32 -05:00
Michael Schurter
694b547a6b
Merge pull request #3682 from hashicorp/b-3681-always-set-driver-ip
...
Always advertise driver IP when in driver mode
2018-01-22 16:41:34 -08:00
Chelsea Holland Komlo
7d3c240871
swap raft layer tls wrapper
2018-01-19 17:00:15 -05:00
Michael Schurter
8a0cf66822
Improve invalid port error message for services
...
Related to #3681
If a user specifies an invalid port *label* when using
address_mode=driver they'll get an error message about the label being
an invalid number which is very confusing.
I also added a bunch of testing around Service.AddressMode validation
since I was concerned by the linked issue that there were cases I was
missing. Unfortunately when address_mode=driver is used there's only so
much validation that can be done as structs/structs.go validation never
peeks into the driver config which would be needed to verify the port
labels/map.
2018-01-18 15:35:24 -08:00
Kyle Havlovitz
8d41f4ad40
Formatting/test adjustments
2018-01-18 15:03:35 -08:00
Kyle Havlovitz
12ff22ea70
Merge branch 'master' into autopilot
2018-01-18 13:29:25 -08:00
Chelsea Holland Komlo
a8f655fbb3
allow for similar error messages for closed connections
2018-01-17 12:02:40 -05:00
Chelsea Holland Komlo
35466a331a
fixing up raft reload tests
...
close second goroutine in raft-net
2018-01-17 10:29:15 -05:00
Kyle Havlovitz
bc385bcc93
Fix comments/text referring to consul
2018-01-17 00:20:13 -08:00
Kyle Havlovitz
7b980c42d8
Add raft remove by id endpoint/command
2018-01-16 13:35:32 -08:00
Chelsea Holland Komlo
5f52e8e103
feedback from code review
2018-01-16 11:55:11 -05:00
Chelsea Holland Komlo
649f86f094
refactor creating a new tls configuration
2018-01-16 08:02:39 -05:00
James Rasell
2e6af96eec
Use advertise addr not 'unique.network.ip' in verbose node-status
2018-01-11 07:17:58 +00:00
Charlie Voiselle
1bb1ab5069
fix typo
...
Priviledge -> privilege
2018-01-08 15:56:07 -05:00
Chelsea Holland Komlo
214d128eb9
reload raft transport layer
...
fix up linting
2018-01-08 14:52:28 -05:00
Chelsea Holland Komlo
0708d34135
call reload on agent, client, and server separately
2018-01-08 09:56:31 -05:00
Chelsea Holland Komlo
3f34b59ee6
remove unnecessary nil checks; default case
...
add tests for TLSConfig object
2018-01-08 09:24:28 -05:00
Chelsea Holland Komlo
d9ec538d6a
don't ignore error in http reloading
...
code review feedback
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
909bb0af07
refactor rpc listener methods, wait for proper shutdown
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
6a2432659a
code review fixups
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
9741097406
reloading tls config should be atomic for clients/servers
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
e7bd156ef2
check error on generating tls context
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
9b0a7a7f7c
remove code duplication
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
4e0dbd23cf
prevent races when reloading, fully shut down raft
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
ae7fc4695e
fixups from code review
...
Revert "close raft long-lived connections"
This reverts commit 3ffda28206fcb3d63ad117fd1d27ae6f832b6625.
reload raft connections on changing tls
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
dfb6a3d9a8
close raft long-lived connections
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
acd3d1b162
fix up downgrading client to plaintext
...
add locks around changing server configuration
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
c0ad9a4627
add ability to upgrade/downgrade nomad agents tls configurations via sighup
2018-01-08 09:21:06 -05:00
Conchubhar Gannon
5847b3eb79
fix(minor typo)
2018-01-08 11:30:00 +00:00
Preetha Appan
fcded9ba61
Add a TODO comment around handling peer address for remove peer correctly for raft protocol 3
2018-01-05 14:22:45 -06:00
Alex Dadgar
6b748fef9e
Remove consul log line
2018-01-04 15:08:12 -08:00
Alex Dadgar
2f561609b7
Fix detection of successful batch allocations
...
This PR restores older behavior of detecting successful batch
allocations (04d86ffd1006fde9dfb2ca8c1237fe60b995b0e3). This has the
side effect that we correctly filter desired status stop but not
successful batch allocations and create their replacements.
2018-01-04 14:20:32 -08:00
Michael Schurter
8496cc8192
Merge pull request #3685 from filipochnik/abs-path
...
Prevent absolute URLs in checks paths
2018-01-04 10:55:36 -08:00
Preetha
1712b03705
Merge branch 'master' into 0.8
2018-01-03 16:06:38 -06:00
Fabian Holler
f99aaa9134
revert change to increase min. CPU resource value from 20 to 100
...
In the commit 622d3ddb92ea7e656ef831641c02024cb5a5d6d1
"Fixed test and moved constants into standalone func" the minimum CPU
resource value for a job was increased from 100 to 20.
This can break the nomad setup for people that used lower CPU
values and are at the maximum MHz value of the available CPU on a
machine.
Change the minimum back to 20 MHz to ensure downwards compatibility.
2018-01-02 16:09:44 +01:00
Filip Ochnik
fc99d3fc2d
Prevent absolute URLs in checks paths
2017-12-21 10:32:12 +01:00
James Rasell
45e8f977f7
Update node-status
verbose command to include node address.
...
This change updates the `nomad node-status -verbose` command to
also include the addreess of the node. This is helpful for cluster
administrators to quickly discover information and access nodes
when required.
2017-12-21 08:58:35 +00:00
Chelsea Holland Komlo
940bc59790
Fixes #3679
...
code review fixups; add changelog
2017-12-20 17:58:07 -05:00
Chelsea Holland Komlo
24c56e3976
search endpoint forwarding
2017-12-20 17:57:28 -05:00
Alex Dadgar
bfc62ae41c
bump version and remove generated structs
2017-12-19 17:10:52 -08:00
Alex Dadgar
f0127afd93
generated files
2017-12-19 16:57:34 -08:00
Michael Schurter
5d65eba2e6
Strip mocked dynamic port for fsm test
2017-12-19 16:41:35 -08:00
Michael Schurter
714eb0b266
Services should not require a port
...
Fixes #3673
2017-12-19 15:50:23 -08:00
Preetha Appan
d788c0464c
Clean up error logging
2017-12-18 17:56:12 -06:00
Alex Dadgar
1791cc3ca5
Handle upgrade path
2017-12-18 15:51:35 -08:00
Kyle Havlovitz
1c07066064
Add autopilot functionality based on Consul's autopilot
2017-12-18 14:29:41 -08:00
Preetha Appan
40cb1d327c
Address some code review comments
2017-12-18 15:22:23 -06:00
Preetha Appan
51bd0b59c7
Return an error if evaluation doesn't exist in state store at plan apply time.
2017-12-18 14:55:36 -06:00
Preetha Appan
3c36abfe14
Update eval modify index as part of plan apply.
2017-12-18 10:03:55 -06:00
Preetha Appan
3b4d7ac2a3
Fix some typos
2017-12-14 13:29:27 -06:00
Kyle Havlovitz
045f346293
Use region instead of datacenter for version checking
2017-12-12 10:17:16 -06:00
Kyle Havlovitz
f088446d48
Add missing exist checks and doc line
2017-12-12 10:17:16 -06:00
Kyle Havlovitz
b775fc7b33
Added support for v2 raft APIs and -raft-protocol option
2017-12-12 10:17:16 -06:00
Alex Dadgar
d61ade8f02
remove generated structs
2017-12-11 17:51:41 -08:00
Alex Dadgar
8e63d545c4
generated assets
2017-12-11 17:30:37 -08:00
Chelsea Holland Komlo
5951222ccb
fix for rpc_upgrade_mode
2017-12-11 19:23:45 -05:00
Alex Dadgar
86608124ca
Fix followers not creating periodic launch
...
Fix an issue in which periodic launches wouldn't be made on followers.
2017-12-11 13:55:17 -08:00
Michael Schurter
2dca0671b7
Lowercase service IDs to prevent eye bleeding
2017-12-08 15:54:04 -08:00
Michael Schurter
45494f7304
Fix port labels on mock Alloc/Job/Node
2017-12-08 14:50:06 -08:00
Michael Schurter
0d8995fb83
Improve validation and testing of service/check ports
2017-12-08 13:52:23 -08:00
Michael Schurter
d613e0aaf5
Move service hash logic to Service.Hash method
2017-12-08 12:03:43 -08:00
Michael Schurter
b71edf846f
Hash fields used in task service IDs
...
Fixes #3620
Previously we concatenated tags into task service IDs. This could break
deregistration of tag names that contained double //s like some Fabio
tags.
This change breaks service ID backward compatibility so on upgrade all
users services and checks will be removed and re-added with new IDs.
This change has the side effect of including all service fields in the
ID's hash, so we no longer have to track PortLabel and AddressMode
changes independently.
2017-12-08 12:03:43 -08:00
Michael Schurter
af8964e896
Improve port label validation and diff testing
2017-12-08 12:03:43 -08:00
Michael Schurter
4b20441eef
Validate port label for host address mode
...
Also skip getting an address for script checks which don't use them.
Fixed a weird invalid reserved port in a TaskRunner test helper as well
as a problem with our mock Alloc/Job. Hopefully the latter doesn't cause
other tests to fail, but we were referencing an invalid PortLabel and
just not catching it before.
2017-12-08 12:03:43 -08:00
Michael Schurter
4ae115dc59
Allow custom ports for services and checks
...
Fixes #3380
Adds address_mode to checks (but no auto) and allows services and checks
to set literal port numbers when using address_mode=driver.
This allows SDNs, overlays, etc to advertise internal and host addresses
as well as do checks against either.
2017-12-08 12:03:00 -08:00
Chelsea Holland Komlo
3f231a0856
add test for kill signal in required signals
...
update changelog
2017-12-07 11:40:15 -05:00
Chelsea Holland Komlo
2f22442370
use assert library
2017-12-06 15:03:02 -05:00
Chelsea Holland Komlo
b08611cfac
move kill_signal to task level, extend to docker
2017-12-06 14:36:39 -05:00
Thomas Bartelmess
9acfa166c0
Changed Superset to only return the resource name
...
The Superset method on Resources used to return a string in the format of “[resource name] exhausted”.
This was leading to the output in plan/create job API DimensionExhausted to return keys like
```
"DimensionExhausted": {"cpu exhausted": 1}
```
This was not anywhere documented, however, one of the examples on the website showed it like this.
The other side effect of this is that the CLI formats the strings from the name of the key leading to output like
```
* Dimension "cpu exhausted" exhausted on 1 nodes
```
2017-11-28 23:16:08 -05:00
Thomas Bartelmess
60e4c777ac
Fixed error messges for MeetsMinResources
2017-11-28 19:44:33 -05:00
Preetha Appan
8e01dc27a3
Use request namespace in Register method
2017-11-20 17:12:13 -06:00
Charlie Voiselle
679e49448e
Changed permission check to requested namespace
...
Original code checked to see if the user had submit-job on the default namespace.
2017-11-20 15:00:24 -05:00
Preetha
785a1a3fcc
Merge pull request #3569 from iconara/patch-2
...
Fix error messages for transitioning jobs to/from periodic
2017-11-20 07:57:36 -06:00
Preetha
ff23499145
Shorter comment for SetEventDisplayMessage
2017-11-18 09:30:50 -06:00
Theo Hultberg
5a6984693f
Fix error messages for transitioning jobs to/from periodic
...
The error messages are flipped; when you transition a job from _not_ being periodic to being periodic you get the message "cannot update periodic job to being non-periodic", and vice versa.
2017-11-18 11:50:52 +01:00
Preetha Appan
3592635ede
Populate DisplayMessage in various http endpoints that return allocations, plus unit tests.
2017-11-17 14:53:26 -06:00
Preetha Appan
1c4375163a
Change error message to use original name for clarity, rather than the name after substituting env vars with placeholder.
2017-11-17 08:44:18 -06:00
Preetha Appan
d3110f21bd
Changes service name validation logic to ignore any environment variables first.
2017-11-15 15:35:43 -06:00
Chelsea Komlo
2dfda33703
Nomad agent reload TLS configuration on SIGHUP ( #3479 )
...
* Allow server TLS configuration to be reloaded via SIGHUP
* dynamic tls reloading for nomad agents
* code cleanup and refactoring
* ensure keyloader is initialized, add comments
* allow downgrading from TLS
* initalize keyloader if necessary
* integration test for tls reload
* fix up test to assert success on reloaded TLS configuration
* failure in loading a new TLS config should remain at current
Reload only the config if agent is already using TLS
* reload agent configuration before specific server/client
lock keyloader before loading/caching a new certificate
* introduce a get-or-set method for keyloader
* fixups from code review
* fix up linting errors
* fixups from code review
* add lock for config updates; improve copy of tls config
* GetCertificate only reloads certificates dynamically for the server
* config updates/copies should be on agent
* improve http integration test
* simplify agent reloading storing a local copy of config
* reuse the same keyloader when reloading
* Test that server and client get reloaded but keep keyloader
* Keyloader exposes GetClientCertificate as well for outgoing connections
* Fix spelling
* correct changelog style
2017-11-14 17:53:23 -08:00
Preetha
0e6484a397
Merge pull request #3536 from angrycub/b-resource-memory-test-fix
...
Fixed test and moved constants into standalone func
2017-11-13 17:00:14 -06:00
Charlie Voiselle
eda764c0ca
Review feedback + re-add dropped import
2017-11-13 12:51:19 -05:00
Charlie Voiselle
4b186861a9
gofmt and goimports nomad/structs/structs.go
2017-11-13 12:32:52 -05:00
Preetha Appan
be5fd87b9a
Fixes bug with display message logic due to deprecating GenericSource. Also added more test cases to cover a bunch more edge cases
2017-11-13 11:14:57 -06:00
Charlie Voiselle
26acd7f025
Fixed test and moved constants into standalone func
...
In #3520 , work was done to true up the defaults for Nomad resource
stanzas with the documentation. This fixes the tests that I
accidentally broke in the process. Some questions were raised about
using dynamic elements as part of expects, which is why I opted to
copy the MinResources pattern. During this refactor I also noticed
that structs.go had a similar issue and an inconsistent minium for CPU.
2017-11-13 12:05:30 -05:00
Preetha
0d0804d6ff
Merge pull request #3496 from hashicorp/b-auto-revert-stable
...
Makes auto reverts robust against infinite revert cycles
2017-11-03 17:28:28 -05:00
Preetha Appan
6468883cd1
Adds comment to handleRollbackValidity method and other small test readability fixes.
2017-11-03 17:05:15 -05:00
Preetha Appan
7526853b4b
Added more unit tests for testing rollback when job has identical spec to AllocHealth and DeploymentStatus endpoints.
2017-11-03 16:07:06 -05:00
Preetha Appan
b9f44c0ae0
Check that job version doesn't change when rollback does not occur due to identical spec
2017-11-03 15:46:37 -05:00
Alex Dadgar
2c587fd67b
Merge pull request #3402 from hashicorp/leader-loop
...
Applies leader loop fixes from Consul.
2017-11-03 13:40:59 -07:00
Preetha Appan
317fbf04b1
Adds SpecChanged check to alloc health and fail deployment end points, and other code review comments.
2017-11-03 15:33:34 -05:00
Preetha Appan
97474a1521
Clarify comment about infinite revert cycles
2017-11-03 14:25:14 -05:00
Preetha Appan
0eaef09675
Remove event GenericSource, and address other code review comments. Also added deprecation info in comments.
2017-11-03 10:10:06 -05:00
Preetha Appan
1a864dd7e8
Revert unintentional change to plan_apply.go during rebase
2017-11-03 09:13:01 -05:00
Preetha Appan
797af051b8
Address some code review comments
2017-11-03 09:13:01 -05:00
Preetha Appan
b86c5a99b1
Unit test for PopulateEventDisplayMessage
2017-11-03 09:13:01 -05:00
Preetha Appan
7672535290
Added explanatory comment
2017-11-03 09:13:01 -05:00
Preetha Appan
5f09c968b3
Move logic for determinic event display message to task_runner, added two new fields DisplayMessage and Details.
2017-11-03 09:13:01 -05:00
Preetha Appan
5b94a1ab45
Add ModifyTime to Allocation and update it both on plan applies and client initiated updates
2017-11-03 09:13:01 -05:00
Preetha Appan
b5e7985461
Remove extra newline
2017-11-03 08:15:11 -05:00
Preetha Appan
abbe4103d1
Update rollback test to add a spec change, and add new test for rollback failed status
2017-11-02 19:53:27 -05:00
Preetha Appan
5505391663
Fixes auto revert to check if the job's spec has changed before reverting. This prevents infinite reverting when reverting to a job version that was previously stable, but not so after attempting a revert.
2017-11-02 19:53:27 -05:00
Preetha
2f67e839c1
Merge pull request #3484 from hashicorp/b-nomad-0.7.1
...
merge nomad 0.7.1 branch
2017-11-01 16:50:37 -05:00
Chelsea Holland Komlo
bf90176278
connection receives only EOF
2017-11-01 15:21:05 -05:00
Chelsea Holland Komlo
e348deecf5
fixups from code review
2017-11-01 15:21:05 -05:00
Chelsea Holland Komlo
afe9f9a714
add rpc_upgrade_mode as config option for tls upgrades
2017-11-01 15:19:52 -05:00
Preetha Appan
f483e81ffe
Fix node end point test that was failing compilation
2017-11-01 15:16:38 -05:00
Diptanu Choudhury
5a0edf646b
Resetting the timer at the beginning of the loop
2017-11-01 13:15:06 -07:00
Diptanu Choudhury
46bc4280b2
Adding support for tagged metrics
2017-11-01 13:15:06 -07:00
Diptanu Choudhury
d4128f0e5a
Setting the default stats collection interval
2017-11-01 13:15:06 -07:00
Diptanu Choudhury
524a1f0712
Publishing metrics for job summary
2017-11-01 13:15:06 -07: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
51c87ec858
bump version and remove generated
2017-11-01 10:02:25 -07:00
Alex Dadgar
11c24e90a1
generated
2017-11-01 09:42:18 -07:00
Alex Dadgar
51f869040f
remove generated structs
2017-10-31 13:50:16 -07: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
635f320b18
Merge pull request #3452 from hashicorp/f-system-gc
...
GetClientAllocs handles garbage collection events
2017-10-27 09:50:55 -07:00
Alex Dadgar
7df78be840
Changelog + assert
2017-10-27 09:50:10 -07:00
Alex Dadgar
5d9db4c2df
Bypass status checks for system, periodic, parameterized jobs
2017-10-27 09:34:50 -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
Alex Dadgar
593d4ceb45
generated code
2017-10-25 17:34:24 -07:00
Alex Dadgar
99496b2de3
Merge pull request #3431 from hashicorp/b-core-gc
...
Fix garbage collecting nodes/jobs when using ACLs
2017-10-25 16:30:26 -07:00
Alex Dadgar
3327dc8d2d
Merge pull request #3434 from hashicorp/f-flaky
...
Fix flaky tests
2017-10-25 10:49:54 -07:00
Alex Dadgar
f4aa5ea0c7
lax timing
2017-10-24 10:58:06 -07:00
Alex Dadgar
cb0d0ef009
move to consul freeport implementation
2017-10-23 16:51:40 -07:00
Alex Dadgar
10a07c525f
fix flaky vault test
2017-10-23 16:48:20 -07:00
Alex Dadgar
1d6cdfbdc3
lax timing
2017-10-23 16:48:20 -07:00
Alex Dadgar
9f91ce64f6
Fix some flaky tests
2017-10-23 16:48:20 -07:00
Alex Dadgar
dbc014b360
Standardize retrieving a free port into a helper package
2017-10-23 16:48:20 -07:00
Alex Dadgar
ae6be0dac7
spelling mistake
2017-10-23 15:12:45 -07:00
Alex Dadgar
794daefa5e
clear the token
2017-10-23 15:11:13 -07:00
Alex Dadgar
d3e119f4d0
thread leader token through core gc and test
2017-10-23 15:04:00 -07:00
Alex Dadgar
5c34af1ee1
leader acl token
2017-10-23 14:10:14 -07:00
Alex Dadgar
1192385c63
Lax blocking query test timing
2017-10-20 13:07:17 -07:00
Alex Dadgar
e7299676f6
generated
2017-10-19 15:20:39 -07:00
James Phillips
9a5651e83a
Applies leader loop fixes from Consul.
...
There was a deadlock issue we fixed under https://github.com/hashicorp/consul/issues/3230 ,
and then discovered an issue with under https://github.com/hashicorp/consul/issues/3545 . This
PR ports over those fixes, as well as makes the revoke actions only happen if leadership was
established. This brings the Nomad leader loop inline with Consul's.
2017-10-16 22:01:49 -07:00
Chelsea Komlo
1ccc1f79f6
Merge pull request #3393 from hashicorp/b-delete-nonexistent-tokens
...
Return error if tokens cannot be deleted because they do not exist
2017-10-16 18:36:41 -04:00
Alex Dadgar
be053364ba
no namespaces in oss test
2017-10-16 14:21:29 -07:00
Chelsea Holland Komlo
a8becb96c0
review feedback
2017-10-16 17:14:48 -04:00
Chelsea Holland Komlo
2377d97d51
return error if tokens cannot be deleted because they do not exist
2017-10-16 17:14:48 -04:00
Alex Dadgar
c3f06b2134
Merge pull request #3384 from hashicorp/f-self-policies
...
Ability to introspect self token
2017-10-13 17:11:22 -07:00
Alex Dadgar
c559f6652f
Merge pull request #3386 from hashicorp/f-sync
...
sync
2017-10-13 15:32:58 -07:00
Alex Dadgar
c1cc51dbee
sync
2017-10-13 14:36:02 -07:00
Michael Schurter
b63eee17e9
Merge pull request #3383 from hashicorp/b-migrate-token
...
base64 migrate token
2017-10-13 13:46:54 -07:00
Alex Dadgar
5d4f467519
ListPolicies and GetPolicy work w/o management token
2017-10-13 13:12:20 -07:00
Michael Schurter
dfd2967cdb
Merge pull request #3376 from hashicorp/f-node-acls
...
Allow Node.SecretID for Node.GetNode and Allocs.GetAlloc
2017-10-13 11:51:48 -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
6a1a509ea5
Fix Request.SecretID -> Request.AuthToken
2017-10-13 09:56:56 -07:00
Michael Schurter
021b4c1ae9
Fix AuthToken use on Node.GetAllocs
2017-10-12 17:12:41 -07:00
Michael Schurter
15b3df0b80
Merge pull request #3374 from hashicorp/f-auth-token
...
SecretID -> AuthToken
2017-10-12 16:57:49 -07:00
Michael Schurter
ab7b6d1315
Allow Node.SecretID for GetNode and GetAlloc
2017-10-12 16:27:33 -07:00
Michael Schurter
a003e3dd43
Add StateStore.NodeBySecretID
2017-10-12 15:27:29 -07:00
Michael Schurter
51bce7b1a3
Add index to Node.SecretID
2017-10-12 15:21:20 -07:00
Michael Schurter
84d8a51be1
SecretID -> AuthToken
2017-10-12 15:16:33 -07:00
Alex Dadgar
e7e18c931c
Fix sorting of job versions
...
Fixes an issue in which the versions were improperly sorted which would
cause pruning of the wrong job version. This essentially meant that job
versions above 255 would be dropped from the job version table (note
this was due to the prefix walk crossing from the 1-byte to 2-byte
threshold).
Fixes https://github.com/hashicorp/nomad/issues/3357
2017-10-12 13:33:55 -07:00
Michael Schurter
e9c17c56d1
Merge pull request #3353 from hashicorp/f-acl-prefix-search
...
Prefix Search ACL enforcement
2017-10-11 20:26:03 -07:00
Alex Dadgar
d34c6e0135
fix test
2017-10-11 18:08:37 -07:00
Michael Schurter
2673481a48
Refactor permissions checks into funcs
...
funcs are in the _oss file to ease creating Enterprise versions which
support Quotas and Namespaces.
2017-10-11 18:05:27 -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
b018ca4d46
fixing up code review comments
2017-10-11 17:09:20 -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
be69374ecd
Prefix Search ACL enforcement
2017-10-11 17:00:12 -07:00
Michael Schurter
d82db5ab45
Merge pull request #3351 from hashicorp/f-acl-system
...
System ACL enforcement
2017-10-11 16:32:50 -07:00
Michael Schurter
51fe1d8f73
Merge pull request #3350 from hashicorp/f-acl-status-members
...
Status.Members ACL enforcement
2017-10-11 16:32:25 -07:00
Michael Schurter
8c1a97765e
Merge pull request #3339 from hashicorp/f-acl-force-periodic
...
Force Periodic ACL enforcement
2017-10-11 16:26:29 -07:00
Michael Schurter
0d27053aab
Operator ACL enforcement
2017-10-10 15:18:19 -07:00
Michael Schurter
0cf7a3950b
Force Periodic ACL enforcement
2017-10-10 15:16:41 -07:00
Michael Schurter
4e005d4753
System ACL enforcement
...
Enforce ACL for System.GarbageCollect and System.ReconcileJobSummaries
RPC endpoints.
2017-10-10 10:53:10 -07:00
Michael Schurter
de767ffa04
Status.Members ACL enforcement
...
Was incorrectly checked on the HTTP API before. Moved to RPC endpoint.
2017-10-10 10:36:54 -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
492c861419
/v1/client/agent/* ACL enforcement
2017-10-09 12:18:54 -07:00
Michael Schurter
57ff12432b
Move acl helpers from nomad/ into nomad/mock
...
They're useful in command/agent/ tests.
2017-10-06 14:50:06 -07:00
Michael Schurter
4acff9c2bd
Support AnonymousACLToken in GetPolicies
2017-10-06 14:35:14 -07:00
Chelsea Komlo
7c8a5228d4
Merge pull request #3290 from hashicorp/f-acl-job-dispatch
...
Add ACL for dispatch job
2017-10-06 13:33:21 -04:00
Michael Schurter
22169a7cd4
Eval.Allocations ACL enforcement
2017-10-03 14:57:47 -07:00
Michael Schurter
b3db8f41fd
Eval.List ACL enforcement
2017-10-03 14:57:47 -07:00
Michael Schurter
fae1be5ab2
Eval.GetEval ACL enforcement
2017-10-03 14:57:47 -07:00
Michael Schurter
bd6418aa27
Deployment.Allocations ACL enforcement
2017-10-02 15:23:29 -07:00
Michael Schurter
08c82eb00f
Deployment.List ACL enforcement
2017-10-02 15:13:56 -07:00
Michael Schurter
60a7dc3c83
Deployment.SetAllocHealth ACL enforcement
2017-10-02 15:02:18 -07:00
Michael Schurter
c9d2c62d0b
Deployment.Promote ACL enforcement
2017-10-02 14:31:58 -07:00
Michael Schurter
0409a54f19
Deployment.Pause ACL enforcement
2017-10-02 14:25:32 -07:00
Michael Schurter
b888e49df4
Deployment.Fail ACL enforcement
2017-10-02 14:23:33 -07:00
Chelsea Komlo
97e34725e1
Merge pull request #3278 from hashicorp/f-acl-job-getjob
...
Add ACL for GetJob
2017-09-29 17:44:31 -04:00
Chelsea Komlo
388cdaa2e8
Merge pull request #3272 from hashicorp/f-acl-job-stable
...
Add ACL endpoint for Job Stable
2017-09-29 17:44:09 -04:00
Michael Schurter
efcc61a253
Merge pull request #3302 from hashicorp/b-remove-structs-from-api
...
Remove `structs` import from `api`
2017-09-29 11:39:43 -07:00
Michael Schurter
f1a8676ee4
Merge pull request #3298 from hashicorp/b-fix-check-restart-plan
...
Diff CheckRestart objects
2017-09-29 11:39:14 -07:00
Alex Dadgar
b772fb650e
Merge pull request #3293 from hashicorp/f-self-token
...
Allow querying self token
2017-09-29 10:54:37 -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
0e0ea82916
Test Check.Header add/removes
2017-09-28 17:08:43 -07:00
Alex Dadgar
fe491421a3
Fix empty map
2017-09-28 16:15:04 -07:00
Michael Schurter
f9b66cbb60
Diff CheckRestart objects
2017-09-28 14:06:18 -07:00
Chelsea Komlo
3a015016cc
Merge pull request #3294 from hashicorp/f-acl-job-deregister
...
Add ACL for job deregister
2017-09-28 10:57:51 -04:00
Chelsea Komlo
c54a4f7c91
Merge pull request #3291 from hashicorp/f-acl-get-job-versions
...
Add ACL for job endpoint GetJobVersions
2017-09-28 10:35:19 -04:00
Chelsea Holland Komlo
c242ac1431
job dispatch should have dispatch policy
2017-09-28 14:28:28 +00:00
Chelsea Komlo
77ae328fbe
Merge pull request #3276 from hashicorp/f-acl-job-evaluate
...
Add read job permissions to evaluate endpoint
2017-09-27 18:01:15 -04:00
Chelsea Holland Komlo
90adc4dbc9
add checks for error message
2017-09-27 21:35:03 +00:00
Chelsea Komlo
d3d1bc6498
Merge pull request #3279 from hashicorp/f-acl-job-allocations
...
Add ACL to job allocations endpoint
2017-09-27 16:57:04 -04:00
Chelsea Komlo
8f1c89c721
Merge pull request #3283 from hashicorp/f-acl-job-latest-deployment
...
Add ACL to latest job api
2017-09-27 16:54:44 -04:00
Alex Dadgar
765b030bec
Fixes
2017-09-27 13:42:56 -07:00
Alex Dadgar
14e6026938
Allow querying self token
...
This PR allows querying self ACL token when the SecretID is for the
AccessorID in question.
2017-09-27 13:00:58 -07:00
Chelsea Holland Komlo
1bab53c9fd
acl for job deregister
2017-09-27 19:21:10 +00:00
Chelsea Komlo
b40de659a7
Merge pull request #3281 from hashicorp/f-acl-job-evaluations
...
Add ACL for Job Evaluations endpoint
2017-09-27 15:15:35 -04:00
Chelsea Holland Komlo
36e3212012
add acl for job endpoint GetJobVersions
2017-09-27 17:29:08 +00:00
Chelsea Komlo
b2cb0129c8
Merge pull request #3282 from hashicorp/f-acl-job-deployments
...
Add ACL for job deployments endpoint
2017-09-27 12:42:25 -04:00
Chelsea Holland Komlo
0db1367d43
add acl for dispatch job
2017-09-27 16:33:49 +00:00
Chelsea Holland Komlo
c4ac20f852
fix up comment
2017-09-27 15:25:10 +00:00
Chelsea Holland Komlo
d9701fed37
fixups from code review
2017-09-27 15:23:38 +00:00
Chelsea Holland Komlo
0ba6a1df0d
fixups from code review
2017-09-27 15:20:18 +00:00
Chelsea Holland Komlo
4b90de992e
fixups from code review
2017-09-27 15:07:45 +00:00
Alex Dadgar
4173834231
Enable more linters
2017-09-26 15:26:33 -07:00
Chelsea Holland Komlo
f4b7451c62
add acl to lastest job api
2017-09-26 20:53:43 +00:00
Chelsea Holland Komlo
55c4ca187e
add acl for job deployments endpoint
2017-09-26 20:33:03 +00:00
Chelsea Holland Komlo
a7b7b3f6c6
add acl for Job Evaluations endpoint
2017-09-26 20:12:37 +00:00
Chelsea Holland Komlo
2fb7772c2c
add acl to job allocations endpoint
2017-09-26 18:01:23 +00:00
Chelsea Holland Komlo
d3e8b4812b
better test assertions
2017-09-26 17:41:53 +00:00
Chelsea Holland Komlo
f912619157
add ACL for GetJob endpoint
2017-09-26 17:38:03 +00:00
Chelsea Holland Komlo
5f467a84d3
add read job permissions to evaluate endpoint
2017-09-26 16:05:17 +00:00
Chelsea Holland Komlo
78f853e253
add ACL endpoint for Job Stable
2017-09-25 22:17:58 +00:00
Chelsea Holland Komlo
014dc2d7de
Add ACL for Revert Job endpoint
2017-09-25 21:51:19 +00:00
Chelsea Komlo
ddc979f459
Merge pull request #3266 from hashicorp/f-acl-job-validate
...
Add ACL for job validate endpoint
2017-09-25 14:09:02 -04:00
Alex Dadgar
73b7466a6e
Run deployment garbage collector on an interval
...
Fixes https://github.com/hashicorp/nomad/issues/3244
2017-09-25 11:04:40 -07:00
Chelsea Holland Komlo
18f4aa6fb3
fix type
2017-09-25 17:41:17 +00:00
Chelsea Holland Komlo
d9ac59f6b0
add acl for job validate endpoint
2017-09-25 17:34:02 +00:00
Alex Dadgar
828c4abc44
Fix upgrading from 0.6.x to 0.7.0
2017-09-19 10:28:14 -05:00
Alex Dadgar
e5ec915ac3
sync
2017-09-19 10:08:23 -05:00
Michael Schurter
f92ffe5af5
Merge pull request #3105 from hashicorp/f-876-restart-unhealthy
...
Restart unhealthy tasks
2017-09-17 19:38:32 -07:00
Chelsea Holland Komlo
fdf6120987
add acl token as meta flag
...
add API test for job ACL
2017-09-15 23:33:43 +00:00
Chelsea Komlo
16ef183ddf
Merge pull request #3219 from hashicorp/f-acl-job-list
...
Add job list ACL
2017-09-15 19:32:34 -04:00
Michael Schurter
c98b79dcb4
Test CheckRestart.Validate
2017-09-15 15:12:47 -07:00
Michael Schurter
816e7e544e
Filter Node.GetAllocs results by readable namespaces
2017-09-15 14:27:11 -07:00
Chelsea Holland Komlo
8727092e8e
add job list acl
2017-09-15 21:26:27 +00:00
Michael Schurter
1af9352403
Check for permission denied errors
2017-09-15 10:41:28 -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
369ab10405
Fix comments for Node ACL tests
2017-09-14 21:41:26 -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
Michael Schurter
41c05782b3
Add NodePolicy test helper
2017-09-14 20:33:12 -07:00
Michael Schurter
aca3bebb0a
Alloc.GetAlloc ACL enforcement
2017-09-14 17:44:57 -07:00
Michael Schurter
f5faf97650
Alloc.List ACL enforcement
2017-09-14 17:43:17 -07:00
Michael Schurter
573a0df03d
Watched -> TriggersRestart
...
Watched was a silly name
2017-09-14 16:48:39 -07:00
Michael Schurter
d299d42089
Canonicalize and Merge CheckRestart in api
2017-09-14 16:48:39 -07:00
Michael Schurter
ade29ecbed
Improve check watcher logging and add tests
...
Also expose a mock Consul Agent to allow testing ServiceClient and
checkWatcher from TaskRunner without actually talking to a real Consul.
2017-09-14 16:47:41 -07:00
Michael Schurter
a180c00fc3
on_warning=false -> ignore_warnings=false
...
Treat warnings as unhealthy by default
2017-09-14 16:46:54 -07:00
Michael Schurter
22690c5f4c
Add check watcher for restarting unhealthy tasks
2017-09-14 16:46:54 -07:00
Michael Schurter
b35d208428
Nest restart fields in CheckRestart
2017-09-14 16:46:54 -07:00
Michael Schurter
bf34505509
Add restart fields
2017-09-14 16:46:54 -07:00
Chelsea Komlo
3b857c5e8f
Merge pull request #3213 from hashicorp/f-acl-job-summary
...
Add job endpoint ACL
2017-09-14 18:21:19 -04:00
Alex Dadgar
3904bde9a3
Fix batch handling of complete allocs/node drains
...
This PR fixes:
* An issue in which a node-drain that contains a complete batch alloc
would cause a replacement
* An issue in which allocations with the same name during a scale
down/stop event wouldn't be properly stopped.
* An issue in which batch allocations from previous job versions may not
have been stopped properly.
Fixes https://github.com/hashicorp/nomad/issues/3210
2017-09-14 15:08:57 -07:00
Alex Dadgar
567eef50a8
Address feedback
2017-09-14 14:28:43 -07:00
Alex Dadgar
6911bd7676
Worker waits til max ModifyIndex across EvalsByJob
...
This PR fixes a scheduling race condition in which the plan results from
one invocation of the scheduler were not being considered by the next
since the Worker was not waiting for the correct index.
Fixes https://github.com/hashicorp/nomad/issues/3198
2017-09-14 14:28:43 -07:00
Chelsea Holland Komlo
be7efd71d4
fixups from code review
2017-09-14 20:14:38 +00:00
Chelsea Holland Komlo
0d28c95b6b
use separate response object
2017-09-14 19:17:05 +00:00
Chelsea Holland Komlo
79abb9810b
update to use ACL test helpers
2017-09-14 19:08:25 +00:00
Chelsea Holland Komlo
3eff2a06c5
add job endpoint ACL
2017-09-14 18:17:35 +00:00
Alex Dadgar
fa2dd57071
Merge pull request #3205 from hashicorp/f-deployment-acl
...
Deployment.GetDeployment ACL enforcement
2017-09-14 10:50:17 -07:00
Alex Dadgar
1e644393aa
review feeback
2017-09-14 10:50:04 -07:00
Alex Dadgar
9b997d2670
fix multierror merge
2017-09-13 21:48:52 -07:00
Alex Dadgar
0de4df881f
Merge pull request #3203 from hashicorp/b-search-hyphens
...
Fix UUID search with hyphens
2017-09-13 15:45:22 -07:00
Alex Dadgar
4b947222a8
Deployment.GetDeployment ACL enforcement
2017-09-13 11:44:23 -07:00
Alex Dadgar
54e04b5c0e
Merge pull request #3201 from hashicorp/b-periodic-restore
...
Fix restoration of stopped periodic jobs
2017-09-13 11:42:29 -07:00
Alex Dadgar
a2363e7583
sync acls
2017-09-13 11:38:29 -07:00
Alex Dadgar
fb67f76b7b
Fix UUID search with hyphens
...
This PR fixes:
* UUID lookup with hyphens and odd length. The math was wrong. There is
now a test that ranges over all possible values.
* Fixes an unreported issue that could be hit when a job has more than 4
hyphens in it as UUID lookup doesn't allow that.
Fixes https://github.com/hashicorp/nomad/issues/3141
2017-09-13 10:28:42 -07:00
Alex Dadgar
e3dbcdcb44
Fix restoration of stopped periodic jobs
...
This PR fixes an issue in which we would add a stopped periodic job to
the periodic launcher.
2017-09-12 14:25:40 -07:00
Alex Dadgar
5aa8f1a82e
pass in uid to codecgen
2017-09-11 15:40:27 -07:00
Armon Dadgar
3d5ecaafff
Address @dadgar feedback
2017-09-11 10:30:59 -07:00
Armon Dadgar
20a8e590a0
nomad: support ACL bootstrap reset
2017-09-10 16:03:30 -07:00
Alex Dadgar
d329fbe54d
Fix search contexts
2017-09-07 17:13:18 -07:00
Alex Dadgar
84d06f6abe
Sync namespace changes
2017-09-07 17:04:21 -07:00
Alex Dadgar
abfc56a871
WatchCtx propogates context error
2017-09-06 17:37:40 -07:00
Armon Dadgar
1c7fb1bfbb
Remove generated structs
2017-09-04 13:33:37 -07:00
Armon Dadgar
10500c39e5
nomad: fixing test
2017-09-04 13:21:01 -07:00
Armon Dadgar
e74ea8a152
nomad: use hashes for efficient token/policy diffing
2017-09-04 13:09:34 -07:00
Armon Dadgar
97404e3f8c
nomad: compute hash for ACL policies and tokens
2017-09-04 13:09:34 -07:00
Armon Dadgar
99c1001b2c
nomad: avoid replication consistency issues by setting MinQueryIndex
2017-09-04 13:07:44 -07:00
Armon Dadgar
b8bf35f087
ACL RPCs allow stale reads for scalability
2017-09-04 13:07:44 -07:00
Armon Dadgar
ac6283c31f
nomad: enforce ACLs on job submit
2017-09-04 13:05:53 -07:00
Armon Dadgar
6f5150a227
nomad: allow getting policies which are subset of token, fixes client resolution
2017-09-04 13:05:53 -07:00
Armon Dadgar
387a8a923b
nomad: adding policy subset check
2017-09-04 13:05:53 -07:00
Armon Dadgar
18ddb910fa
nomad: forward DeleteToken requests for global tokens
2017-09-04 13:05:53 -07:00
Armon Dadgar
b807f5df6f
nomad: forward UpsertToken requests for global tokens
2017-09-04 13:05:53 -07:00
Armon Dadgar
3e46094cee
Passthrough replication token for token/policy replication
2017-09-04 13:05:53 -07:00
Armon Dadgar
855240b1b5
nomad: ACL endpoints enforce permissions
2017-09-04 13:05:53 -07:00
Armon Dadgar
ddcc5f89bc
Add ErrPermissionDenied, rename TokenNotFound
2017-09-04 13:05:53 -07:00
Armon Dadgar
304a02d93b
nomad: Add SecretID to QueryOptions and WriteMeta
2017-09-04 13:05:53 -07:00
Armon Dadgar
4bda2fa9e9
nomad: ACL endpoints check support enabled and redirect to authority
2017-09-04 13:05:53 -07:00
Armon Dadgar
e24a4abf2c
nomad: adding ACL bootstrap endpoints
2017-09-04 13:05:53 -07:00
Armon Dadgar
1ace912341
nomad: adding bootstrapping checks
2017-09-04 13:05:53 -07:00
Armon Dadgar
06a7f12fad
nomad: adding bootstrap state store method
2017-09-04 13:05:53 -07:00
Armon Dadgar
76a03f2d8e
Address @dadgar feedback
2017-09-04 13:05:53 -07:00
Armon Dadgar
e7586a80df
nomad: Switch from SHA1 to Blake2 @chelseakomlo
2017-09-04 13:05:36 -07:00
Armon Dadgar
fc23a4e7e5
structs: sort policies to avoid order dependence for caching
2017-09-04 13:05:36 -07:00
Armon Dadgar
459c2b6fa7
nomad: switch policy/token replication to use batch endpoints
2017-09-04 13:05:36 -07:00
Armon Dadgar
edc38185cc
noamd: Adding batch fetch endpoints for ACL tokens and policies
2017-09-04 13:05:36 -07:00
Armon Dadgar
6a9d4e2dc3
nomad: Adding token resolution endpoint
2017-09-04 13:05:36 -07:00
Armon Dadgar
d9c56725d0
nomad: refactor to use CompileACLObject and handle anonymous token
2017-09-04 13:05:35 -07:00
Armon Dadgar
98e0f98f7e
structs: Adding ACL compilation helper
2017-09-04 13:05:35 -07:00
Armon Dadgar
583e654246
structs: cache key helper for policy list
2017-09-04 13:05:35 -07:00
Armon Dadgar
3efdf1f7d9
Address @chelseakomlo comments
2017-09-04 13:04:45 -07:00
Armon Dadgar
99cea1ac23
Moving shared ACL objects
2017-09-04 13:04:45 -07:00
Armon Dadgar
dc1904b57a
nomad: adding ACL token resolution logic
2017-09-04 13:04:45 -07:00
Armon Dadgar
018973aea8
Address @dadgar feedback
2017-09-04 13:04:45 -07:00
Armon Dadgar
5a3a931ec5
nomad: adding global token replication
2017-09-04 13:04:45 -07:00
Armon Dadgar
583a11cebd
nomad: Adding ability to filter list of tokens to global only
2017-09-04 13:04:45 -07:00
Armon Dadgar
cb827b6696
nomad: adding policy replication support
2017-09-04 13:04:45 -07:00
Armon Dadgar
7d4aa1975f
agent: thread through ACL config to Server
2017-09-04 13:04:45 -07:00
Armon Dadgar
bc697dc50e
Address @dadgar feedback
2017-09-04 13:04:45 -07:00
Armon Dadgar
30b607987e
nomad: generate accessor/secret ID server side
2017-09-04 13:04:45 -07:00
Armon Dadgar
bd2db18c80
agent: Adding HTTP endpoints for ACL tokens
2017-09-04 13:04:45 -07:00
Armon Dadgar
f91d2608cb
nomad: renambe PublicID to AccessorID for consistency
2017-09-04 13:04:45 -07:00
Armon Dadgar
e5c69f162c
nomad: implement ACL token endpoints
2017-09-04 13:04:45 -07:00
Armon Dadgar
e9bad0bf37
nomad: Add ACL Token snapshot/restore to FSM
2017-09-04 13:04:45 -07:00
Armon Dadgar
a17991e907
nomad: CRUD methods for ACLTokens
2017-09-04 13:04:45 -07:00
Armon Dadgar
8623bf9a5b
nomad: adding ACLToken table
2017-09-04 13:04:45 -07:00
Armon Dadgar
e9c583807a
nomad: adding ACLToken struct
2017-09-04 13:04:45 -07:00
Armon Dadgar
cde8e9301b
nomad: fixing state store tests due to signature mismatch
2017-09-04 13:04:44 -07:00
Armon Dadgar
3702587667
nomad: Adding Validate for ACLPolicy
2017-09-04 13:04:44 -07:00
Armon Dadgar
11672e4e01
nomad: adding validation of policy name and rules
2017-09-04 13:03:15 -07:00
Armon Dadgar
18e6053b58
agent: Adding ACL Policy endpoints
2017-09-04 13:03:15 -07:00
Armon Dadgar
d52e099fc2
Addressing @dadgar feedback
2017-09-04 13:03:15 -07:00
Armon Dadgar
afdde24799
nomad: adding upsert policy endpoint
2017-09-04 13:03:15 -07:00
Armon Dadgar
e3e243f433
nomad: implement policy delete endpoint
2017-09-04 13:03:15 -07:00
Armon Dadgar
e4f5f305ea
nomad: adding Get/List endpoints for ACL policies
2017-09-04 13:03:15 -07:00
Armon Dadgar
8a4dda8577
nomad: update method signature for tests
2017-09-04 13:03:15 -07:00
Armon Dadgar
f147f25fe5
Addressing @dadgar review feedback
2017-09-04 13:03:15 -07:00
Armon Dadgar
351afa0069
nomad: Upsert and Delete ACL policies can take a list
2017-09-04 13:03:14 -07:00
Armon Dadgar
10b583ea38
nomad: adding FSM snapshot/restore of ACL policies
2017-09-04 13:03:14 -07:00
Armon Dadgar
4cb544e8f3
nomad: Adding CRUD to state store for ACL Policies
2017-09-04 13:03:14 -07:00
Armon Dadgar
85cad11885
nomad: adding policy table to state store
2017-09-04 13:03:14 -07:00
Alex Dadgar
ad87c6fba5
Include google compare library
2017-09-01 16:42:09 -07:00
Alex Dadgar
26e66ed1c5
fix checking of context error
2017-09-01 09:53:09 -07:00
Alex Dadgar
4cc8bac48d
fix blocking query due to ctx change
2017-08-31 15:34:55 -07:00
Alex Dadgar
62c14c21a5
Merge pull request #3142 from hashicorp/f-deployment-watcher
...
Deployment watcher takes state store
2017-08-31 10:45:17 -07:00
Alex Dadgar
8c69dd3fd3
Remove panic from testing
2017-08-31 10:42:58 -07:00
Jeremy Olexa
f94f237597
Update peers.info message for operators
2017-08-31 08:51:04 -05:00
Alex Dadgar
590ff91bf3
Deployment watcher takes state store
2017-08-30 18:51:59 -07:00
Alex Dadgar
c1253619ef
Merge pull request #3138 from hashicorp/b-status-length
...
Search handles prefix longer than allowed UUIDs
2017-08-30 13:32:33 -07:00
Alex Dadgar
346d76dec3
Search handles prefix longer than allowed UUIDs
...
This PR fixes an issue in which the Search endpoint would error if the
prefix was longer than the allowed 36 characters of a UUID.
Fixes https://github.com/hashicorp/nomad/issues/3134
2017-08-30 10:51:05 -07:00
Alex Dadgar
be72602616
Allow distinct_host to have L/RTarget set
...
This PR removes validation that could break job backwards compatibility.
The targets are ignored so there is no side effects.
Fixes https://github.com/hashicorp/nomad/issues/3130
2017-08-30 10:30:01 -07:00
Chelsea Komlo
a544ee89e1
Merge pull request #3119 from jippi/patch-3
...
Error message for search API does not include the "all" option
2017-08-29 13:23:44 -04:00
Alex Dadgar
92dc3d3857
Fix even length uuid post hyphen
2017-08-29 09:21:18 -07:00
Christian Winther
e4a72782c7
Error message for search API does not include the "all" option
2017-08-29 15:41:21 +02:00
Michael Schurter
28e9fa73f6
Welcome to the brave new world
...
Committing generated code to help ensure reproducible builds.
2017-08-28 15:51:18 -07:00
Alex Dadgar
e6bf8f8e75
Merge pull request #3081 from clinta/maxparallel0
...
If MaxParallel == 0 default limit to count
2017-08-28 12:42:50 -07:00
Alex Dadgar
cff1c5ca08
Merge pull request #3107 from hashicorp/b-migrate-context-all
...
All context should use string context "all"
2017-08-28 12:38:54 -07:00
Chelsea Holland Komlo
6243690899
migrate all context
2017-08-28 05:29:38 +00:00
Alex Dadgar
7ce6c4f6f6
Add QueryOptions to SearchRequest
2017-08-26 15:56:13 -07:00
Chelsea Holland Komlo
9968689344
fix up formatting of error message
...
fixups from code review
2017-08-25 16:42:11 +00:00
Chelsea Holland Komlo
74c51e63bd
job names causes errors when searching other contexts, only log but not return this err
2017-08-25 16:42:11 +00:00
Clint Armstrong
dc8eab6adc
Set MaxParallel default to 1
2017-08-25 07:56:40 -04:00
Alex Dadgar
34485622e1
Merge pull request #3056 from hashicorp/b-auto-revert
...
Fix purging job versions
2017-08-23 14:20:48 -07:00
Alex Dadgar
422332c8bf
Merge pull request #3002 from jrasell/gh_2993
...
Add the Nomad agent version to the node-status CLI output.
2017-08-22 10:43:25 -07:00
Chelsea Komlo
49542712f9
Merge pull request #3068 from hashicorp/f-add-deployments-search-api
...
Add deployments to search api
2017-08-21 16:34:00 -04:00
Chelsea Holland Komlo
50c20b1801
add deployments to search api
2017-08-21 15:20:55 +00:00
Alex Dadgar
dfcb73c896
Fix purging job versions
...
This PR fixes an issue in which the job versions weren't properly
cleaned when removing a job.
Fixes https://github.com/hashicorp/nomad/issues/3052
2017-08-18 15:46:03 -07:00
Michael Schurter
c5529bdd16
Put header diff in its own function
2017-08-17 16:49:14 -07:00
Michael Schurter
9a466bcf5e
Add diff support for ServiceCheck.Header
2017-08-17 16:49:14 -07:00
Michael Schurter
bb8d5689d8
Add Header and Method support for HTTP checks
2017-08-17 16:44:21 -07:00
Michael Schurter
b4813747d0
Merge pull request #3043 from hashicorp/f-2441-shutdown-delay
...
Add optional shutdown delay to tasks
2017-08-17 14:37:48 -07:00
Michael Schurter
8fdd58f55e
Fix ShutdownDelay diff test
2017-08-17 14:05:51 -07:00
Alex Dadgar
782abf4098
Fix race creating EvalFuture
...
This PR fixes https://github.com/hashicorp/nomad/issues/3044
2017-08-17 13:23:58 -07:00
Michael Schurter
d529b422b2
Add optional shutdown delay to tasks
...
Fixes #2441
Defaults to 0 (no delay) for backward compat and because this feature
should be opt-in.
2017-08-16 17:59:46 -07:00
James Rasell
0d120228ea
Updates based on feedback provided by dadgar.
2017-08-16 22:19:31 +01:00
Alex Dadgar
fdb8df4a55
Merge pull request #3024 from hashicorp/f-no-revert-target
...
Deployment desc when no stable job and autorevert
2017-08-15 12:24:09 -07:00
Chelsea Komlo
b9f189495a
Merge pull request #2995 from hashicorp/f-allocation-autocomplete
...
Allocation autocomplete, client api
2017-08-14 15:26:39 -04:00
Michael Schurter
8693f6d69c
Merge pull request #3022 from hashicorp/b-check-validation
...
Fix timeout validation for script checks
2017-08-14 12:04:02 -07:00
Chelsea Holland Komlo
e658d4daaa
fixups from code review
2017-08-14 17:56:03 +00:00
Chelsea Holland Komlo
69c2b7e308
context constants should be in both api and structs pkg
2017-08-14 17:38:10 +00:00
Chelsea Holland Komlo
9bc48a01a6
using contexts constants in replace of string contexts
...
fix up endpoints
2017-08-14 17:38:10 +00:00
Chelsea Holland Komlo
76469614b5
code refactoring and fixups
2017-08-14 17:38:10 +00:00
Chelsea Holland Komlo
465c4d7082
change endpoint to /v1/search
2017-08-14 17:38:10 +00:00
Chelsea Holland Komlo
b7736c8b4a
update comments
...
refactor for simplicity
2017-08-14 17:36:14 +00:00
Chelsea Holland Komlo
aadec27d36
even in rounding down for queries, full prefixes are matched against ids
...
only applies to uuids, not jobs
2017-08-14 17:36:14 +00:00
Chelsea Holland Komlo
5ee58a391b
rename to cluster search
...
comment updates
2017-08-14 17:36:14 +00:00
Chelsea Holland Komlo
9402d330e8
autocomplete for allocation ids
2017-08-14 17:35:35 +00:00
Chelsea Holland Komlo
075aeee73e
round down odd prefixes
2017-08-14 17:35:35 +00:00
Michael Schurter
b1731d90df
Fix timeout validation for script checks
...
It appears this was disabled a year ago when defaulting and validation
code was probably different: 91bbc5c3c769f4f17134dbc603ec677a178a9e9e
Fixes an issue reported via the mailing list:
https://groups.google.com/d/msg/nomad-tool/yiPCTfOpYn4/yv7MMPUABQAJ
2017-08-14 10:23:52 -07:00
James Nugent
ae85c548ac
build: Apply goimports formatting to various files
...
The following files were not formatted as the output of goimports(1)
would create, causing the goimports linter to fail:
command/agent/resources_endpoint.go
nomad/resources_endpoint.go
nomad/resources_endpoint_test.go
2017-08-14 11:51:47 +08:00
Alex Dadgar
f64b05a001
Deployment desc when no stable job and autorevert
...
This PR adds a specialized description when the job has autorevert set
and there is no job to revert to.
2017-08-12 15:50:51 -07:00
Alex Dadgar
6b238edc22
Merge pull request #3001 from hashicorp/f-template-events
...
Template emits events explaining why it is blocked
2017-08-10 13:00:58 -07:00
“James
d6d721d7c1
Add the Nomad agent version to the node-status CLI putput.
2017-08-10 08:27:26 +01:00
Alex Dadgar
4a88c4133d
Fix broken Template Diff Test
2017-08-08 11:09:27 -07:00
Alex Dadgar
aba107be99
Merge pull request #2979 from lfarnell/cleanup
...
Code cleanup
2017-08-08 10:21:15 -07:00
Alex Dadgar
4f6f6a13c8
Emit generic task events
2017-08-07 21:26:04 -07:00
Alex Dadgar
79d25b7db9
Merge pull request #2947 from hashicorp/f-vault-grace
...
Allow template to set Vault grace
2017-08-07 16:29:53 -07:00
Luke Farnell
f0ced87b95
fixed all spelling mistakes for goreport
2017-08-07 17:13:05 -04:00
Chelsea Komlo
5537516bfd
Merge pull request #2964 from hashicorp/f-autocomplete-api
...
autocomplete api
2017-08-07 12:40:09 -07:00
Chelsea Holland Komlo
d4fc5160b1
code simplifications and logging
2017-08-07 17:28:46 +00:00
Chelsea Holland Komlo
cd0698a87b
max index for any resource, if context is unspecified
2017-08-07 15:07:18 +00:00
Chelsea Holland Komlo
f110fa5c0d
syntax fixups and logging
2017-08-07 14:26:53 +00:00
Chelsea Holland Komlo
1b77f9a216
further refactoring
2017-08-04 22:50:41 +00:00
Chelsea Holland Komlo
424e475333
if no context is specified, set maximum index for available contexts
2017-08-04 20:16:49 +00:00
Chelsea Holland Komlo
0b38704392
fix up tests to intantiate assertion test helper
...
add http tests for remaining contexts
2017-08-04 19:48:20 +00:00
Chelsea Holland Komlo
1eff731d8b
further refactoring
2017-08-04 15:19:35 +00:00
Chelsea Holland Komlo
111019642b
resources are expected by state store to be plural
2017-08-04 15:07:34 +00:00
Chelsea Holland Komlo
927b6667c7
set response index and meta information
...
add tests for edge cases
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
b2b4c5d7af
add documentation
...
extract magic number into variable
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
b6f459a7a9
refactor rpc endpoint and tests
...
add test for when no prefixes are matched
add test for no context at HTTP api
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
7b7a80d6ce
resources list endpoint accepts http POST and PUT
...
set the index for a resources response
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
312bb19e1c
refactor and add error handling for invalid context type
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
98fe705dff
adding allocations to resouces list endpoint
...
adding nodes to resources list endpoint
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
2759ffe2d2
refactor to remove duplication for types of resources
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
0026a308ec
add truncation boolean to response
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
06f10d2e5f
adds evaluations
...
makes context singular
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
92cc40f1de
change resources endpoint from http get to post
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
64a83edd9f
remove resourceliststub, no need for another layer of abstraction
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
5192dacf85
limit resources results to 20
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
197c411767
refactor test helper
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
377b059e5e
remove unnecessary validations; these are tested elsewhere
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
4dd6b46198
Retrieve job information for resources endpoint
...
requires further refactoring and logic for more contexts
2017-08-04 14:34:25 +00:00
Alex Dadgar
2284e59b57
Fix double close and cleanup code
2017-08-03 13:40:34 -07:00
Alex Dadgar
146f3f5cb2
Don't restore parameterized periodic jobs
2017-08-03 12:37:58 -07:00
Alex Dadgar
067a638478
Allow template to set Vault grace
...
This PR allows a template to specify the Vault grace duration.
Fixes https://github.com/hashicorp/nomad/issues/2922
2017-08-01 14:14:08 -07:00
Alex Dadgar
2650bb1d12
Distinct Property supports arbitrary limit
...
This PR enhances the distinct_property constraint such that a limit can
be specified in the RTarget/value parameter. This allows constraints
such as:
```
constraint {
distinct_property = "${meta.rack}"
value = "2"
}
```
This restricts any given rack from running more than 2 allocations from
the task group.
Fixes https://github.com/hashicorp/nomad/issues/1146
2017-07-31 16:52:13 -07:00
Michael Schurter
7cbae6e168
Merge pull request #2899 from hashicorp/d-mention-env-in-init
...
Mention env templates in nomad init
2017-07-26 11:17:47 -07:00
Michael Schurter
265e18b8ac
Test for template envvar validation
2017-07-25 20:27:18 -07:00
Alex Dadgar
a9c786a4fe
Make test Vault pick random ports
2017-07-25 17:40:59 -07:00
Alex Dadgar
06eddf243c
parallel nomad tests
2017-07-25 17:39:36 -07:00
Alex Dadgar
8dc8e17c1b
Merge pull request #2907 from hashicorp/b-promote-err
...
Expose FSM errors into deployment watcher and API
2017-07-25 17:31:33 -07:00
Michael Schurter
b1c65ca390
Prevent using env templates with signals
2017-07-25 16:34:41 -07:00
Alex Dadgar
9c655e1208
Validate that min_healthy_time < healthy_deadline
...
This PR adds a validation check to the update stanza to ensure that the
min_healthy_time is feasible.
2017-07-25 16:30:53 -07:00
Alex Dadgar
5e98c3ce95
Expose FSM errors into deployment watcher and API
...
This PR exposes errors returned by the FSM to the deployment watcher and
thus the API. It also adds an error to handle the case of promoting a
deployment that has no eligible canaries.
2017-07-25 16:23:22 -07:00
Alex Dadgar
219ef8a640
parallel deploymentwatcher tests
2017-07-21 19:23:24 -07:00
Alex Dadgar
d3409d10c4
Remove comment
2017-07-21 15:55:43 -07:00
Alex Dadgar
0eaea964ed
Improve shutdown code
2017-07-21 15:44:51 -07:00
Alex Dadgar
15fad96c21
Merge pull request #2868 from hashicorp/f-feedback
...
Variety of UX fixes
2017-07-20 17:43:42 -07:00
Alex Dadgar
39e7a26e5d
Small fixes and UX changes
2017-07-19 13:34:24 -07:00
Alex Dadgar
30efd5a27a
Skip error log on shutdown
...
This PR fixes the detection of a shutdown scenario and squelches the
error log.
2017-07-19 11:15:53 -07:00
Alex Dadgar
e1888e822c
Merge pull request #2841 from hashicorp/b-rolling-no-fit
...
Treat destructive updates atomically
2017-07-19 11:11:25 -07:00
Alex Dadgar
e51bc66680
Shrink dynamic port range
...
This PR shrinks the dynamic port range to not overlap with most
operating systems ephemeral port range: https://en.wikipedia.org/wiki/Ephemeral_port
2017-07-18 13:47:53 -07:00
Alex Dadgar
cb966e550d
fix blocking queries in deployment watcher
2017-07-18 13:02:40 -07:00
Alex Dadgar
22e84d00ab
Fix deep copy of driver config
2017-07-17 17:53:21 -07:00
Alex Dadgar
641e178416
Stop before trying to place
2017-07-17 17:18:12 -07:00
Alex Dadgar
755d20da92
Merge pull request #2830 from hashicorp/b-max-warning
...
Warn instead of error when max_parallel is greater than count.
2017-07-17 15:35:23 -07:00
Alex Dadgar
cd78b99d14
Address feedback
2017-07-17 15:35:14 -07:00
Alex Dadgar
84c2f25e0a
Deployment GC ensures no alloc references
2017-07-17 14:09:59 -07:00
Alex Dadgar
311084c724
Allow the deployment to not exist and just no-op
2017-07-17 14:09:59 -07:00
Alex Dadgar
f91312a49a
Fix typo
2017-07-14 09:53:46 -07:00
Alex Dadgar
7a74080079
Log reason a plan gets rejected per node.
...
This PR adds a log explaining why a plan gets rejected. Should help
debugging.
2017-07-13 17:14:02 -07:00
Alex Dadgar
e71e315950
Fix log line for gc'ing deployments
2017-07-13 15:07:25 -07:00
Alex Dadgar
aa2126cc1a
Warn instead of error when max_parallel is greater than count.
...
Fixes https://github.com/hashicorp/nomad/issues/2819
2017-07-13 13:10:45 -07:00
Alex Dadgar
79ce4bdfc6
Merge pull request #2807 from hashicorp/f-validate-ports
...
Prevent port conflicts
2017-07-07 16:59:18 -07:00
Alex Dadgar
6cde454509
Handle same task reserving ports twice
2017-07-07 16:58:20 -07:00
Alex Dadgar
3ea8b02826
Merge pull request #2808 from hashicorp/b-restore-periodic
...
When restoring periodic jobs, take into consideration launch time zone
2017-07-07 16:51:23 -07:00
Alex Dadgar
f86760db3c
Basic logs
2017-07-07 16:49:08 -07:00
Alex Dadgar
d9b8fd126f
When restoring periodic jobs, take into consideration launch time zone
...
Fixes https://github.com/hashicorp/nomad/issues/2721
2017-07-07 16:18:56 -07:00
Michael Schurter
e2a79d330c
Prevent port conflicts
...
Validate that no two tasks in the same task group can reserve the same
static port.
2017-07-07 16:17:05 -07:00
Michael Schurter
517c799439
Validate job type
...
Fixes #2722
2017-07-07 15:34:26 -07:00
Alex Dadgar
45712c6ca3
test fixes
2017-07-07 14:11:27 -07:00
Alex Dadgar
3a29b38108
Status description shows requiring promotion
2017-07-07 12:12:48 -07:00
Alex Dadgar
ade9a7c768
@jippi Changed my mind! Good suggestion
2017-07-07 12:12:48 -07:00
Alex Dadgar
40b04a5ea9
alloc-list shows version
2017-07-07 12:12:48 -07:00
Alex Dadgar
08bf34f9a3
Fix JobModifyIndex changing when job is marked stable
2017-07-07 12:12:48 -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
Alex Dadgar
1cb877699a
Disallow update stanza on batch jobs
...
This PR:
* disallows update stanzas on batch jobs
* undeprecates the stagger field
* changes the way warnings are returned
2017-07-07 12:11:39 -07:00
Alex Dadgar
de54ffd1f6
Deployment from inplace updates tracks placed properly.
2017-07-07 12:10:04 -07:00
Alex Dadgar
bfc22346d5
Return the reverted job version
2017-07-07 12:10:04 -07:00
Alex Dadgar
371b2bdacc
add reverted job version to deployment update response
2017-07-07 12:10:04 -07:00
Alex Dadgar
a7fdc74bd4
feedback
2017-07-07 12:10:04 -07:00
Alex Dadgar
5457bb7962
Job stability
2017-07-07 12:10:04 -07:00
Alex Dadgar
d07a5a2008
Complete deployments mark jobs as stable
...
This PR allows jobs to be marked as stable automatically by a successful
deployment.
2017-07-07 12:10:04 -07:00
Alex Dadgar
454083ba1b
Remove canary
2017-07-07 12:10:04 -07:00
Alex Dadgar
952a22fb02
plan apply tests
2017-07-07 12:10:04 -07:00
Alex Dadgar
477c713df5
Plan apply handles canaries and success is set via update
2017-07-07 12:10:04 -07:00
Alex Dadgar
e229d3650b
Attach eval id
2017-07-07 12:10:04 -07:00
Alex Dadgar
af1935e1e1
Mark complete
2017-07-07 12:10:04 -07:00
Alex Dadgar
c10d7ab871
Remove promoted bit from allocation
2017-07-07 12:10:04 -07:00
Alex Dadgar
09dfa2fc10
Rename CreateDeployments and remove cancelling behavior in state_store
2017-07-07 12:10:04 -07:00
Alex Dadgar
2e2fd26bed
Update index
2017-07-07 12:07:08 -07:00
Alex Dadgar
ecee5e370e
initial watcher
2017-07-07 12:07:08 -07:00
Alex Dadgar
43d2db1c14
Small fixes
2017-07-07 12:07:08 -07:00
Alex Dadgar
e7034691ea
deployment status
2017-07-07 12:07:07 -07:00
Alex Dadgar
57cbbf87f8
deployment list
2017-07-07 12:07:07 -07:00
Alex Dadgar
2471b86dec
Show submit time
2017-07-07 12:07:07 -07:00
Alex Dadgar
95c7a5bcf3
job history
2017-07-07 12:05:57 -07:00
Alex Dadgar
abf34204cc
JobVersions returns struct with optional diff
2017-07-07 12:05:57 -07:00
Alex Dadgar
b64185a3f1
Deployment GC
...
This PR implements the garbage collector for deployments. Deployments
will by default be garbage collected after 1 hour.
2017-07-07 12:05:57 -07:00
Alex Dadgar
c643e6b0d1
Add config options
2017-07-07 12:05:56 -07:00
Alex Dadgar
f233629a4f
job deployment endpoint + api
2017-07-07 12:05:56 -07:00