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
Michael Schurter
45494f7304
Fix port labels on mock Alloc/Job/Node
2017-12-08 14:50:06 -08: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
Alex Dadgar
4173834231
Enable more linters
2017-09-26 15:26:33 -07: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
84d06f6abe
Sync namespace changes
2017-09-07 17:04:21 -07:00
Alex Dadgar
0aef02a4f9
fix test
2017-08-21 14:07:54 -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
Alex Dadgar
4f69355a66
Fix incorrect destructive update with distinct_property constraint
...
This PR fixes an issue in which an update to a task group with a
distinct property constraint would result in an incorrect destructive
update.
2017-07-31 11:17:35 -07:00
Alex Dadgar
ce265e0aff
Update full node test to test more advanced case
2017-07-20 12:23: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
20005f925a
Rolling node drains using max_parallel and stagger
...
This PR adds rolling node drains done at max_parallel and stagger of the
update spec. It brings it inline with old behavior.
2017-07-07 12:12:48 -07:00
Alex Dadgar
d352d85bb9
Test scheduler's handling of canaries/inplace updates
2017-07-07 12:10:04 -07:00
Alex Dadgar
e229d3650b
Attach eval id
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
b2573b01f9
Fix canary handling
2017-07-07 12:03:11 -07:00
Alex Dadgar
c77944ed29
assign names
2017-07-07 12:03:11 -07:00
Alex Dadgar
b3f4db0930
cancel deployments
2017-07-07 12:01:17 -07:00
Alex Dadgar
3145086a42
non-purge deregisters
2017-04-15 17:08:05 -07:00
Alex Dadgar
2c31d4036b
Skip inplace update on terminal batch allocation
...
This PR skips adding an inplace update to a successfully terminal batch
job to the plan. This avoids extra data in the plan and avoids
triggering updates on all clients that have the terminal allocation.
This is matching behavior of the service scheduler.
/cc @armon for review
2017-03-11 17:19:22 -08:00
Alex Dadgar
b65d248dee
Fix filtering issue and add a test that would catch it
2017-03-09 16:20:39 -08:00
Alex Dadgar
a439bf709d
Property Set
2017-03-08 17:50:40 -08:00
Alex Dadgar
d83a8fe9f2
Unoptimized implementation + testing
2017-03-07 14:48:54 -08:00
Alex Dadgar
04862ca10e
Tests compile
2017-02-07 21:30:57 -08:00
Diptanu Choudhury
9cdd576720
Updated changelog and fixed tests
2016-12-20 11:32:17 -08:00
Diptanu Choudhury
dae7f88118
Not setting a drained node as preferred node ( #1740 )
2016-09-23 21:15:50 -07:00
Diptanu Choudhury
1b3c5e98c8
Renaming LocalDisk to EphemeralDisk ( #1710 )
...
Renaming LocalDisk to EphemeralDisk
2016-09-14 15:43:42 -07:00
Diptanu Choudhury
52e9946da9
Implemented SetPrefferingNodes in stack
2016-08-30 16:17:50 -07:00
Diptanu Choudhury
3447658bba
Added scheduler tests to ensure disk constraints are honored
2016-08-25 15:31:56 -05:00
Diptanu Choudhury
1de89776d7
Marking an allocation chained if we are creating this to replace an old one
2016-08-15 17:52:41 -07:00
Diptanu Choudhury
13bab5b1ad
Added scheduler tests
2016-08-09 14:52:25 -07:00
Alex Dadgar
e33bda76bf
test sched doesn't mark complete as lost + core_sched tests
2016-08-04 11:24:17 -07:00
Alex Dadgar
ac3328e812
Make scheduler mark allocations as lost
2016-08-03 15:57:46 -07:00
Alex Dadgar
ddbd9261c1
Merge pull request #1471 from hashicorp/b-handle-old-batch-allocs
...
filterCompleteAllocs filters replaced batch allocs
2016-07-28 14:31:19 -07:00
Diptanu Choudhury
eb08405467
Updated tests and added logic to system sched
2016-07-28 14:02:50 -07:00
Diptanu Choudhury
2e84d246f9
fixed a comment
2016-07-28 12:22:44 -07:00
Diptanu Choudhury
48eda99dd9
Setting the queued count as zero if there is nothing to place
2016-07-28 12:13:35 -07:00
Diptanu Choudhury
4a8636cb61
Added a test
2016-07-27 17:49:53 -07:00
Alex Dadgar
c132952ba2
filterCompleteAllocs filters replaced batch allocs
2016-07-27 11:54:55 -07:00
Diptanu Choudhury
d1682e052a
Added a test for adjustQueuedAllocations
2016-07-25 17:31:40 -07:00
Diptanu Choudhury
09aa867cc2
Added a test to ensure we record the queued allocations correctly when the plan made partial progress
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
8f0d2a2775
Fixed some more tests
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
4a17d8e6d6
Added a test to ensure failed batch allocations are being added to the number of queued allocations
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
cce5f483ae
Added some more tests
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
487c66b84d
Removing the queued state of Job Summary and alloc desired status false
2016-07-13 13:20:46 -06:00
Alex Dadgar
e90529afc9
test for max plan
2016-06-20 17:56:49 -07:00
Alex Dadgar
6a236872b4
address comment
2016-05-25 10:30:47 -07:00