Commit Graph
21 Commits
Author SHA1 Message Date
Aditya Ramani 3d27bc738a Handle unexpected shim kill events
When a shim process is unexpectedly killed in a way that was not initiated through containerd - containerd reports the pod as not ready but the containers as running. This results in kubelet repeatedly sending container kill requests that fail since containerd cannot connect to the shim.

Changes:

- In the container exit handler, treat `err: Unavailable` as if the container has already exited out
- When attempting to get a connection to the shim, if the controller isn't available assume that the shim has been killed (needs to be done since we have a separate exit handler that cleans up the reference to the shim controller - before kubelet has the chance to call StopPodSandbox)

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
(cherry picked from commit 729c97cf39)
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-09-29 19:15:07 -07:00
Derek McGowan f7233811f6 Update transfer configuration
Export transfer config fields.
Determine differ based on platform or config.
Get snapshotter from metadata store.

Signed-off-by: Derek McGowan <derek@mcg.dev>
(cherry picked from commit c786994eae)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-08 11:53:03 -07:00
Ethan Lowman 4510eac009 Fix image pulling with Transfer service
Signed-off-by: Ethan Lowman <ethan.lowman@datadoghq.com>
(cherry picked from commit 3e87f05b62)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-08 11:53:03 -07:00
Danny Canter cf2e454bf0 Sandbox: Correct/add some fields to Status()
CreatedAt was being used as the ExitedAt timestamp, and Info from the
response wasn't being set on the response.

Signed-off-by: Danny Canter <danny@dcantah.dev>
(cherry picked from commit d835fd2a3a)
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-03-16 11:29:33 -07:00
Danny Canter ce68e8e0db Sandbox: Cleanup shim on Start failure
Made a change a bit ago to cleanup the shim on CreateSandbox failures and
noted that we should probably do the same on Start as well as nothing gets
cleaned up otherwise, and nothing states that a sandbox server/shim should
exit itself if Create/Start fail. Ideally this could be hooked up to
some subsystem in containerd that'd do it for us, but for now to allow
developing prototyping sandbox shims this makes things much friendlier.

Signed-off-by: Danny Canter <danny@dcantah.dev>
(cherry picked from commit 70da5c7830)
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-03-16 11:29:21 -07:00
Maksym Pavlenko 48a1350658 Merge pull request #8149 from Burning1020/sb-netns
sandbox: create sandbox with network namespace path
2023-03-08 14:22:00 -08:00
Zhang Tianyang 5144ba9c49 sandbox: create sandbox with network namespace path
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2023-03-08 18:54:14 +08:00
Danny Canter f7eb86ef3c Sandbox: Delete shim+shutdown sandbox on create failure
Currently if create fails the shim will just be kind of stuck in limbo.
This calls shutdown to allow the shim to exit, and then invokes shim
delete.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-03-04 23:09:59 -08:00
Danny Canter 6b4b6956e3 Sandbox: Fix/enhance error messages for Create
CreateSandbox states "failed to start sandbox". This is quite confusing
when you're perusing logs and trying to pinpoint how far a shim got in
its execution.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-03-04 01:15:47 -08:00
Phil Estes 477df4bd47 Merge pull request #8193 from fangn2/fix-config-dump
Create config struct to take user input
2023-03-02 11:37:49 -05:00
Tony Fang 2e96ba95e0 Create config struct to take user input
Signed-off-by: Tony Fang <nhfang@amazon.com>
2023-03-02 05:44:25 +00:00
Derek McGowan 5c6e9f83d4 Fix streaming manager deadlock on collection
Ensure that lock is released and stream is closed.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-03-01 09:40:59 -08:00
Tony Fang 47305392c6 Add configuration options to local transfer service
Signed-off-by: Tony Fang <nhfang@amazon.com>
2023-02-25 03:40:06 +00: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
Derek McGowan a788f6c799 Move local sandbox controller under plugins package
Add options to sandbox controller interface.
Update sandbox controller interface to fully utilize sandbox controller
interface.
Move grpc error conversion to service.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-02-06 22:04:45 -08:00
Derek McGowan 47fee791f6 Add sandbox store plugin type
Moves the sandbox store plugin under the plugins packages and adds a
unique plugin type for other plugins to depend on it.
Updates the sandbox controller plugin to depend on the sandbox store
plugin.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-12-20 23:05:14 -08:00
Derek McGowan 01bd314b1d Rename local transfer plugin
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:58 -08:00
Derek McGowan 478f1c934d Lint fixes
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:55 -08:00
Derek McGowan 6b5df1ee16 Update transfer packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:54 -08:00
Derek McGowan 6f64cb8598 Transfer interface and plugin work in progress
Signed-off-by: Derek McGowan <derek@mcg.dev>

Transfer service implementation

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:50 -08:00
Derek McGowan dcf5687cab Add streaming service
Adds a service capable of streaming Any objects bi-directionally.
This can be used by services to send data, received data, or to
initiate requests from server to client.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:55:56 -08:00