Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions server/image_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func (s *Server) PullImage(ctx context.Context, req *pb.PullImageRequest) (resp
if img != nil {
image = img.Image
}
log.Infof(ctx, "Pulling image: %s", image)

pullArgs := pullArguments{image: image}
if req.GetAuth() != nil {
Expand Down Expand Up @@ -83,6 +84,7 @@ func (s *Server) PullImage(ctx context.Context, req *pb.PullImageRequest) (resp
return nil, pullOp.err
}

log.Infof(ctx, "Pulled image: %v", pullOp.imageRef)
resp = &pb.PullImageResponse{
ImageRef: pullOp.imageRef,
}
Expand Down
5 changes: 5 additions & 0 deletions server/image_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ func (s *Server) ImageStatus(ctx context.Context, req *pb.ImageStatusRequest) (r
if image == "" {
return nil, fmt.Errorf("no image specified")
}

log.Infof(ctx, "Checking image status: %s", image)
images, err := s.StorageImageServer().ResolveNames(s.config.SystemContext, image)
if err != nil {
if err == pkgstorage.ErrCannotParseImageID {
Expand Down Expand Up @@ -84,8 +86,11 @@ func (s *Server) ImageStatus(ctx context.Context, req *pb.ImageStatusRequest) (r
return nil, lastErr
}
if notfound && resp == nil {
log.Infof(ctx, "Image %s not found", image)
return &pb.ImageStatusResponse{}, nil
}

log.Infof(ctx, "Image status: %v", resp)
return resp, nil
}

Expand Down