Bug 1987160
| Summary: | opm alpha diff fails at headsonly mode | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | kuiwang |
| Component: | OLM | Assignee: | Joe Lanford <jlanford> |
| OLM sub component: | OLM | QA Contact: | kuiwang |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | medium | ||
| Priority: | medium | CC: | jlanford |
| Version: | 4.9 | ||
| Target Milestone: | --- | ||
| Target Release: | 4.9.0 | ||
| 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-10-18 17:43:18 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: | |
| Embargoed: | |||
verify it on 4.9. LGTM (although it has error, the issue is resolved. will create another bug to track that error)
--
[root@preserve-olm-env OSDK-1869]# opm version
Version: version.Version{OpmVersion:"cf7140bf3", GitCommit:"cf7140bf3c404454892c9c972b0d9e839a46f619", BuildDate:"2021-08-02T05:12:33Z", GoOs:"linux", GoArch:"amd64"}
[root@preserve-olm-env OSDK-1869]# rm -fr bundle.Dockerfile mta-operator/0.0.4/metadata/annotations.yaml
[root@preserve-olm-env OSDK-1869]# opm alpha bundle build -d mta-operator/0.0.4/manifests -t quay.io/olmqe/mta-operator:v0.0.4-1869 -p mta-operator -c alpha -e alpha
INFO[0000] Building annotations.yaml
INFO[0000] Writing annotations.yaml in /data/kuiwang/cases/OSDK-1869/mta-operator/0.0.4/metadata
INFO[0000] Building Dockerfile
INFO[0000] Writing bundle.Dockerfile in /data/kuiwang/cases/OSDK-1869
INFO[0000] Building bundle image
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
STEP 1: FROM scratch
STEP 2: LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
--> cc0a097dd78
STEP 3: LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
--> 2b63bb1f72a
STEP 4: LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
--> c5e6ebd173a
STEP 5: LABEL operators.operatorframework.io.bundle.package.v1=mta-operator
--> e0c4c704c4c
STEP 6: LABEL operators.operatorframework.io.bundle.channels.v1=alpha
--> 29b46a92be0
STEP 7: LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
--> 1acb54fb7db
STEP 8: COPY mta-operator/0.0.4/manifests /manifests/
--> 4bfbffeb2e6
STEP 9: COPY mta-operator/0.0.4/metadata /metadata/
STEP 10: COMMIT quay.io/olmqe/mta-operator:v0.0.4-1869
--> f3a203937ea
f3a203937ea3f8754e43c1ee9c822cfbae0a61542595948c86201a3b4c25056a
[root@preserve-olm-env OSDK-1869]# rm -fr bundle.Dockerfile mta-operator/0.0.4/metadata/annotations.yaml
[root@preserve-olm-env OSDK-1869]# podman push quay.io/olmqe/mta-operator:v0.0.4-1869
Getting image source signatures
Copying blob d2125c96921a done
Copying blob cac0212e67d6 done
Copying config f3a203937e done
Writing manifest to image destination
Copying config f3a203937e [======================================] 2.1KiB / 2.1KiB
Writing manifest to image destination
Storing signatures
[root@preserve-olm-env OSDK-1869]# opm render quay.io/olmqe/mta-operator:v0.0.4-1869
{
"schema": "olm.bundle",
"name": "windup-operator.0.0.4",
"package": "mta-operator",
"image": "quay.io/olmqe/mta-operator:v0.0.4-1869",
"properties": [
{
"type": "olm.channel",
"value": {
"name": "alpha",
"replaces": "windup-operator.0.0.3"
}
},
{
"type": "olm.gvk",
"value": {
"group": "windup.jboss.org",
"kind": "Windup",
"version": "v1"
}
},
{
"type": "olm.package",
"value": {
"packageName": "mta-operator",
"version": "0.0.4"
}
}
]
}
[root@preserve-olm-env OSDK-1869]# opm alpha diff quay.io/olmqe/mta-operator:v0.0.4-1869
WARN[0000] {"created":"2021-08-03T07:46:53.797796689Z","architecture":"amd64","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Labels":{"io.buildah.version":"1.19.8","operators.operatorframework.io.bundle.channel.default.v1":"alpha","operators.operatorframework.io.bundle.channels.v1":"alpha","operators.operatorframework.io.bundle.manifests.v1":"manifests/","operators.operatorframework.io.bundle.mediatype.v1":"registry+v1","operators.operatorframework.io.bundle.metadata.v1":"metadata/","operators.operatorframework.io.bundle.package.v1":"mta-operator"}},"rootfs":{"type":"layers","diff_ids":["sha256:d2125c96921a06554fcfe2581bbf47e13623d7f9b47acffde47381e9d75c797a","sha256:cac0212e67d626f6ce748c98c66fa3a2f5dc496863bbdf585f26ab8516cd1d3d"]},"history":[{"created":"2021-08-03T07:46:52.377960891Z","created_by":"/bin/sh -c #(nop) LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1","empty_layer":true},{"created":"2021-08-03T07:46:52.461942074Z","created_by":"/bin/sh -c #(nop) LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/","empty_layer":true},{"created":"2021-08-03T07:46:52.539197933Z","created_by":"/bin/sh -c #(nop) LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/","empty_layer":true},{"created":"2021-08-03T07:46:52.62782331Z","created_by":"/bin/sh -c #(nop) LABEL operators.operatorframework.io.bundle.package.v1=mta-operator","empty_layer":true},{"created":"2021-08-03T07:46:52.73077109Z","created_by":"/bin/sh -c #(nop) LABEL operators.operatorframework.io.bundle.channels.v1=alpha","empty_layer":true},{"created":"2021-08-03T07:46:52.815621191Z","created_by":"/bin/sh -c #(nop) LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha","empty_layer":true},{"created":"2021-08-03T07:46:53.217563306Z","created_by":"/bin/sh -c #(nop) COPY dir:9003ed531bdd32eb0e9098e6fc15d2f7f2fb7f530bb7bd2d0ab94d5708645c37 in /manifests/ "},{"created":"2021-08-03T07:46:54.000234819Z","created_by":"/bin/sh -c #(nop) COPY dir:f9b0beecbfe5f0cd1842a4f6f21e50039514e650c59c23e182ee5bfcfb404042 in /metadata/ "}]}
INFO[0000] Could not find optional dependencies file file=/tmp/render-unpack-312628132/metadata load=annotations with=/tmp/render-unpack-312628132
INFO[0000] Could not find optional properties file file=/tmp/render-unpack-312628132/metadata load=annotations with=/tmp/render-unpack-312628132
FATA[0000] error generating diff: error converting new declarative config to model: unknown package "mta-operator" for bundle "windup-operator.0.0.4"
[root@preserve-olm-env OSDK-1869]#
--
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.9.0 bug fix and security 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-2021:3759 |
Description of problem: When we try headsonly mode of "opm alpha diff", we take such command "opm alpha diff quay.io/olmqe/mta-operator:v0.0.4-1869" but it fails at "error rendering old refs: render reference "": error resolving name : hostname required " it seems it still want to resolve old refs, but actually there is no old refs for headsonly mode. Version-Release number of selected component (if applicable): [root@preserve-olm-env OSDK-1869]# ../../operator-framework-olm/bin/opm version Version: version.Version{OpmVersion:"5c57b2841", GitCommit:"5c57b2841c83e9d7894269a15a5e21efa151384c", BuildDate:"2021-07-29T06:06:00Z", GoOs:"linux", GoArch:"amd64"} How reproducible: always Steps to Reproduce: [root@preserve-olm-env OSDK-1869]# ../../operator-framework-olm/bin/opm alpha diff quay.io/olmqe/mta-operator:v0.0.4-1869 FATA[0000] error generating diff: error rendering old refs: render reference "": error resolving name : hostname required Actual results: fails at headsonly mode Expected results: works for headsonly mode Additional info: