https://github.com/ManageIQ/manageiq-providers-kubernetes/issues/103 Description of problem: If refresh archives a container image record and later refresh encounters same image again, we create a duplicate record. This can be confusing in reports. May have other side effect, like repeated image scanning. Version-Release number of selected component (if applicable): Ever since we archive images. We don't see this much when images come from openshift registry, as these stay around for a long time. Scenarios where we may disconnect an image not currently used in any container: - a Kubernetes provider - Openshift provider that run images from external registries - Openshift dropping the image from /oapi/v1/images e.g. by [pruning](https://docs.openshift.org/latest/admin_guide/pruning_resources.html#pruning-images) - Openshift configured get_container_images: false (https://github.com/ManageIQ/manageiq/pull/14606) - Openshift configured store_unused_images: false (https://github.com/ManageIQ/manageiq-providers-openshift/pull/9) - Openshift fetching used images one by one (if https://github.com/ManageIQ/manageiq/pull/14628 gets revived) Steps to Reproduce (one of above scenarios): 1. create pod with an image from an external registry (e.g. docker hub) 2. refresh the provider => a ContainerImage record is created 3. delete the pod(s) that run it 4. refresh the provider => the ContainerImage is archived 5. create pod with same image 6. refresh the provider => a 2nd ContainerImage record is created with same digest, image_ref etc. Expected results: both ContainerGroup-s should link to one ContainerImage record Additional info: Fixing this in old save_inventory refresh would have unacceptable performance price, according to discussion on https://github.com/ManageIQ/manageiq/pull/14808 Graph refresh *might* be cheaper.
Please assess the impact of this issue and update the severity accordingly. Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition. If it's something like a tracker bug where it doesn't matter, please set it to Low/Low.
I think this recently got fixed by https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/145 Ladislav, can this be moved to POST?
Yes this is fixed by https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/145 , but only for new (graph) refresh.
verified on 5.9.0.11.20171127204214_e316988; both ContainerGroup-s link to same ContainerImage image ref record
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0380