mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-26 09:44:46 +01:00
sandbox: support force stop
When force is true, ignore any guest related errors. This can be used to stop a sandbox when hypervisor process is dead. Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
@@ -152,7 +152,7 @@ func kill(ctx context.Context, containerID, signal string, all bool) error {
|
||||
|
||||
switch containerType {
|
||||
case vc.PodSandbox:
|
||||
_, err = vci.StopSandbox(ctx, sandboxID)
|
||||
_, err = vci.StopSandbox(ctx, sandboxID, signum == syscall.SIGKILL)
|
||||
case vc.PodContainer:
|
||||
_, err = vci.StopContainer(ctx, sandboxID, containerID)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user