Commit Graph

317 Commits

Author SHA1 Message Date
Alex Dadgar 4a5c3c8db0 Rename structs 2016-12-14 14:28:43 -08:00
Alex Dadgar 1235fc6581 summary tests 2016-12-13 16:15:40 -08:00
Alex Dadgar af2865ea48 Don't modify jobs status inplace 2016-12-12 11:42:47 -08:00
Alex Dadgar 8885ab70a6 Handle the delete case 2016-12-06 20:15:10 -08:00
Alex Dadgar ef79e77e52 Children summary 2016-12-06 17:06:57 -08:00
Alex Dadgar c005fcb973 Add structs 2016-12-05 17:24:37 -08:00
Diptanu Choudhury 5191b4d33a Making the status command return the allocs of currently registered job 2016-11-24 16:31:30 +01:00
Diptanu Choudhury 56ed1d3cd8 Fixing the upgrade path for ephemeral disk 2016-11-08 15:24:51 -08:00
Alex Dadgar df4398beac Implement blocking queries for /v1/job/evaluations 2016-10-29 17:30:34 -07:00
Diptanu Choudhury 1b3c5e98c8 Renaming LocalDisk to EphemeralDisk (#1710)
Renaming LocalDisk to EphemeralDisk
2016-09-14 15:43:42 -07:00
Diptanu Choudhury 6028682ad2 Adding LocalDisk to alloc.Job 2016-09-01 17:41:50 -07:00
Alex Dadgar 3c9936ae4a Merge pull request #1659 from hashicorp/f-revoke-accessors
Token revocation and keeping only a single Vault client active among servers
2016-08-31 14:10:46 -07:00
Diptanu Choudhury bfee7b30a3 Introducing shared resources in alloc 2016-08-29 13:49:25 -07:00
Alex Dadgar 48696ba0cc Use tomb to shutdown
Token revocation

Remove from the statestore

Revoke tokens

Don't error when Vault is disabled as this could cause issue if the operator ever goes from enabled to disabled

update server interface to allow enable/disable and config loading

test the new functions

Leader revoke

Use active
2016-08-28 14:06:25 -07:00
Diptanu Choudhury 13497913f9 Ensuring resources are re-calculated properly in fsm 2016-08-26 20:13:11 -07:00
Diptanu Choudhury 2f681b6415 Added copy method to LocalDisk 2016-08-26 14:24:47 -05:00
Diptanu Choudhury ffaf6c6299 Fixed some tests 2016-08-25 13:56:39 -05:00
Diptanu Choudhury 8105613c25 Added an upgrade path for existing jobs with no local disk 2016-08-25 13:00:20 -05:00
Alex Dadgar 901000f789 Raft message, fsm and state store table 2016-08-19 16:40:37 -07:00
Diptanu Choudhury 6dc5b1972c Setting job's create index as summary create index during reconciliation 2016-08-04 15:14:01 -07:00
Alex Dadgar 2fb67fefb5 Merge pull request #1516 from hashicorp/f-lost-state-sched
Make scheduler mark allocations as lost
2016-08-04 11:36:02 -07:00
Diptanu Choudhury 88d383c47f Updated tests and comments 2016-08-04 11:29:36 -07:00
Diptanu Choudhury c24e8ba7d8 Not updating summary if job is de-registered 2016-08-03 17:00:08 -07:00
Diptanu Choudhury 74caed0c7a Added an endpoint for users to reconcile job summaries 2016-08-03 16:12:47 -07:00
Alex Dadgar ac3328e812 Make scheduler mark allocations as lost 2016-08-03 15:57:46 -07:00
Diptanu Choudhury 1b60e0823a Added a test for restoring the summaries in fsm 2016-08-03 11:58:36 -07:00
Alex Dadgar 4197e62e78 Remove old way of marking lost 2016-08-03 11:20:56 -07:00
Diptanu Choudhury b95cf91ee3 using the job associated with the alloc to determine if job is present 2016-08-02 19:14:05 -07:00
Diptanu Choudhury 6f8c40fca7 Not updating summary if create index of summary not same as job's create index 2016-08-02 18:59:45 -07:00
Diptanu Choudhury b2d388bcba Merge pull request #1508 from hashicorp/b-dont-update-job
Do not update the job of allocations that are being stopped
2016-08-02 18:58:39 -07:00
Alex Dadgar 2332a58944 Do not update the job of allocations that are being stopped 2016-08-02 17:53:31 -07:00
Diptanu Choudhury 87fdeb5393 Updated the logic to update job summary 2016-08-02 16:08:20 -07:00
Diptanu Choudhury 3966a46996 Updating the summary after we have updated the current allocation when client updates the alloc 2016-08-02 15:06:39 -07:00
Diptanu Choudhury 92e32e46f1 Updating the summary after we have updated the current allocation 2016-08-02 14:59:41 -07:00
Diptanu Choudhury 3aa4f39094 Checking if a job is nil before updating the allocation 2016-08-01 17:05:48 -07:00
Diptanu Choudhury b69b7129a6 Using the parnet transaction to query the allocation while updating summary 2016-08-01 16:46:05 -07:00
Diptanu Choudhury b0e1f02e26 Not updating job summaries if jobs are not present 2016-07-28 15:24:27 -07:00
Diptanu Choudhury 0dd8a84de0 Marking the desired state of an allocation as stop if the node on which it runs disconnects 2016-07-27 17:07:08 -07:00
Diptanu Choudhury b857d7c6c1 Copying job summary before mutating it 2016-07-27 14:46:46 -07:00
Diptanu Choudhury 1bab053490 Updated some tests 2016-07-26 15:11:48 -07:00
Diptanu Choudhury 5bded8d54d Setting the right indexes while creating Job Summary 2016-07-25 17:51:20 -07:00
Diptanu Choudhury 3089833397 Reconciling the queued allocations during restore 2016-07-25 17:31:40 -07:00
Diptanu Choudhury 6193529040 Fixed more tests 2016-07-25 17:31:40 -07:00
Diptanu Choudhury f1c9427c37 Added code to create missing job summaries 2016-07-25 17:26:38 -07:00
Diptanu Choudhury dabb83063b Review comments 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 50842b88c7 Fixed some bugs 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 1405687a88 Fixed some error messages and conditions 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 7bafb7c675 Updating the job summary while mutating jobs and allocation objects 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 109b05cb29 Applying changes to job updates via FSM 2016-07-25 17:26:38 -07:00
Diptanu Choudhury affbf5b6e4 Updating the job summary table only if an evaluation has any Queued Allocations 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 2ff2acbfc0 Added the job summary related endpoints 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 1cc0bc392b Setting the number of queued allocations per task group 2016-07-25 17:26:38 -07:00
Diptanu Choudhury e35369ec83 Fixed typos in comments 2016-07-13 13:25:07 -06:00
Diptanu Choudhury 487c66b84d Removing the queued state of Job Summary and alloc desired status false 2016-07-13 13:20:46 -06:00
Diptanu Choudhury daa83a4f3e Renamed jobsummary to job_summary 2016-07-12 16:00:35 -06:00
Diptanu Choudhury 00b9b4c6e8 Accounting lost state of allocations 2016-07-12 14:27:45 -06:00
Diptanu Choudhury e8d1aee3f4 Added a method for listing jobs whose id matches a prefix 2016-07-12 11:41:13 -06:00
Diptanu Choudhury 313d7aa7f5 Added a test to ensure client alloc updates are happening properly 2016-07-12 11:41:13 -06:00
Diptanu Choudhury 91b828d299 Updated logic to handle change in desired status of allocation when client status is still pending 2016-07-12 11:41:13 -06:00
Diptanu Choudhury 5e6f9ef69e Added methods to save and restore job summary snapshots 2016-07-12 11:41:13 -06:00
Diptanu Choudhury ba71757dfb handled the logic of task group count going up 2016-07-12 11:41:13 -06:00
Diptanu Choudhury 67953b1583 Added a test to ensure correctness of job summary when client updates alloc 2016-07-12 11:41:13 -06:00
Diptanu Choudhury 0606840080 Implemented logic to update the job summary when allocs are inserted 2016-07-12 11:41:13 -06:00
Diptanu Choudhury 083f81d17f Implemented job state accounting logic for upsert job 2016-07-12 11:41:13 -06:00
Diptanu Choudhury 4ea9ceee38 Handling allocations with client state pending 2016-07-12 11:29:23 -06:00
Diptanu Choudhury 2cf2ed6758 Changing the state of an allocation to lost if the node on which it was running was marked as down 2016-07-11 18:24:04 -06:00
Alex Dadgar 15936822a4 Worker annotates evals with their snapshot index 2016-05-24 20:10:56 -07:00
Armon Dadgar 4c4581a07e nomad/state: Allow UpdateAllocFromClient to take multiple allocs 2016-02-21 17:49:46 -08:00
Armon Dadgar abf7e52689 nomad: adding compound index on alloc terminal status 2016-02-20 11:24:06 -08:00
Alex Dadgar 2d98c0eadd Fix double pull with introduction of AllocModifyIndex 2016-02-01 15:43:59 -08:00
Alex Dadgar 41efdcb1c3 Add JobModifyIndex 2016-01-12 09:50:33 -08:00
Alex Dadgar 62a820196f Address comments 2016-01-11 17:48:32 -08:00
Alex Dadgar 9f4ec35f43 Set job status in state store 2016-01-11 17:48:32 -08:00
Ivo Verberk fd177f4c6f Bring up-to-date with master 2015-12-24 21:16:32 +01:00
Alex Dadgar 68506c7163 Remove parent index 2015-12-23 18:26:39 -08:00
Alex Dadgar 49dd0dc461 fixes from review 2015-12-23 18:26:39 -08:00
Alex Dadgar 0a8c49f36b Remove incorrect comment 2015-12-23 18:26:39 -08:00
Alex Dadgar 37c1f56921 Snapshot and restore 2015-12-23 18:26:39 -08:00
Alex Dadgar ea799b88cb merge 2015-12-23 18:26:39 -08:00
Alex Dadgar 9a7b363b94 Add periodic index to job table 2015-12-23 18:26:39 -08:00
Alex Dadgar 670cc50a02 merge 2015-12-23 18:26:39 -08:00
Ivo Verberk 7838b2a57c Refactoring
* Reverted changes to get methods
* Added prefix query parameter
* Updated node status to use prefix based searching
* Fixed tests
* Removed truncation logic
2015-12-22 23:44:33 +01:00
Ivo Verberk 33f73a1e8e Short identifiers functionality
* Use go-memdb prefix indexer for lookups
* Add Job lookups
* Update state store with new ByIDPrefix get methods
* Call new methods when exact lookup fails or is not applicable
2015-12-19 21:55:28 +01:00
Ivo Verberk 1d294df9ec Bring up-to-date with master 2015-12-19 21:55:10 +01:00
Alex Dadgar e2193c5c81 Merge pull request #586 from hashicorp/f-job-gc
Add garbage collection to jobs
2015-12-18 11:21:50 -08:00
Alex Dadgar fa71d95a8f Copy the task states from the client update 2015-12-17 15:33:57 -08:00
Alex Dadgar 2218a79815 Add garbage collection to jobs 2015-12-16 15:00:45 -08:00
Ivo Verberk acbbaf3e78 Allow lookups based on short identifiers
This change introduces the ability to specify identifiers for jobs,
allocs, evals and nodes on the command line with as little as one
character, provided that it uniquely identifies the resource. An error
with the possible results will be provided when the short identifier
has multiple results.
2015-12-12 18:28:20 +01:00
Ryan Uber b54309282f nomad/state: subscribe/unsubscribe all watch items while holding the lock 2015-10-30 08:46:03 -07:00
Ryan Uber d21c49dedd nomad: cleanup and more tests 2015-10-30 08:27:47 -07:00
Ryan Uber 1322b844ca nomad/state: add watch trigger tests 2015-10-29 21:42:41 -07:00
Ryan Uber 55cb559eae nomad: support blocking queries on eval-specific allocations 2015-10-29 16:20:57 -07:00
Ryan Uber a0e54d6f62 nomad: support blocking queries on job allocations 2015-10-29 15:32:05 -07:00
Ryan Uber 6b7ca19a76 nomad: export watcher to share between rpc and state store 2015-10-29 14:47:39 -07:00
Ryan Uber f5f01e6cd2 nomad: add triggering for more types of events 2015-10-29 13:52:15 -07:00
Ryan Uber 526c1c959b nomad: move state watcher into its own file, add tests 2015-10-29 13:21:25 -07:00
Ryan Uber eaeec03e1e nomad: deduplicate watch items with a helper 2015-10-29 12:09:09 -07:00
Ryan Uber a4ee8929e3 nomad: unify watcher inputs for reusability 2015-10-29 11:59:15 -07:00
Ryan Uber 692e4e371a nomad: support full table watches for allocations 2015-10-28 19:25:39 -07:00
Ryan Uber 4e70d52e29 nomad: support blocking queries on eval list 2015-10-28 18:34:56 -07:00
Ryan Uber 07b6597353 nomad/state: move methods so we can sanely find them 2015-10-28 18:11:55 -07:00
Ryan Uber 2c4735fbcf nomad: support blocking queries on nodes 2015-10-28 11:25:35 -07:00
Ryan Uber 04dcd3f440 nomad: use a generic full-table watcher 2015-10-28 11:15:54 -07:00
Ryan Uber ee44b43f33 nomad: initial pass at blocking queries for jobs 2015-10-27 17:58:04 -07:00
Alex Dadgar 2314bd7c2c Add scheduler type index to jobs table; create evals for system jobs on node init to ready transition 2015-10-20 10:57:53 -07:00
Armon Dadgar 5b02014e14 state: cleanup Get*By 2015-09-06 20:51:01 -07:00
Armon Dadgar b42742bf8f state: unify the terminology for code clarity 2015-09-06 20:39:06 -07:00
Armon Dadgar 82cba83eb6 state: Adding UpdateNodeDrain 2015-09-06 19:51:50 -07:00
Armon Dadgar b1a406f234 state: Adding eval lookup by job 2015-09-06 12:10:24 -07:00
Armon Dadgar 922eb37484 nomad: adding UpdateAllocFromClient for client based updates 2015-08-25 17:54:45 -07:00
Armon Dadgar 28069dd973 nomad: updating state for split 2015-08-25 16:26:34 -07:00
Armon Dadgar c362ca0ffd nomad/state: adding watching mechanisms 2015-08-22 18:57:15 -07:00
Armon Dadgar f04e2b81ba nomad: adding evicted state for allocs 2015-08-22 18:30:49 -07:00
Armon Dadgar a80249204f nomad: DeleteEval request can take a list of evals and allocations 2015-08-15 15:39:29 -07:00
Armon Dadgar 3f16a21658 nomad: remove NodesByDatacenterStatus 2015-08-15 13:11:42 -07:00
Armon Dadgar a077605114 nomad: adding NodesByDatacenterStatus 2015-08-13 13:17:03 -07:00
Armon Dadgar 343b1b9c89 nomad: move state and mocks into shared packages 2015-08-11 14:27:14 -07:00
Renamed from nomad/state_store.go (Browse further)