Commit Graph

14 Commits

Author SHA1 Message Date
Derek McGowan
508aa3a1ef
Move to use github.com/containerd/log
Add github.com/containerd/log to go.mod

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 07:53:23 -07: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
9e5c207e4c Wire up client bridges
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-10 22:01:35 -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
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
Maksym Pavlenko
1d8b1bc75b Cleanup shim manager
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-11 21:41:32 -07:00
Amit Barve
46773c3417 Cleanup leaked shim process
If containerd crashes while creating a container the shim process stays alive and is never
cleaned up. Details are discussed in issue containerd/containerd#6860. This fixes the code
to cleanup such shim processes on containerd restart.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
2022-04-27 11:43:23 -07:00
Maksym Pavlenko
b0623a06ee Change file name for shim binary path
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-02-09 12:06:55 -08:00
Maksym Pavlenko
5015130f7a Fix executable file not found when restoring shims
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-22 17:46:03 -08:00
Maksym Pavlenko
6870f3b1b8 Support custom runtime path when launching tasks
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-09 13:31:46 -08:00
Maksym Pavlenko
d022fbe789 Address PR comments
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-02 11:19:43 -07:00
Maksym Pavlenko
df8c206a92 Cleanup shim loading
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-01 07:37:01 -07:00
Maksym Pavlenko
b554b577b0 Move shim restore to a separate file
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-01 07:37:01 -07:00