1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

14 commits

Author SHA1 Message Date
Sebastiaan van Stijn
2c31edbbb6
unconvert: remove unnescessary conversions
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:57:33 +02:00
Brian Goff
eaad3ee3cf Make sure timers are stopped after use.
`time.After` keeps a timer running until the specified duration is
completed. It also allocates a new timer on each call. This can wind up
leaving lots of uneccessary timers running in the background that are
not needed and consume resources.

Instead of `time.After`, use `time.NewTimer` so the timer can actually
be stopped.
In some of these cases it's not a big deal since the duraiton is really
short, but in others it is much worse.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-01-16 14:32:53 -08:00
Daniel Nephin
4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00
milindchawre
9bd3a7c029 Adding support for docker max restart time
Signed-off-by: milindchawre <milindchawre@gmail.com>
2017-02-04 03:54:47 +00:00
yuexiao-wang
0a0bbab81d Optimize the unit test for restartmanager
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-25 00:21:58 +08:00
Michael Crosby
91e197d614 Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00
bin liu
950073aabb fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
2016-06-21 15:29:25 +08:00
Vincent Demeester
17d5c97c90 Merge pull request #22125 from crosbymichael/restart-timeout
Reset restart timeout if execution longer than 10s
2016-04-25 19:15:32 +02:00
Michael Crosby
b6db56b5eb Reset restart timeout if execution longer than 10s
Restore the 1.10 logic that will reset the restart manager's timeout or
backoff delay if a container executes longer than 10s reguardless of
exit status or policy.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-22 10:37:34 -07:00
Michael Crosby
fc2e2234c6 Remove restart canceled error
It should not be an error to call a common option to cancel restarts.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-19 10:46:21 -07:00
Lei Jitang
494297baf8 Don't throw "restartmanager canceled" error for no restart policy container
Don't throw "restartmanager canceled" error for no restart policy container
and add the container id to the warning message if a container has restart policy
and has been canceled.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-04-14 21:40:20 -04:00
Zhang Wei
51e42e6ee0 Fix ShouldRestart for on-failure handle
Currently if you restart docker daemon, all the containers with restart
policy `on-failure` regardless of its `RestartCount` will be started,
this will make daemon cost more extra time for restart.

This commit will stop these containers to do unnecessary start on
daemon's restart.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-10 15:44:47 +08:00
Zhang Wei
a705e166cf Fix critical bug: can't restart a restarting container
When user try to restart a restarting container, docker client report
error: "container is already active", and container will be stopped
instead be restarted which is seriously wrong.

What's more critical is that when user try to start this container
again, it will always fail.

This error can also be reproduced with a `docker stop`+`docker start`.

And this commit will fix the bug.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-08 22:02:30 +08:00
Tonis Tiigi
9c4570a958 Replace execdrivers with containerd implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-03-18 13:38:32 -07:00