Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1488072 - [RFE] Reconnect container images when seen again
[RFE] Reconnect container images when seen again
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity medium
: GA
: 5.9.0
Assigned To: Loic Avenel
brahmani
container
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-04 05:05 EDT by Beni Paskin-Cherniavsky
Modified: 2018-04-09 07:54 EDT (History)
7 users (show)

See Also:
Fixed In Version: 5.9.0.7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-01 08:16:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Container Management


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0380 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 13:37:12 EST

  None (edit)
Description Beni Paskin-Cherniavsky 2017-09-04 05:05:27 EDT
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.
Comment 2 Dave Johnson 2017-09-04 05:46:30 EDT
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.
Comment 4 Beni Paskin-Cherniavsky 2017-11-19 08:52:49 EST
I think this recently got fixed by
https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/145
Ladislav, can this be moved to POST?
Comment 5 Ladislav Smola 2017-11-20 02:50:03 EST
Yes this is fixed by https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/145 , but only for new (graph) refresh.
Comment 8 brahmani 2017-12-04 06:57:06 EST
verified on 5.9.0.11.20171127204214_e316988;
both ContainerGroup-s link to same ContainerImage image ref record
Comment 11 errata-xmlrpc 2018-03-01 08:16:52 EST
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

Note You need to log in before you can comment on or make changes to this bug.