Make container server update it's list of containers upon creation

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
This commit is contained in:
Ryan Cole 2017-07-31 14:38:45 -04:00
parent d574177c2a
commit b56da85fc1
8 changed files with 385 additions and 383 deletions

View file

@ -314,7 +314,7 @@ func (s *Server) CreateContainer(ctx context.Context, req *pb.CreateContainerReq
}
defer func() {
if err != nil {
err2 := s.storageRuntimeServer.DeleteContainer(containerID)
err2 := s.StorageRuntimeServer().DeleteContainer(containerID)
if err2 != nil {
logrus.Warnf("Failed to cleanup container directory: %v", err2)
}
@ -613,7 +613,7 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string,
metaname := metadata.Name
attempt := metadata.Attempt
containerInfo, err := s.storageRuntimeServer.CreateContainer(s.ImageContext(),
containerInfo, err := s.StorageRuntimeServer().CreateContainer(s.ImageContext(),
sb.Name(), sb.ID(),
image, image,
containerName, containerID,
@ -625,7 +625,7 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string,
return nil, err
}
mountPoint, err := s.storageRuntimeServer.StartContainer(containerID)
mountPoint, err := s.StorageRuntimeServer().StartContainer(containerID)
if err != nil {
return nil, fmt.Errorf("failed to mount container %s(%s): %v", containerName, containerID, err)
}