mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #78603 from Random-Liu/fix-image-status
Fix image status
This commit is contained in:
commit
51164f11ae
@ -66,10 +66,16 @@ func (ds *dockerService) ImageStatus(_ context.Context, r *runtimeapi.ImageStatu
|
||||
|
||||
imageInspect, err := ds.client.InspectImageByRef(image.Image)
|
||||
if err != nil {
|
||||
if libdocker.IsImageNotFoundError(err) {
|
||||
return &runtimeapi.ImageStatusResponse{}, nil
|
||||
if !libdocker.IsImageNotFoundError(err) {
|
||||
return nil, err
|
||||
}
|
||||
imageInspect, err = ds.client.InspectImageByID(image.Image)
|
||||
if err != nil {
|
||||
if libdocker.IsImageNotFoundError(err) {
|
||||
return &runtimeapi.ImageStatusResponse{}, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
imageStatus, err := imageInspectToRuntimeAPIImage(imageInspect)
|
||||
|
Loading…
Reference in New Issue
Block a user