Fix container removal state tracking

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2016-08-25 12:15:20 -07:00
parent 0c386f74f9
commit 4ee041a1c1

View file

@ -97,7 +97,7 @@ func (s *Server) CreatePodSandbox(ctx context.Context, req *pb.CreatePodSandboxR
name: name, name: name,
logDir: logDir, logDir: logDir,
labels: labels, labels: labels,
containers: []*oci.Container{}, containers: make(map[string]*oci.Container),
}) })
annotations := req.GetConfig().GetAnnotations() annotations := req.GetConfig().GetAnnotations()
@ -516,6 +516,8 @@ func (s *Server) RemoveContainer(ctx context.Context, req *pb.RemoveContainerReq
return nil, fmt.Errorf("failed to remove container %s directory: %v", *containerName, err) return nil, fmt.Errorf("failed to remove container %s directory: %v", *containerName, err)
} }
s.removeContainer(c)
return &pb.RemoveContainerResponse{}, nil return &pb.RemoveContainerResponse{}, nil
} }