Bug 1928858

Summary: Missing image in metadata DB index.db in disconnected Operator Hub installation Compliance Operator
Product: OpenShift Container Platform Reporter: Andy Bartlett <andbartl>
Component: OLMAssignee: Kevin Rizza <krizza>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED NOTABUG Docs Contact:
Severity: high    
Priority: high CC: aos-bugs, josorior, krizza, lgallett, matt, mrogers, tflannag, xiyuan
Version: 4.6   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-24 13:18:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andy Bartlett 2021-02-15 16:59:11 UTC
Description of problem:

This is a repeat issue of https://bugzilla.redhat.com/show_bug.cgi?id=1925361 but this time with the Compliance Operator:

From the customer:

The Problem is fixed for the clusterlogging bundle, now we encounter the same issue with the compliance-operator bundle, we are missing the image registry.redhat.io/openshift4/compliance-rhel8-operator-metadata@sha256:3145cda510659eee3aa12e41aefdd3e1922a6b7324f504e8613d38c258c92c44
in the related_images table see the output below:
[xxx@xxx ~]$ echo "select * from related_image where operatorbundle_name like 'compliance%';" | sqlite3 -line /tmp/528140204/index.db
              image = registry.redhat.io/openshift4/compliance-rhel8-operator@sha256:9c3fb76e2e791eac386da52327cb0bb08a24ba3d97f3a1e8195b8c726b94e705
operatorbundle_name = compliance-operator.v0.1.24

              image = registry.redhat.io/openshift4/compliance-openscap-rhel8@sha256:6c066f4cb7b98f731a558e1800bc86f4a6631973366a54a8999422b44ef721cc
operatorbundle_name = compliance-operator.v0.1.24

              image = registry.redhat.io/openshift4/compliance-content-rhel8@sha256:fedef69f93712ba452e4f9edc6878979e9abb19a632ce13a03c1c9b051ff6083
operatorbundle_name = compliance-operator.v0.1.24


Version-Release number of selected component (if applicable):

OCP 4.6.16


How reproducible:
100%

Steps to Reproduce:
$ opm index prune -f $redhat_index -p cluster-logging,compliance-operator -t $catalog_path && podman push $catalog_path

$ oc adm catalog mirror $catalog_path $registry_base -a pullsecret.json --filter-by-os='.*' --manifests-only

$ oc apply -f manifests-olm/redhat-operator-index-1613403232/imageContentSourcePolicy.yaml

$ echo "select * from related_image where operatorbundle_name like 'compliance%';" | sqlite3 -line /tmp/528140204/index.db


Actual results:

$ echo "select * from related_image where operatorbundle_name like '%compliance%';" | sqlite3 -line $db_path
              image = registry.redhat.io/openshift4/compliance-rhel8-operator@sha256:9c3fb76e2e791eac386da52327cb0bb08a24ba3d97f3a1e8195b8c726b94e705
operatorbundle_name = compliance-operator.v0.1.24

              image = registry.redhat.io/openshift4/compliance-openscap-rhel8@sha256:6c066f4cb7b98f731a558e1800bc86f4a6631973366a54a8999422b44ef721cc
operatorbundle_name = compliance-operator.v0.1.24

              image = registry.redhat.io/openshift4/compliance-content-rhel8@sha256:fedef69f93712ba452e4f9edc6878979e9abb19a632ce13a03c1c9b051ff6083
operatorbundle_name = compliance-operator.v0.1.24

missing the image registry.redhat.io/openshift4/compliance-rhel8-operator-metadata@sha256:3145cda510659eee3aa12e41aefdd3e1922a6b7324f504e8613d38c258c92c44


Expected results:

All images to be available to install the operator

Additional info:

Comment 1 Oleg Bulatov 2021-02-15 17:16:45 UTC
I don't see problems with OpenShift Image Registry there. Is it about Compliance Operator?

Comment 4 Matt Rogers 2021-02-16 00:32:40 UTC
> missing the image registry.redhat.io/openshift4/compliance-rhel8-operator-metadata@sha256:3145cda510659eee3aa12e41aefdd3e1922a6b7324f504e8613d38c258c92c44


The current published operator metadata image tag is sha256:e5a44539a1244fb63379d264007db328d346ad6afd4be371a883eec1bda7bfab, so I'm not sure where the incorrect sha comes from here. They might be referencing an outdated image cache before mirroring. Can you have them ensure they are pulling the latest from our catalog?

Comment 6 Matt Rogers 2021-02-16 15:52:50 UTC
The bug https://bugzilla.redhat.com/show_bug.cgi?id=1895367 mentions that 'oc image mirror' has an issue wrt incorrect SHAs, and the comments indicate that there were fixes done on the OLM side to correct this same problem for cluster-logging. Re-assigning this to OLM. If there is something that I need to correct with the compliance-operator bundle itself, feel free to move it back, but at the moment it appears to be with OLM.