Derek McGowan
b550526ccd
Use cleanup.Background instead of context.Background for cleanup
...
Use the cleanup context to re-use values from the original context
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-01-04 11:22:24 -08:00
Wei Fu
6b7e237fc7
chore: use go fix
to cleanup old +build buildtag
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-29 14:25:14 +08:00
Maksym Pavlenko
ff65fc2d0e
Make TaskList generic
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-10 14:02:53 -07:00
Kazuyoshi Kato
88c0c7201e
Consolidate gogo/protobuf dependencies under our own protobuf package
...
This would make gogo/protobuf migration easier.
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-19 15:53:36 +00:00
Kazuyoshi Kato
80b825ca2c
Remove gogoproto.stdtime
...
This commit removes gogoproto.stdtime, since it is not supported by
Google's official toolchain
(see https://github.com/containerd/containerd/issues/6564 ).
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-19 13:39:30 +00:00
Kazuyoshi Kato
96b16b447d
Use typeurl.Any instead of github.com/gogo/protobuf/types.Any
...
This commit upgrades github.com/containerd/typeurl to use typeurl.Any.
The interface hides gogo/protobuf/types.Any from containerd's Go client.
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-24 20:50:07 +00: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
Eng Zer Jun
50da673592
refactor: move from io/ioutil to io and os package
...
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil . This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-09-21 09:50:38 +08:00
Akihiro Suda
d3aa7ee9f0
Run go fmt
with Go 1.17
...
The new `go fmt` adds `//go:build` lines (https://golang.org/doc/go1.17#tools ).
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-22 09:31:50 +09:00
Phil Estes
7d4c95ff04
Merge pull request #5813 from mxpv/shim_cleanup
...
Cleanup v2 shim
2021-08-11 11:47:47 -04: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
Maksym Pavlenko
d30d897ef9
Cleanup v2 shim
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-08-04 10:38:05 -07:00
Shiming Zhang
fe787efa2b
Fix error log when kill shim
...
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2021-03-19 19:03:47 +08:00
Wei Fu
18e581dd91
bugfix: cleanup dangling shim by brand new context
...
When there is timeout or cancel for create container, killShim will fail
because of canceled context. The shim will be dangling and unmanageable.
Need to use new context to do cleanup.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-02-21 16:49:58 +08:00
Derek McGowan
0b224ac7d6
Update metadata interfaces for containers and leases
...
Add more thorough dirty checking across all types which
may be deleted and hold references.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-09-23 15:27:39 -07:00
Michael Crosby
6601b406b7
Refactor runtime code for code sharing
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-07-08 11:47:53 -04:00
Jing Rui
9e0cd529d3
fix shim std logs not close after shim exit
...
Signed-off-by: Jing Rui <jingrui@huawei.com>
2019-06-10 11:50:07 +08:00
Derek McGowan
c9c555cd71
Merge pull request #3226 from Ace-Tang/kill_shim_in_clean
...
runtime-v1: kill shim in exit handler
2019-05-22 11:56:40 -07:00
Ace-Tang
5b7a327c47
Improve atomic delete
...
skip hidden directories in load task, and return soon if path not exist
in atomicDelete
carry of #3233
Closes #3233
Signed-off-by: Ace-Tang <aceapril@126.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-05-20 20:13:35 +00:00
Li Yuxuan
66036d9206
v1: Respect the shim_debug
flag when load tasks
...
Currently when we restart containerd it will load all tasks with shim
logs whether the `shim_debug` is set or not.
Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-05-13 23:51:16 +08:00
Ace-Tang
dfa51c9279
runtime-v1: kill shim in cleanupAfterDeadShim
...
1. kill shim in cleanupAfterDeadShim avoid shim leak
2. refactor cleanupAfterDeadShim, get pid from bundle
path instead of make pid as a parameter
Signed-off-by: Ace-Tang <aceapril@126.com>
2019-04-22 14:29:40 +08:00
Lantao Liu
9cc58781fa
Check task list to avoid unnecessary cleanup.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-04-11 16:29:09 -07:00
Michael Crosby
35582cb7a3
Merge pull request #2899 from fuweid/proposal-add-Add-method-in-PlatformRuntime
...
runtime: add Add/Delete method in PlatformRuntime interface
2019-01-22 13:48:39 -05:00
Wei Fu
568b5be936
runtime: add Add/Delete method in PlatformRuntime interface
...
The two new method Add/Delete can allow custom plugin to add or migrate
existing task into major Runtime plugin.
close : #2888
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2018-12-29 13:56:38 +08:00
Michael Crosby
36e4dc603e
Ensure bundle removal is atomic
...
This makes bundle removal atomic by first renaming the bundle and
working directories to a hidden path before removing the underlying
directories.
Closes #2567
Closes #2327
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-12-20 13:45:18 -05:00
Julia Nedialkova
1d4105cacf
Use named pipes for shim logs
...
Relating to issue [#2606 ](https://github.com/containerd/containerd/issues/2606 )
Co-authored-by: Oliver Stenbom <ostenbom@pivotal.io>
Co-authored-by: Georgi Sabev <georgethebeatle@gmail.com>
Co-authored-by: Giuseppe Capizzi <gcapizzi@pivotal.io>
Co-authored-by: Danail Branekov <danailster@gmail.com>
Signed-off-by: Oliver Stenbom <ostenbom@pivotal.io>
Signed-off-by: Georgi Sabev <georgethebeatle@gmail.com>
Signed-off-by: Giuseppe Capizzi <gcapizzi@pivotal.io>
Signed-off-by: Danail Branekov <danailster@gmail.com>
2018-11-16 16:11:43 +02:00
John Howard
2586f3fbb9
boltdb/bolt --> go.etcd.io/bbolt
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-12 15:23:57 -07:00
Claudia Beresford
32e6aa742b
Fix teeny tiny typos
...
Signed-off-by: Claudia Beresford <cberesford@pivotal.io>
2018-09-05 14:44:44 +01:00
yanxuean
517930187e
remove useless parameter from newTask
...
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2018-09-04 10:59:00 +08:00
Michael Crosby
da1b5470cd
Runtime v2
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-07-17 10:21:29 -04:00