sandbox: Reduce number of calls to UpdateStatus
Also, we distinguish between container and a pod infra container in the exit monitor as pod infra containers aren't stored in the main container index. Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
ea4b6fa55d
commit
ce17c5214d
6 changed files with 14 additions and 27 deletions
|
@ -78,19 +78,9 @@ func (s *Server) runContainer(container *oci.Container, cgroupParent string) err
|
|||
if err := s.Runtime().CreateContainer(container, cgroupParent); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := s.Runtime().UpdateStatus(container); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := s.Runtime().StartContainer(container); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := s.Runtime().UpdateStatus(container); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue