Commit Graph

1341 Commits

Author SHA1 Message Date
Alex Dadgar 8bfc4255eb Add server metrics 2017-02-14 16:02:18 -08:00
Alex Dadgar 1657c70426 Merge pull request #2310 from hashicorp/f-serf-reap
Handle Serf Reap event
2017-02-14 11:07:43 -08:00
Alex Dadgar dbc4eac936 Merge pull request #2309 from hashicorp/f-no-root-token
Disallow root policy from being specified
2017-02-14 11:06:31 -08:00
Alex Dadgar b6357f96c5 Merge pull request #2308 from hashicorp/f-leader-task
Leader task
2017-02-14 11:03:32 -08:00
Alex Dadgar 89fea63a53 Merge pull request #2305 from hashicorp/f-operator
Add nomad operator command for interacting with Raft configuration
2017-02-14 11:01:41 -08:00
Alex Dadgar 7d158a5a7f Validate the interval within a restart policy
This PR ensures that the interval specified is not less than 5 seconds.

Fixes https://github.com/hashicorp/nomad/issues/2286
2017-02-13 15:27:36 -08:00
Alex Dadgar 96c17714cf Fix test 2017-02-13 14:31:22 -08:00
Alex Dadgar 7c8bd12509 Handle Serf Reap event
This PR adds handling of the Serf member reap event to remove the peer
from Raft.
2017-02-13 14:22:54 -08:00
Alex Dadgar 0b2e2971fd Disallow root policy from being specified
This PR disallows the specification of a root policy by a Nomad task.
2017-02-13 10:51:29 -08:00
Alex Dadgar 238b4bcafd Add Leader support to client 2017-02-10 17:55:19 -08:00
Alex Dadgar 3ba8faeae3 Add leader task to api and server side 2017-02-10 16:57:47 -08:00
Alex Dadgar 21ef1ce685 Add guard 2017-02-10 16:29:28 -08:00
Alex Dadgar b1cd81e997 Remove todos 2017-02-10 15:41:23 -08:00
Alex Dadgar 2d4d9b79d8 Operator command/endpoint/documentation 2017-02-09 18:04:46 -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 ae31f4c84e Respond to comments 2017-02-08 14:50:19 -08:00
Alex Dadgar eaf285b208 Fix missing summary restoration 2017-02-08 11:51:48 -08:00
Alex Dadgar 5d293c0f1e Add abandon tests and use snapshot for blocking queries 2017-02-08 11:18:03 -08:00
Alex Dadgar d182aac7a7 Fix nomad tests 2017-02-07 22:10:33 -08:00
Alex Dadgar 04862ca10e Tests compile 2017-02-07 21:30:57 -08:00
Alex Dadgar b69b357c7f Nomad builds 2017-02-07 20:31:23 -08:00
Alex Dadgar 36d018514b Fix test 2017-02-07 11:35:38 -08:00
Alex Dadgar bc2e6b0cc2 Fix state store tests 2017-02-06 16:46:23 -08:00
Alex Dadgar 6f9866ca69 Fix forwarded recoverable error 2017-02-05 13:14:24 -08:00
Alex Dadgar c026a97ce7 Use watchset on getter methods 2017-02-05 12:45:57 -08:00
Alex Dadgar 570efcaebd Update state store and blocking query helper 2017-02-05 12:03:11 -08:00
Alex Dadgar da89b1cde6 Fix bootstrap tests 2017-02-03 13:00:28 -08:00
Alex Dadgar 419bf2c497 Tests build 2017-02-02 17:50:06 -08:00
Alex Dadgar ee368762ae It builds 2017-02-02 16:07:15 -08:00
Alex Dadgar 26db1bd12c Join + Leave peer 2017-02-02 15:49:06 -08:00
Alex Dadgar ac10aed731 Update setupRaft 2017-02-02 15:31:36 -08:00
Alex Dadgar 78cfcd2724 Bump protocol version and update numOtherPeers 2017-02-02 13:52:31 -08:00
Alex Dadgar b951b84b44 Merge pull request #2278 from hashicorp/b-consul-merge
Fix Consul Config Merging/Copying
2017-02-02 11:39:26 -08:00
Alex Dadgar 1562a7aeee Merge pull request #2262 from hashicorp/f-permissions
Template destination file permissions.
2017-02-02 11:28:44 -08:00
Alex Dadgar 7fae2d2cea Fix Consul Config Merging/Copying
This PR fixes config merging/copying code.

Fixes https://github.com/hashicorp/nomad/issues/2264
2017-02-02 11:12:07 -08:00
Alex Dadgar b40f284bd1 Merge branch 'master' into f-permissions 2017-02-01 16:57:46 -08:00
Alex Dadgar f2169cb111 Merge branch 'master' into f-vault-sighup 2017-02-01 16:57:43 -08:00
Alex Dadgar 9c75ec7f57 Add role to merge test 2017-02-01 16:37:08 -08:00
Alex Dadgar 15ffdff497 Vault Client on Server handles SIGHUP
This PR allows the Vault client on the server to handle a SIGHUP. This
allows updating the Vault token and any other configuration without
downtime.
2017-02-01 14:24:10 -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
Alex Dadgar 6b7efa1ba6 Template destination file permissions.
This PR allows setting the file permissions of the rendered template.
2017-01-31 20:10:01 -08:00
Alex Dadgar 83106de217 Merge branch 'master' into d-vault 2017-01-27 15:19:34 -08:00
Alex Dadgar f11dedbfc6 explain the skip 2017-01-27 15:19:22 -08:00
Alex Dadgar 183d0bdd15 Cleanup and skip test 2017-01-27 15:06:01 -08:00
Alex Dadgar 0a1b5cabf5 Merge pull request #2247 from hashicorp/b-dispatch-gc
Disallow GC of  parameterized jobs
2017-01-27 11:24:04 -08:00
Alex Dadgar 53ce3169d1 Merge pull request #2244 from taylorchu/TC_fix_verify_ssl
BUGFIX: fix consul verify_ssl merging
2017-01-26 15:06:25 -08:00
Alex Dadgar dd11824d48 Loosen timing a bit on travis 2017-01-26 15:06:14 -08:00
taylorchu fd34c03d47 TWEAK: remove else block in tls handling 2017-01-26 14:03:32 -08:00
Alex Dadgar bc064bcee0 Merge branch 'master' into b-dispatch-gc 2017-01-26 13:43:15 -08:00
Alex Dadgar d00355e8d3 Merge branch 'master' into TC_fix_verify_ssl 2017-01-26 13:33:10 -08:00
Alex Dadgar 1f6d9a0e4a Fix flaky test 2017-01-26 13:02:13 -08:00
Alex Dadgar 7f9c6466d4 Disallow GC of parameterized jobs
This PR makes it so parameterized jobs do not get garbage collected and
adds a test.
2017-01-26 11:57:32 -08:00
Alex Dadgar 2057acea3e missing tests 2017-01-25 21:27:44 -08:00
Alex Dadgar 3e35f453e4 Rename meta/parsing 2017-01-25 21:27:44 -08:00
Alex Dadgar 8196a58c4c Rename dispatch_input to dispatch_payload 2017-01-25 21:27:44 -08:00
taylorchu 4453a292a2 BUGFIX: fix consul verify_ssl merging 2017-01-25 16:19:39 -08:00
Alex Dadgar 75e3f2c996 Fix fsm/env test 2017-01-24 09:36:22 -08:00
Diptanu Choudhury 264a0c46cf Merge pull request #2223 from hashicorp/f-env-addr
Setting the Addrs of sibling tasks in the env
2017-01-23 15:05:48 -08:00
Alex Dadgar 606bb30863 Merge pull request #2226 from hashicorp/b-vault
Improve Vault integration and validation
2017-01-23 14:59:41 -08:00
Alex Dadgar 94ed50aa59 Prefer looking up using self path and remove checking for default policy 2017-01-23 11:46:27 -08:00
Alex Dadgar faf9745256 Fix blacklist test 2017-01-23 10:40:28 -08:00
Alex Dadgar 07bc00404e fix typo 2017-01-22 14:08:40 -08:00
Alex Dadgar 442d775fb2 Test new functionality 2017-01-21 17:33:35 -08:00
Michael Schurter 3c7e50bc1b Fix tests 2017-01-20 17:04:52 -08:00
Alex Dadgar 76dbc4aee1 verify we can renew ourselves 2017-01-20 14:23:50 -08:00
Diptanu Choudhury fe4ae25eea Setting the Addrs of sibling tasks in the env 2017-01-20 14:15:53 -08:00
Michael Schurter 295c2bf74a Merge pull request #2186 from hashicorp/f-driver-cleanup
Add Cleanup method to Driver interface
2017-01-20 13:02:14 -08:00
Michael Schurter 1f7b5b4b47 Rename Constructor -> Parameterized Job 2017-01-20 12:43:10 -08:00
Alex Dadgar faa50b851e Cleanup errors/comments 2017-01-20 10:26:25 -08:00
Alex Dadgar 7d1ec25d09 Test pass 2017-01-20 10:06:47 -08:00
Alex Dadgar ace50cfa19 closer on the tests 2017-01-19 17:21:46 -08:00
Alex Dadgar fb86904902 Check capabilities, allow creation against role
Check the capabilities of the Vault token to ensure it is valid and also
allow targetting of a role that the token is not from.
2017-01-19 13:40:32 -08:00
Diptanu Choudhury 651b3c626d Merge pull request #2208 from hashicorp/duplicate-service-name
register service names with duplicate name
2017-01-18 16:17:45 -08:00
Diptanu Choudhury 1999b7eebb Merge pull request #2159 from hashicorp/b-consul-config
Fixed merging consul config
2017-01-18 16:14:54 -08:00
Diptanu Choudhury e927de02d2 Moved functions to helper from structs 2017-01-18 15:55:14 -08:00
Diptanu Choudhury b2a494c24e Ensuring we can register service names with duplicate name but different ports 2017-01-17 12:26:07 -08: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 a616e9d970 Merge pull request #2163 from hashicorp/b-summary
Job Summary: Fix queued accounting and remove in-place state store updates
2017-01-11 13:36:36 -08:00
Alex Dadgar aafb9ca8b2 Merge pull request #2177 from hashicorp/b-blocking-getallocs
GetAllocs uses a blocking query
2017-01-11 13:24:32 -08:00
Alex Dadgar efbb2894c7 Review fixes 2017-01-11 13:18:36 -08:00
Alex Dadgar 0f046b179a Merge pull request #2155 from hashicorp/f-cancel
Cancel blocked evals upon successful one for job
2017-01-11 13:10:35 -08:00
Alex Dadgar c19985244a GetAllocs uses a blocking query
This PR makes GetAllocs use a blocking query as well as adding a sanity
check to the clients watchAllocation code to ensure it gets the correct
allocations.

This PR fixes https://github.com/hashicorp/nomad/issues/2119 and
https://github.com/hashicorp/nomad/issues/2153.

The issue was that the client was talking to two different servers, one
to check which allocations to pull and the other to pull those
allocations.  However the latter call was not with a blocking query and
thus the client would not retreive the allocations it requested.

The logging has been improved to make the problem more clear as well.
2017-01-10 13:30:35 -08:00
Alex Dadgar d0f918495b Store pointer of JobSummary in state store and remove in-place modifications of the object and replace with Copy-Update-Insert operations 2017-01-08 13:55:03 -08:00
Diptanu Choudhury c253f5b17d Fixed merging consul config 2017-01-05 15:15:43 -08:00
Alex Dadgar 8d5f0fea69 Merge pull request #2128 from hashicorp/f-dispatch
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Alex Dadgar 86980e08f0 Cancel blocked evals upon successful one for job
This PR causes blocked evaluations to be cancelled if there is a
subsequent successful evaluation for the job. This fixes UX problems
showing failed placements when there are not any in reality and makes GC
possible for these jobs in certain cases.

Fixes https://github.com/hashicorp/nomad/issues/2124
2017-01-04 16:16:04 -08:00
Michael Schurter 4a9a574d9d Merge pull request #2054 from hashicorp/f-prestart
Add Driver.Prestart method
2016-12-20 16:18:56 -08:00
Michael Schurter 2aa235f8f2 Rename InitializationMessage to DriverMessage 2016-12-20 11:51:09 -08:00
Diptanu Choudhury 9cdd576720 Updated changelog and fixed tests 2016-12-20 11:32:17 -08:00
Diptanu Choudhury 9786708526 Added comments 2016-12-19 18:10:02 -08:00
Alex Dadgar 4e8035756b Fix test and prevent job with payload from being submitted 2016-12-18 16:32:14 -08:00
Alex Dadgar 072ff1c3ee ensure file doesn't escape 2016-12-18 15:48:30 -08:00
Alex Dadgar aa904b495e Require batch 2016-12-16 15:20:12 -08:00
Alex Dadgar 2761e1d8ea fix tests 2016-12-16 10:21:56 -08:00
Alex Dadgar a1dd78c24b Scheduler combines meta from job > group > task 2016-12-15 17:08:38 -08:00
Alex Dadgar d8de7b59a5 JobDiff 2016-12-15 15:40:18 -08:00