Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing images does not appear to be working correctly #110

Closed
afbjorklund opened this issue Aug 21, 2022 · 2 comments
Closed

Removing images does not appear to be working correctly #110

afbjorklund opened this issue Aug 21, 2022 · 2 comments

Comments

@afbjorklund
Copy link
Contributor

afbjorklund commented Aug 21, 2022

There is no error reported in crictl, but the image still remains.

sudo crictl rmi ...

There seems to be an internal error in the log, about a reference ?

The image reference ... was not a digest reference

@afbjorklund
Copy link
Contributor Author

The code makes some assumptions, on the return value when returning an error:

        imageInspect, err := ds.client.InspectImageByID(image.Image)

        // dockerclient.InspectImageByID doesn't work with digest and repoTags,
        // it is safe to continue removing it since there is another check below.
        if err != nil && !libdocker.IsImageNotFoundError(err) {
                return nil, err
        }

        if imageInspect == nil {
                // image is nil, assuming it doesn't exist.
                return &runtimeapi.RemoveImageResponse{}, nil
        }

The code comment explaining the current behaviour has been deleted... 8737219

        // TODO: We assume image.Image is image ID here, which is true in the current implementation
        // of kubelet, but we should still clarify this in CRI.

Unfortunately, it doesn't work with the short Id from the crictl output. Only the full id.

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Aug 21, 2022

Should only be an issue when user runs the crictl manually, the kubelet uses full Id.

@afbjorklund afbjorklund closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant