-
Bug
-
Resolution: Done-Errata
-
Normal
-
4.12.0
-
No
-
CFE Sprint 234
-
1
-
False
-
-
Previously, mirroring images for operators would fail when the registry domain name was not a part of the image reference. With this fix, the images are downloaded from `docker.io` if the registry domain name is not specified.
-
Bug Fix
-
Done
Description of problem:
Trivy community operator is not mirrored because the image address is malformed: "https://devopstales/v2/trivy-operator/manifests/2.4.1". I am under the impression that this is due to the fact that the image address in relatedImages parameter is not fully qualified: $ opm render registry.redhat.io/redhat/community-operator-index:v4.12 |jq -r 'select(.package == "community-trivy-operator") | select(.schema == "olm.bundle")' [...] "relatedImages": [ { "name": "", "image": "devopstales/trivy-operator:2.4.1" }, { "name": "", "image": "quay.io/openshift-community-operators/community-trivy-operator@sha256:e3652e68e1e569d7f40432fd8cbb7bfdc6738a116ecc1011c71a36f7ca5663c6"
Version-Release number of selected component (if applicable):
How reproducible:
100%
Steps to Reproduce:
$ cat <<EOF > imageset.yaml apiVersion: mirror.openshift.io/v1alpha2 kind: ImageSetConfiguration mirror: operators: - catalog: registry.redhat.io/redhat/community-operator-index:v4.11 packages: - name: community-trivy-operator channels: - name: stable EOF $ oc-mirror --config imageset.yaml file://mirror
Actual results:
Creating directory: mirror/oc-mirror-workspace/src/publish Creating directory: mirror/oc-mirror-workspace/src/v2 Creating directory: mirror/oc-mirror-workspace/src/charts Creating directory: mirror/oc-mirror-workspace/src/release-signatures backend is not configured in imageset.yaml, using stateless mode backend is not configured in imageset.yaml, using stateless mode No metadata detected, creating new workspace bundle : pinning related image devopstales/trivy-operator:2.4.1 to digest bundle : pinning related image devopstales/trivy-operator:2.4.1 to digest level=info msg=trying next host error=failed to do request: Head "https://devopstales/v2/trivy-operator/manifests/2.4.1": x509: certificate is valid for localhost, not devopstales host=devopstales error: error pinning images in catalog registry.redhat.io/redhat/community-operator-index:v4.11: failed to do request: Head "https://devopstales/v2/trivy-operator/manifests/2.4.1": x509: certificate is valid for localhost, not devopstales
Expected results:
operator is properly mirrored
Additional info:
I assume that "docker.io" should be automatically added to address when no registry is set. Trivy it's not the only community operator that doesn't specify the full url, so this issue probably affects other operators as well
- blocks
-
OCPBUGS-11468 Community operator cannot be mirrored due to malformed image address
- Closed
- is cloned by
-
OCPBUGS-11468 Community operator cannot be mirrored due to malformed image address
- Closed
- links to
-
RHEA-2023:5006 rpm