Commit Graph

22 Commits

Author SHA1 Message Date
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
Michael Schurter
cde908e35d Cleanup and test restart failure code 2017-09-15 14:54:37 -07:00
Michael Schurter
a508bb9709 Fold SetFailure into SetRestartTriggered 2017-09-14 16:48:39 -07:00
Alex Dadgar
42f7bc8e81 Thread through whether DeriveToken error is recoverable or not 2016-10-22 18:08:30 -07:00
Alex Dadgar
d200a835c9 Fix handling of restart in TaskEvents 2016-10-06 15:06:54 -07:00
Kenjiro Nakayama
f48bbe86ae Fix gofmt in restarts_test.go 2016-07-30 21:11:06 +09:00
Cameron Davison
f88432427a test policy delay for startup error 2016-07-11 20:54:36 -05: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
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
Chris Hines
dff2460d03 Allow for low precision time.Now on Windows. 2015-12-21 10:43:45 -05:00
Alex Dadgar
95f93396e5 Fix test because of 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
b3f6f1aec3 removing redundant fail() 2015-11-23 10:59:07 -08:00
Diptanu Choudhury
27ad0ad253 Making the restart tracker aware of the exit codes 2015-11-23 10:56:38 -08:00
Diptanu Choudhury
f695f687f8 Refactored test 2015-11-05 17:33:03 -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
ac6f7eded5 Fixing the test 2015-11-05 15:26:00 -08:00
Diptanu Choudhury
2e168af9d3 Cleaned up the logic to calculate restart duration 2015-11-05 15:16:29 -08:00