Commit Graph

20 Commits

Author SHA1 Message Date
Jin Dong
fc45365fa1 Remove most logrus
Signed-off-by: Jin Dong <jin.dong@databricks.com>
2023-08-26 14:31:53 -04:00
Fu Wei
e735405c15
Merge pull request #7951 from Iceber/fix_restart_monitor 2023-03-16 08:58:20 +08:00
Akihiro Suda
35a103d321
Remove "containerd.io/restart.logpath" label (deprecated since v1.5)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-03-15 09:00:11 +09:00
Iceber Gu
e0d9b96631 Fix restarting the paused containers
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-14 17:42:36 +08:00
Maksym Pavlenko
500ff95f02 Make getServicesOpts a helper
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-22 19:38:45 -07:00
Ye Sijun
35994a475c
fix monitor restart
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2022-04-20 21:44:29 +08:00
Ye Sijun
22cd13b370
fix nil pointer panic for monitor
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2022-04-20 15:04:36 +08:00
Fu Wei
9503d7219e
Merge pull request #6744 from Junnplus/restart-policy
Add restart policy for enhanced restart manager
2022-04-20 00:12:31 +08:00
Derek McGowan
fe8da6dcaf
Move lease manager plugin to separate package
Create lease plugin type to separate lease manager from services plugin.
This allows other service plugins to depend on the lease manager.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-15 11:08:47 -07:00
Ye Sijun
3df7674058 add restart policy for enhanced restart manager
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2022-04-09 01:04:11 +08:00
haoyun
bbe46b8c43 feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: zounengren <zouyee1989@gmail.com>
2022-01-07 10:27:03 +08:00
Derek McGowan
0a0621bb47
Move plugin context events into separate plugin
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-08-05 22:59:20 -07:00
Brian Goff
0a8802df67 Allow WithServices to use custom implementations
Before this change, for several of the services that `WithServices`
handles, only the grpc client is supported.
Now, for instance, one can use an `images.Store` directly instead of
only an `imagesapi.StoreSlient`.

Some of the methods have been renamed to satisfy the difference between
using a grpc `<Foo>Client` vs the main interface.

I did not see a good candidate for TaskService so have left that mostly
unchanged.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-07-09 23:30:40 +00:00
Derek McGowan
9884730e5c
Merge pull request #5069 from AkihiroSuda/restart-fast
restart: skip Sleep() for the first iteration of the reconcilation
2021-02-25 16:37:53 -08:00
Akihiro Suda
6ab6eaa790
restart: skip Sleep() for the first iteration of the reconcilation
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-02-25 13:30:38 +09:00
Akihiro Suda
b23dc1131e
restart: parallelize reconcile()
The only shared variable `m.client` is thread-safe, so we can safely
parallelize the loops.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-02-25 13:30:00 +09:00
Wei Fu
d656fa38ca restart plugin: support binary log uri
Introduce LogURIGenerator helper function in cio package. It is used in
the restart options, like WithBinaryLogURI and WithFileLogURI.

And restart.LogPathLabel might be used in production and work well. In
order to reduce breaking change, the LogPathLabel is still recognized if
new LogURILabel is not set. In next release 1.5, the LogPathLabel will
be removed.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-06-10 00:09:24 +08:00
Michael Crosby
23fbdbaf13 Cleanup workdirs on manager load
This cleans up persistent work dirs on TaskManager boot.  These dirs can
be left behind in a machine reboot.  The state in /run will not exist
but the work dir in the root does, we should cleanup work dirs when
tasks are not loaded.

This also improves error handling that would prevent the task manager
from loading when a single task fails to load or cleanup.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-07-30 10:21:04 -04:00
Derek McGowan
8cf3fad8d4
Add leases manager interface
Add leases manager to the leases package and use the
interface on the client and service.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-07-18 10:43:37 -07:00
Michael Crosby
c87ed12da5 Move restart pkg to runtime
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-05-22 17:13:40 -04:00