Commit Graph

389 Commits

Author SHA1 Message Date
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
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
Maksym Pavlenko
ef516a1507 Remove runtime v1
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-15 09:18:14 -07: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
Maksym Pavlenko
e1abaeb386
Merge pull request #7764 from mxpv/config
Pass TOML configuration options for runtimes CRI is not aware of
2022-12-08 12:59:13 -08:00
Maksym Pavlenko
3bc8fc4d30 Cleanup build constraints
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-12-08 09:36:20 -08:00
Maksym Pavlenko
8ab1d44967 Pass runtime configuration as TOML blob
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-12-07 10:55:06 -08:00
Akihiro Suda
96a39ad53b
Merge pull request #7499 from Iceber/cleanup_shim_flag
runtime/v2/shim: clean up the use of containerdBinary
2022-11-22 22:01:23 +09:00
Kazuyoshi Kato
6596a70861 Use github.com/containerd/cgroups/v3 to remove gogo
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-11-14 21:07:48 +00:00
Maksym Pavlenko
3a9044f240 Rename darwin-kubelet to containerd
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-11-07 22:58:25 -08:00
Maksym Pavlenko
525fe21e22
Merge pull request #7604 from wzshiming/fix/close-fifo
Fix missing closed fifo
2022-11-03 20:55:28 -07:00
Shiming Zhang
c607f83c38 Fix missing closed fifo
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2022-11-04 10:13:47 +08:00
Maksym Pavlenko
2da7824683 Add sequence diagram for shim runtime v2
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-10-31 15:45:28 -07:00
Maksym Pavlenko
b7d0d12715 Cleanup sandbox interfaces
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-10-25 12:31:32 -04:00