server: honor container stop timeout from CRI
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
20e9aeb16f
commit
b3683ab184
6 changed files with 29 additions and 21 deletions
|
@ -48,7 +48,7 @@ func (s *Server) StopPodSandbox(ctx context.Context, req *pb.StopPodSandboxReque
|
|||
}
|
||||
cStatus := s.runtime.ContainerStatus(c)
|
||||
if cStatus.Status != oci.ContainerStateStopped {
|
||||
if err := s.runtime.StopContainer(c); err != nil {
|
||||
if err := s.runtime.StopContainer(c, -1); err != nil {
|
||||
return nil, fmt.Errorf("failed to stop container %s in pod sandbox %s: %v", c.Name(), sb.id, err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue