Justin Terry (VM)
a8cc66b37a
Fix store error serialization to gRPC status codes
...
The pkg/store errors are duplicated errors of NotFound and AlreadyExist from
containerd's errdefs package and thus do not properly serialize when running
errdefs.ToGRPC on them. CRI runs this function on every return from a CRI
method so the conversion fails if there is a cache miss from the store caches
for containers or sandboxes. This change verifies that the errors are properly
converted to their gRPC values.
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2020-02-05 18:32:45 -08:00
Lantao Liu
facbaa0e79
Better handle unknown state.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-12-06 10:56:27 -08:00
Antonio Ojea
fcd6bf318b
Report Additional POD IPs
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-09-18 17:21:37 -07:00
Lantao Liu
ba8788c6b9
Update kubernetes dependency to 1.15.0.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-07-31 23:52:03 -07:00
Lantao Liu
fe0cb22026
Do not cache image handler.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-07-24 15:38:18 -07:00
Mike Brown
bc3b49efdf
Merge pull request #1160 from Random-Liu/remove-unused-todo
...
Remove an unused TODO.
2019-06-10 16:21:42 +02:00
Lantao Liu
09f83a337f
Remove an unused TODO.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-06-07 15:42:04 -07:00
Mike Brown
b87c0d74a5
adds cni config data to the cri status/info
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2019-06-05 16:39:45 -05:00
Lantao Liu
d1f9611cb0
Use wait instead of TaskExit
.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-04-18 00:18:26 -07:00
Shengjing Zhu
c6729fe0c4
Use ParseSignal and AtomicWriteFile functions from containerd
...
Containerd has its own ParseSignal and AtomicWriteFile implementation.
So there's no need to use these function from github.com/docker/docker.
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2019-03-08 00:51:04 +08:00
Lantao Liu
83af4dad87
Support unknown state for sandbox and container
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-02-05 11:56:24 -08:00
Lantao Liu
4dc6f6d0b5
Add state machine for sandbox and container
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-02-05 11:56:24 -08:00
Lantao Liu
bfd25c80b4
Change StateUnknown to StateInit
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-02-04 11:24:49 -08:00
zhoulin xie
ae1b7ac4fd
Fix some typos in comment
...
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-01-17 15:50:46 +08:00
Lantao Liu
515ef02473
Remove container lifecycle image ref dependency.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-12-07 10:40:21 -08:00
Mike Brown
f8e89f71a9
adds cni results to verbose pod info
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2018-11-26 15:57:00 -06:00
Lantao Liu
c1740d8291
Manage mount lifecycle and remove cached state
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-10-24 11:00:25 -07:00
Lantao Liu
c39f63eaf4
Teardown pod network even if the network namespace is closed
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-10-10 13:10:18 -07:00
Lantao Liu
963a01735b
Add timeout for container/sandbox recover and event monitor.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-09-26 15:23:15 -07:00
Lantao Liu
4b45e16a4b
Show runtime handler in sandbox debug info.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-09-16 21:27:51 -07:00
Lantao Liu
953d67d250
Create image reference cache.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-09-10 11:30:52 -07:00
Kir Kolyshkin
daeab40b45
os.Unmount: do not consult mountinfo, drop flags
...
1. Currently, Unmount() call takes a burden to parse the whole nine yards
of /proc/self/mountinfo to figure out whether the given mount point is
mounted or not (and returns an error in case parsing fails somehow).
Instead, let's just call umount() and ignore EINVAL, which results
in the same behavior, but much better performance.
This also introduces a slight change: in case target does not exist,
the appropriate error (ENOENT) is returned -- document that.
2. As Unmount() is always used with MNT_DETACH flag, let's drop the
flags argument. This way, the only reason of EINVAL returned from
umount(2) can only be "target is not mounted".
3. While at it, remove the 'containerdmount' alias from the package.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-04-30 12:54:10 -07:00
abhi
aeef99a76e
Using netns to perform socat
...
This commit removes the usage of nsenter and uses netns
to perform socat operation.
Signed-off-by: abhi <abhi@docker.com>
2018-04-05 13:28:00 -07:00
Lantao Liu
f4c9ef2647
Add symlink follow into unmount util.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-24 01:25:31 +00:00
Lantao Liu
e1fe1abff0
Use github.com/pkg/errors
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-17 02:24:38 +00:00
Mike Brown
d4e7154625
move links for cri-containerd to cri
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2018-03-13 17:06:26 -05:00
Stephen J Day
4ed26f3116
pkg/store: use a sync.Once to synchronize channel close
...
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2018-03-09 14:43:16 -08:00
Lantao Liu
f5390d01d6
Fix a potential panic
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-22 03:17:16 +00:00
Lantao Liu
605b4a7b6a
Update imports
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-08 02:45:44 +00:00
Yanqiang Miao
61c1fdb098
Use channel to propagate the stop info of sandbox
...
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2018-01-26 16:58:13 +08:00
Lantao Liu
df58d6825d
Avoid containerd access as much as possible.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-25 23:36:00 +00:00
Yanqiang Miao
c663d2423e
Use channel to pass the stop info instead of polling for container stop
...
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2018-01-25 11:07:54 +08:00
Lantao Liu
025ffe551f
Rename kubernetes-incubator/cri-containerd to containerd/cri-containerd.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-10 22:35:33 +00:00
abhi
f1dbc0b375
Caching IP allocated by CNI plugin
...
Signed-off-by: abhi <abhi@docker.com>
2018-01-04 20:00:55 -08:00
Lantao Liu
e4753edf0a
Minor cleanup.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-12-13 03:15:01 +00:00
Mike Brown
31223fd5b1
adds oci image spec to image info placed into imagestore
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-12-12 15:58:07 -06:00
Lantao Liu
5ed43ea1a3
Update containerd to fix long exec issue.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-11-30 19:24:14 +00:00
Lantao Liu
1b05f088b5
Merge pull request #375 from yanxuean/image-trunc
...
support get image by truncindex
2017-11-27 11:36:58 -08:00
yanxuean
cbe7f0dd5a
use docker.digestSet store image truncid
...
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-11-23 10:55:59 +08:00
Lantao Liu
76268ea242
Do not remove sandbox when netns is not closed.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-11-21 01:22:19 +00:00
Lantao Liu
73c2cb5632
Fix spammy CNI log.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-11-03 01:08:07 +00:00
Lantao Liu
4eaaee380f
Fix removing state recover.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-10-31 20:03:58 +00:00
Lantao Liu
61d598d00f
Merge pull request #235 from yanxuean/truncindex
...
Add Truncindex for container, sandbox and image
2017-10-11 21:03:16 -07:00
yanxuean
5ee3423820
add truncindex
...
fix #222
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-10-12 10:32:20 +08:00
Lantao Liu
e78c85f76b
Use new container update function
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-10-06 17:57:26 +00:00
Lantao Liu
a81a47bf9b
Fix update container resources
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-10-03 06:03:39 +00:00
Lantao Liu
491400c892
Add ImageFsInfo support
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-25 21:02:29 +00:00
Lantao Liu
ce9d27bd94
Fix checkpoint recovery.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-21 21:10:38 +00:00
Lantao Liu
cc1b0b6709
Add restart recovery logic.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-21 17:59:46 +00:00
yanxuean
e1a7a0ea76
Switch to containerd extension
...
fix #251
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-09-21 00:15:10 +08:00