update_test: Add test to verify app pruning#110
Conversation
Ensure uninstall with pruning does not remove needed images The test verifies that uninstalling apps with pruning does not remove too many images, which could affect the detection of the currently running apps. Specifically, pruning all images without containers can remove tags for images that are still used by running containers. This can lead to a client incorrectly determining that an app is not running due to a missing image. Also, it seems like the issue in the docker since it removes wrong tags. Signed-off-by: Mike Sul <mike.sul@foundries.io>
Prune only dangling images - the images that are not tagged and not referenced by any container. Signed-off-by: Mike Sul <mike.sul@foundries.io>
|
@detsch This test ed2dee1#diff-57d1e4bf0d771152f59591a10865c44f54ff39dc20bcb43a216a6ca4282e332dR555 reproduces the issue. The problem was that the amd64 image of the multiarch image is the same as the other image (the first one) that is used in both apps, and the one that is preloaded. Essentially, each of the two apps uses/refers the same image twice through different references. Uninstalling one of the apps with "prune all option" leads to removing the image tag shared by those two images, hence fioup/composectl thinks that this image does not exist. Anyway, it is very subtle :). |
|
@detsch And this 111dbeb is the fix for this issue. In addition to that, I think we will need to come up with an option to prune only those images that are related to apps managed by fioup/composectl, otherwise it prunes all dangling images even those that are brought to a host/device by some other than fioup/composectl means, e.g. a user just pulled some images for another purpose/use-case. |
Ensure uninstall with pruning does not remove needed images
The test verifies that uninstalling apps with pruning does not remove too many images, which could affect the detection of the currently running apps.
Specifically, pruning all images without containers can remove tags for images that are still used by running containers. This can lead to a client incorrectly determining that an app is not running due to a missing image.
Also, it seems like the issue in the docker since it removes wrong tags.