-
Notifications
You must be signed in to change notification settings - Fork 348
Container life cycle should not rely on the existence of other image references. #990
Comments
agree option 2 |
At a second thought, I think we need both option 1 and 2. We need option 1, because that is Docker's behavior, I think people expect that in
Currently, for Docker, 3) will fail; but for containerd 3) will remove the image. We still need option 2, because users may still use And I think we should cherry-pick option 2 into supported branches, because it is low risk and fixes issues in most cases. We can only keep option 1 in master. |
ok, thx for investigating! agree option 1 with tolerance for option 2. |
suggest adding an issue to enable the garbage collect of the in use image.. (breaking the behavior exhibited by docker in refusing to remove images in use) |
…06d9200e95 includes backports of: - containerd/cri#984 filter events for non k8s.io namespaces (resolves firecracker-microvm/firecracker-containerd#35) - containerd/cri#991 Remove container lifecycle image dependency (fixes containerd/cri#990) - containerd/cri#1016 [release/1.0] Specify platform for image pull (fixes containerd/cri#1015) - containerd/cri#1027 Fix the log ending newline handling (fixes containerd/cri#1026) - containerd/cri#1042 Set /etc/hostname (fixes containerd/cri#1041) - containerd/cri#1045 Fix env performance issue (fixes containerd/cri#1044) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Containerd manages images based on references. Image names (tag, id etc.), container references are all valid independent references.
They are independent, means that you can remove all image references, and the container can still run happily because the snapshots are still referenced. This also means that we can't assume image references (and the content) exist across the whole life cycle of a container using the image.
However, we are doing so in some container operations:
This causes issue like containerd/containerd#2858.
There are 2 options to fix this:
Given the problem of option 1, I prefer option 2.
For option 2:
StopContainer
, onlyStopSignal
is needed, we should add it into container metadata during container creation;ContainerStatus
, the imageid
totag
conversion is best effort anyway, just don't return error.Note that adding
StopSignal
into metadata is adding a new field into our metadata checkpoint. We should handle in place upgrade properly.The text was updated successfully, but these errors were encountered: