Michael Schurter
079f425c32
client: always mark exited sys/svc allocs as failed
...
When restarts.attempts=0 was set in a jobspec a system or service alloc
that exited with 0 status would be marked as `completed` instead of
`failed`. Since system and service jobs are intended to run until
stopped or updated, they should always be marked as failed when they
exit even in cases where the exit code is 0.
2018-03-27 14:30:19 -07:00
Alex Dadgar
a9e3a41407
Enable more linters
2017-09-26 15:26:33 -07:00
Michael Schurter
cde908e35d
Cleanup and test restart failure code
2017-09-15 14:54:37 -07:00
Michael Schurter
80147622c5
Add comments
2017-09-15 14:34:36 -07:00
Michael Schurter
a508bb9709
Fold SetFailure into SetRestartTriggered
2017-09-14 16:48:39 -07:00
Michael Schurter
10dc1c7900
DRY up restart handling a bit.
...
All 3 error/failure cases share restart logic, but 2 of them have
special cased conditions.
2017-09-14 16:48:39 -07:00
Michael Schurter
ebbf87f979
Use existing restart policy infrastructure
2017-09-14 16:46:54 -07:00
Michael Schurter
774cb8dd9b
Improve artifact download error message
...
Fixes #2289
Unfortunately took more RecoverableError hijinx than I would have liked.
There might be a better way.
2017-03-24 15:26:05 -07:00
Alex Dadgar
42f7bc8e81
Thread through whether DeriveToken error is recoverable or not
2016-10-22 18:08:30 -07:00
Alex Dadgar
ae288a3ee6
Tests
2016-10-18 11:24:20 -07:00
Alex Dadgar
d200a835c9
Fix handling of restart in TaskEvents
2016-10-06 15:06:54 -07:00
Mathias Lafeldt
b0b3e5e1f6
Fix typo: atttempts
2016-08-02 18:11:03 +02:00
Cameron Davison
f255464bf4
if policy mode is delay, do not fail for multiple startup failures, delay instead
2016-07-11 20:40:53 -05:00
Alex Dadgar
6e779b863e
Explain restart decision and display in alloc-status
2016-03-25 12:47:14 -07:00
Alex Dadgar
e0224b8a35
Refactor task runner to include driver starting into restart policy and add recoverable errors
2016-02-28 16:56:05 -08:00
Alex Dadgar
03aca9887b
Client handles updates to KillTimeout and Restart Policy
2016-02-03 19:43:44 -08:00
Alex Dadgar
a2132950a5
Restart on-success shouldn't be user specifiable
2016-02-02 17:35:06 -08:00
Ryan Uber
d924de9bd0
client: obey restart policy when attempts == 0
2016-02-02 14:17:39 -08:00
Alex Dadgar
e91abac0f6
Fix a bunch of tests
...
Up timeouts
trusty travis beta
Increase timeouts
2016-01-20 16:03:53 -08:00
Alex Dadgar
95f93396e5
Fix test because of jitter
2015-12-18 12:17:54 -08:00
Alex Dadgar
b48a8e3762
Add jitter
2015-12-18 12:17:54 -08:00
Alex Dadgar
b46bb0a02d
Make NewRestartTracker private
2015-12-18 12:17:54 -08:00
Alex Dadgar
3122433b47
merge
2015-12-18 12:17:13 -08:00
Diptanu Choudhury
b6cb7d0d7b
Updated changelog
2015-11-23 11:01:41 -08:00
Diptanu Choudhury
27ad0ad253
Making the restart tracker aware of the exit codes
2015-11-23 10:56:38 -08:00
Alex Dadgar
f4b461f97a
Track Task State in the client and capture Wait results
2015-11-16 15:14:21 -08:00
Diptanu Choudhury
64c1a0b18c
Fixed some tests and refactored logic
2015-11-05 17:30:41 -08:00
Diptanu Choudhury
93184d9a45
Incremeneting the counter once we calculate next restart
2015-11-05 17:13:25 -08:00
Diptanu Choudhury
cf76e3a456
Passing restart tracker in the task runner
2015-11-05 16:38:19 -08:00
Diptanu Choudhury
2e168af9d3
Cleaned up the logic to calculate restart duration
2015-11-05 15:16:29 -08:00