Akihiro Suda
2eeb4b6238
Merge pull request #8373 from Iceber/shim_run
...
runtime/shim: rename RunManager to Run and remove `runc/v2/services` package
2023-05-12 00:46:46 +09:00
Danny Canter
df65e321ee
Simplify closing bundle dir fd
...
Follow-up to #8489 . We don't need to call Close in the err and success
cases, we can just do it after Readdirnames returns.
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-05-09 17:22:04 -07:00
Danny Canter
f5211ee3fc
Change to Readdirnames for some cases
...
There was a couple uses of Readdir/ReadDir here where the only thing the return
value was used for was the Name of the entry. This is exactly what Readdirnames
returns, so we can avoid the overhead of making/returning a bunch of interfaces
and calling lstat everytime in the case of Readdir(-1).
https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/os/dir_unix.go;l=114-137
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-05-08 00:41:13 -07:00
Maksym Pavlenko
6f34da5f80
Cleanup logrus imports
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-05 11:54:14 -07:00
Derek McGowan
7d7aac7dae
Merge pull request #8393 from Iceber/fix_checkpoint_options
...
runtime/shim: fix the nil checkpoint options
2023-04-24 21:22:39 -07:00
Maksym Pavlenko
370be0c18f
Move logrus setup code to log package
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-04-24 10:14:13 -07:00
Iceber Gu
18d7e84f9b
runtime/shim: fix the nil checkpoint options
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-04-14 22:32:50 +08:00
Iceber Gu
4b35c3829d
update shim example
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-04-14 11:42:21 +08:00
Iceber Gu
71ababe30a
runtime/shim: remove runc/v2/services
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-04-14 11:42:21 +08:00
Iceber Gu
b71f4b7518
runtime/shim: rename RunManager to Run
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-04-14 11:42:21 +08:00
Iceber Gu
f7b8b11812
update the version of the runc shim in the readme and examples
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-04-11 16:02:06 +08:00
Iceber Gu
23d288a809
Remove the CriuPath field from runc's options
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-16 17:12:51 +08:00
Fu Wei
e735405c15
Merge pull request #7951 from Iceber/fix_restart_monitor
2023-03-16 08:58:20 +08:00
Maksym Pavlenko
07c2ae12e1
Remove v1 runctypes
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-15 09:18:16 -07:00
Maksym Pavlenko
ef516a1507
Remove runtime v1
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-15 09:18:14 -07: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
Hsing-Yu (David) Chen
d602c9aec7
docs: fix typo of shim.RunManager's function comment
...
Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
2023-03-06 16:29:15 -08:00
Derek McGowan
57fb2d30f0
Add max shim version environment variable
...
Adds environment variable to shim start command
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-03-01 11:20:49 -08:00
Derek McGowan
dba6f9db18
Add version to shim protocol
...
Document environment variables and test shim start response parsing.
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-02-27 22:58:47 -08:00
Derek McGowan
b39239106b
Merge pull request #8134 from dcantah/docs-rtime-grpc-shims
...
docs: Show how to select GRPC for shims
2023-02-24 22:36:05 -08:00
Kazuyoshi Kato
a8a35cab22
Merge pull request #8142 from davidhsingyuchen/docs-logger-func
...
docs: add more comment to logging.LoggerFunc
2023-02-23 08:38:11 -08:00
Danny Canter
4728800abc
runtime/v2: Get rid of last logrus.Fields usage
...
https://github.com/containerd/containerd/pull/8143 added an alias for
logrus.Fields and moved over most usages to this alias, but there was
one straggler.
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-02-20 18:29:56 -08:00
Danny Canter
4278fbbc7e
runtime/v2: Call onCloseWithShimLog for grpc shims
...
We pass in a callback using the ttrpc.WithOnClose functionality
for shims that use ttrpc, but with the newly added ability to use
GRPC for shims this was left as a follow-up. It doesn't seem like
grpc-go has anything similar so some options (that I could see) are:
This change introduces a new grpcConn wrapper type for the connection
that exposes a method to get notified when the users callback has run,
the same in functionality as TTRPC's `UserOnCloseWait`. The callback
gets passed in in a new `grpcDialContext` function that will:
1. Dial the connection as normal
2. Spin off a goroutine that will monitor the connections state
until it transitions to idle or shutdown and will then run the
callback.
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-02-20 18:25:53 -08:00
Fu Wei
8cb00f45c9
Merge pull request #8143 from mxpv/log
...
Add Fields type alias to log package
2023-02-21 10:22:23 +08:00
Maksym Pavlenko
06e085c8b5
Add Fields type alias to log package
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-20 17:29:08 -08:00
Hsing-Yu (David) Chen
0ecdd341d7
docs: add more comment to logging.LoggerFunc
...
- When tracing code, it was a bit hard to understand what the third parameter is.
- The current comment should be enough to understand how to use LoggerFunc,
and people who want to learn more can click into the doc link.
Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
2023-02-20 17:22:24 -08:00
Danny Canter
ea83632a8d
docs: Show how to select GRPC for shims
...
This updates the runtime/v2 README to state the experimental GRPC support
for shims and how to choose the protocol.
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-02-18 18:05:56 -08:00
Danny Canter
979a744122
runtime/v2: Log BootstrapParams
...
Recent work added the ability to use grpc for shims, it'd be nice to
have a debug (or info perhaps) log to show what protocol and addr the
shim sent over.
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-02-16 17:21:27 -08:00
Derek McGowan
4b80a2be96
Merge pull request #8052 from mxpv/grpc_shim
...
Initial GRPC shims support
2023-02-14 18:53:22 -08:00
Akihiro Suda
b61988670c
go.mod: github.com/containerd/typeurl/v2 v2.1.0
...
Changes: https://github.com/containerd/typeurl/compare/7f6e6d160d67...v2.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-02-11 23:39:52 +09:00
Maksym Pavlenko
8ef298d863
Add transport credentials GRPC opt
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-10 22:01:35 -08:00
Maksym Pavlenko
77fc0948c4
Use switch when creating TTRPC/GRPC client
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-10 22:01:35 -08:00
Maksym Pavlenko
a82e37a5a2
Add shim bootstrap params
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-10 22:01:35 -08:00
Maksym Pavlenko
fc2e761e26
Initial GRPC client support
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-10 22:01:35 -08:00
Maksym Pavlenko
9e5c207e4c
Wire up client bridges
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-10 22:01:35 -08:00
Maksym Pavlenko
47cb5f64b3
Add Task Service GRPC bridge
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-10 21:53:53 -08:00
Zechun Chen
b944b108df
Clean up repeated package import
...
Signed-off-by: Zechun Chen <zechun.chen@daocloud.io>
2023-02-10 16:21:55 +08:00
Maksym Pavlenko
86c238c873
Generate GRPC for runtime sandbox API
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-02 09:58:43 -08:00
Derek McGowan
287320d4de
Merge pull request #7840 from hinshun/feature/mount-subdirectory
...
Use mount.Target to specify subdirectory of rootfs mount
2023-01-30 21:35:34 -08:00
Danny Canter
d215786741
runtime docs: Clarify delete cwd behavior
...
Noticed the cwd behavior noted for Windows also applies to FreeBSD now.
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-26 18:38:25 -08:00
Edgar Lee
34d5878185
Use mount.Target to specify subdirectory of rootfs mount
...
- Add Target to mount.Mount.
- Add UnmountMounts to unmount a list of mounts in reverse order.
- Add UnmountRecursive to unmount deepest mount first for a given target, using
moby/sys/mountinfo.
Signed-off-by: Edgar Lee <edgarhinshunlee@gmail.com>
2023-01-27 09:51:58 +08:00
xin.li
12359559d1
reused package errdefs for not supported err
...
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-01-25 23:22:57 +08:00
Derek McGowan
d0893daf09
Merge pull request #7928 from mxpv/opts
...
Make OCI options cross-platform
2023-01-12 10:11:12 -08:00
Maksym Pavlenko
f318e5630b
Update sandbox API to return target platform
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-11 13:03:59 -08:00
Samuel Karp
5f1a42543c
shim: move reap log line to debug
...
Fixes https://github.com/containerd/containerd/issues/7941
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-01-10 16:39:39 -08:00
Samuel Karp
515d68099b
shim: enable debug logging for delete
...
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-01-10 16:39:38 -08:00
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
a4d5c3e5cb
Support sandboxed shims shutdown
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-12-14 18:22:52 -08:00