Description of problem: Get the below errors when building the index image. [root@preserve-olm-env data]# opm index add --bundles quay.io/openshift-qe-optional-operators/ose-sriov-network-operator-bundle@sha256:a10d59941be98c8a3c29963891508519dcdab9e58ed1a50d9fea35ad35789f51 --from-index quay.io/openshift-qe-optional-operators/ocp4-index:05 --tag quay.io/openshift-qe-optional-operators/ocp4-index:05 -c docker INFO[0000] building the index bundles="[quay.io/openshift-qe-optional-operators/ose-sriov-network-operator-bundle@sha256:a10d59941be98c8a3c29963891508519dcdab9e58ed1a50d9fea35ad35789f51]" ... ERRO[0002] permissive mode disabled bundles="[quay.io/openshift-qe-optional-operators/ose-sriov-network-operator-bundle@sha256:a10d59941be98c8a3c29963891508519dcdab9e58ed1a50d9fea35ad35789f51]" error="error checking provided apis in bundle sriov-network-operator.4.7.0-202011040327.p0: couldn't find sriovnetwork.openshift.io/v1/SriovNetworkNodePolicy (sriovnetworknodepolicies) in bundle. found: map[]" Error: error checking provided apis in bundle sriov-network-operator.4.7.0-202011040327.p0: couldn't find sriovnetwork.openshift.io/v1/SriovNetworkNodePolicy (sriovnetworknodepolicies) in bundle. found: map[] Version-Release number of selected component (if applicable): [root@preserve-olm-env operator-registry]# opm version Version: version.Version{OpmVersion:"v1.14.3-49-gbfe56a7", GitCommit:"bfe56a7", BuildDate:"2020-11-05T01:16:40Z", GoOs:"linux", GoArch:"amd64"} sriov-network-operator.4.7.0-202011040327.p0 How reproducible: always Steps to Reproduce: 1. Run the index image build command: $ opm index add --bundles quay.io/openshift-qe-optional-operators/ose-sriov-network-operator-bundle@sha256:a10d59941be98c8a3c29963891508519dcdab9e58ed1a50d9fea35ad35789f51 --from-index quay.io/openshift-qe-optional-operators/ocp4-index:05 --tag quay.io/openshift-qe-optional-operators/ocp4-index:05 -c docker Actual results: get the errors: error="error checking provided apis in bundle sriov-network-operator.4.7.0-202011040327.p0: couldn't find sriovnetwork.openshift.io/v1/SriovNetworkNodePolicy (sriovnetworknodepolicies) in bundle. found: map[]" Expected results: The index image can be built successfully. Additional info: I guess the root cause is here: 1, get the operator manifest to local [root@preserve-olm-env release]# docker create quay.io/openshift-qe-optional-operators/ose-sriov-network-operator-bundle@sha256:a10d59941be98c8a3c29963891508519dcdab9e58ed1a50d9fea35ad35789f51 /bin/bash 92ae341363587f5035b779b88d1e1ae348591fe47914bbc48b5b3c1bad59f638 [root@preserve-olm-env release]# docker cp 92ae341363587f5035b779b88d1e1ae348591fe47914bbc48b5b3c1bad59f638:/manifests sriov [root@preserve-olm-env release]# ls sriov/ sriov-network-operator-sriovibnetworks_crd.yaml sriov-network-operator-sriovnetworknodestate.crd.yaml sriov-network-operator-sriovnetwork.crd.yaml sriov-network-operator-sriovoperatorconfig.crd.yaml sriov-network-operator-sriovnetworknodepolicy.crd.yaml sriov-network-operator.v4.7.0.clusterserviceversion.yaml 2, Check the CSV owned CRD field, find the group of SriovNetworkNodePolicy is "sriovnetworknodepolicies.sriovnetwork.openshift.io". [root@preserve-olm-env release]# vim sriov/sriov-network-operator.v4.7.0.clusterserviceversion.yaml ... - description: Represents an policy of configuring SR-IOV components on nodes displayName: Sriov Network Node Policy kind: SriovNetworkNodePolicy name: sriovnetworknodepolicies.sriovnetwork.openshift.io version: v1 3, Check the CRD file, find the group of the SriovNetworkNodePolicy is "sriovnetwork.openshift.io". [root@preserve-olm-env release]# vim ./sriov/sriov-network-operator-sriovnetworknodepolicy.crd.yaml ... spec: group: sriovnetwork.openshift.io names: kind: SriovNetworkNodePolicy listKind: SriovNetworkNodePolicyList plural: sriovnetworknodepolicies
Please ignore my analysis above, the group is correct. But, the provide `bundleAPIs` map is [], it's wried. Maybe some CRDs definitions are not incorrect. Transfer it to OLM component first.
Verified this bug on v4.7.0.202011100433.p0
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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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-2020:5633