Alex Dadgar
300b1a7a15
Tests only use testlog package logger
2018-06-13 15:40:56 -07:00
Preetha Appan
b64788043e
make test create index clearer
2018-06-05 17:29:59 -05:00
Preetha Appan
3e264dcb79
Fix reconciler bug with deployment not being created if job create index is different
...
This fixes an issue where if a job is purged and resubmitted Nomad does not create
a new deployment. Adds unit test that failed before this fix
2018-06-05 13:58:53 -05:00
Preetha Appan
f8a23bc54a
fix test comment
2018-05-09 16:01:34 -05:00
Preetha Appan
ef531b0f34
Add unit tests for forced rescheduling
2018-05-09 11:30:42 -05:00
Alex Dadgar
555d14fd92
Add test
2018-05-07 14:55:01 -05:00
Alex Dadgar
8626c1b94a
Reschedule when we have canaries properly
2018-05-07 14:55:01 -05:00
Alex Dadgar
8dee3ab068
canary reschedule test
2018-05-07 14:50:01 -05:00
Alex Dadgar
deb93dc7b7
Test for rescheduling when there are canaries
2018-05-07 14:50:01 -05:00
Alex Dadgar
550f5e31f8
Allow canary count greater than desired
2018-05-07 14:50:01 -05:00
Preetha Appan
5329900f6d
Only use DesiredTransition.Reschedule in reconciler when its an active deployment
2018-05-07 14:50:01 -05:00
Alex Dadgar
e7444c3873
Add test where deployment is marked as complete when done even with failed allocs
2018-05-07 14:50:01 -05:00
Alex Dadgar
57969b4ee0
fix reconcile tests
2018-05-07 14:50:01 -05:00
Preetha Appan
7e17bc231f
remove unnecessary check and other fixes from code review
2018-04-04 07:35:20 -05:00
Preetha Appan
00537c739b
Fixes edge cases around timing and task finish time being set more than once
2018-04-03 16:34:59 -05:00
Preetha Appan
38a7614776
Refactored for readability, pair programmed with @dadgar
2018-03-29 13:28:37 -05:00
Preetha Appan
5090fefe96
Filter out allocs with DesiredState = stop, and unit tests
2018-03-29 09:28:52 -05:00
Preetha Appan
33e170c15d
s/linear/constant/g
2018-03-26 14:45:09 -05:00
Preetha
5668c3c38e
Merge pull request #4037 from hashicorp/b-fix-terminal-filtering-service-allocs
...
Fix edge case in reconciler
2018-03-26 13:14:51 -05:00
Preetha Appan
1b9e413a1a
one field per line in struct definition
2018-03-26 13:13:21 -05:00
Alex Dadgar
e106da84de
name and test
2018-03-26 11:06:21 -07:00
Alex Dadgar
e2a6e64fca
Don't create unnecessary deployments
2018-03-23 16:55:21 -07:00
Preetha Appan
cbfd69ce7a
Fix edge case in reconciler where service jobs with ClientstatusComplete were not replaced
2018-03-23 18:41:00 -05:00
Alex Dadgar
3b72dd94ba
Do not mark an allocation as an inplace update if specification hasn't changed
2018-03-23 14:36:05 -07:00
Alex Dadgar
92b636dd32
Fix deadline handling
2018-03-21 16:51:44 -07:00
Michael Schurter
d1ec65d765
switch to new raft DesiredTransition message
2018-03-21 16:49:48 -07:00
Alex Dadgar
db4a634072
RPC, FSM, State Store for marking DesiredTransistion
...
fix build tag
2018-03-21 16:49:48 -07:00
Preetha Appan
9a5e6edf1f
Rename DelayCeiling to MaxDelay
2018-03-14 16:10:32 -05:00
Preetha Appan
5373ade731
Scheduler and Reconciler changes to support delayed rescheduling
2018-03-14 16:10:32 -05:00
Preetha Appan
7b6ba7a1f4
Fixes bug in reconciler where previously rescheduled allocs are rescheduled again. Simplified logic and added test case to catch this.
2018-02-20 12:07:56 -06:00
Preetha Appan
d48c411692
Reconciler should consider failed allocs when marking deployment as failed.
2018-02-02 19:40:25 -06:00
Preetha Appan
b6268a5fab
Beef up unit test for rescheduling batch jobs
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
bd89d2b39e
Make sure that reschedule trackers are not added for node drain replacements
2018-01-31 09:56:53 -06:00
Preetha Appan
a662b38801
Improve reconciler unit tests
2018-01-31 09:56:53 -06:00
Preetha Appan
3b4d7ac2a3
Fix some typos
2017-12-14 13:29:27 -06:00
Alex Dadgar
746cd7403f
Allow batch jobs to be rerun if purged
...
This PR allows batch jobs to be rerun if they have been purged.
2017-10-13 12:40: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
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
27256ebcc6
Placing allocs counts towards placement limit
...
This PR makes placing new allocations count towards the limit. We do not
restrict how many new placements are made by the limit but we still
count towards the limit. This has the nice affect that if you have a
group with count = 5 and max_parallel = 1 but only 3 allocs exist for it
and a change is made, you will create 2 more at the new version but not
destroy one, taking you down to two running as you would have
previously.
Fixes https://github.com/hashicorp/nomad/issues/3053
2017-08-21 12:41:19 -07:00
Luke Farnell
f0ced87b95
fixed all spelling mistakes for goreport
2017-08-07 17:13:05 -04:00
Alex Dadgar
7b13c0d702
Lost allocs replaced even if deployment failed
...
This PR allows the scheduler to replace lost allocations even if the job
has a failed or paused deployment. The prior behavior was confusing to
users.
Fixes https://github.com/hashicorp/nomad/issues/2958
2017-08-03 17:42:14 -07:00
Alex Dadgar
492239d3ee
Improve multiple group handling in a deployment
...
This PR resolves a bug in which a job with multiple task groups would
create new deployment objects each, thus clearing out all other task
groups deployment state.
2017-07-25 11:27:47 -07:00
Alex Dadgar
a9ec1d6ca7
Fix update limit calculation to avoid panic
...
This PR fixes the rolling update limit calculation to avoid a panic when
there are more allocations for a deployment that haven't determined
their health than the max_parallel count of the task group.
Fixes https://github.com/hashicorp/nomad/issues/2820
2017-07-19 11:11:47 -07:00
Alex Dadgar
66a90326e1
Treat destructive updates atomically
2017-07-16 10:35:38 -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
3a29b38108
Status description shows requiring promotion
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
454083ba1b
Remove canary
2017-07-07 12:10:04 -07:00
Alex Dadgar
83c60483f2
Test marking as complete
2017-07-07 12:10:04 -07:00