mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #59465 from hanxiaoshuai/fixtodo02071
Automatic merge from submit-queue (batch tested with PRs 60363, 59208, 59465, 60581, 60702). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. log an error message when imageToRuntimeAPIImage failed **What this PR does / why we need it**: fix todo: log an error message when imageToRuntimeAPIImage failed **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
d0e9118d23
@ -25,6 +25,7 @@ import (
|
|||||||
"github.com/docker/docker/pkg/jsonmessage"
|
"github.com/docker/docker/pkg/jsonmessage"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
|
|
||||||
|
"github.com/golang/glog"
|
||||||
runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
|
runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker"
|
"k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker"
|
||||||
)
|
)
|
||||||
@ -51,7 +52,7 @@ func (ds *dockerService) ListImages(_ context.Context, r *runtimeapi.ListImagesR
|
|||||||
for _, i := range images {
|
for _, i := range images {
|
||||||
apiImage, err := imageToRuntimeAPIImage(&i)
|
apiImage, err := imageToRuntimeAPIImage(&i)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO: log an error message?
|
glog.V(5).Infof("Failed to convert docker API image %+v to runtime API image: %v", i, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
result = append(result, apiImage)
|
result = append(result, apiImage)
|
||||||
|
Loading…
Reference in New Issue
Block a user