Bug 1894382
| Summary: | Operator Lifecycle Manager on restricted networks(opm index prune) not working on Power(ppc64le) clusters | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Amit Ghatwal <aghatwal> |
| Component: | Documentation | Assignee: | Alex Dellapenta <adellape> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jian Zhang <jiazha> |
| Severity: | medium | Docs Contact: | Vikram Goyal <vigoyal> |
| Priority: | medium | ||
| Version: | 4.6 | CC: | adellape, ankithom, aos-bugs, jiazha, jokerman, mbenitez, sniemann, syurtkor, tdale, wolfgang.voesch |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | ppc64le | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-03-02 04:53:44 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: | |||
|
Description
Amit Ghatwal
2020-11-04 07:52:37 UTC
This is an issue with the docs, https://docs.openshift.com/container-platform/4.6/operators/admin/olm-restricted-networks.html#olm-updating-index-image_olm-restricted-networks. The default registry base image doesn't support multiarch, opm index add should be passing the correct version of the downstream registry base image with the --binary-image flag. Hi Ankita,
This is what i had to do on my power host and my configs for OCP4.6.
# opm index prune -f brew.registry.redhat.io/rh-osbs/iib:24657 -p codeready-workspaces --generate
This created below dockerfile
# cat index.Dockerfile
FROM quay.io/operator-framework/upstream-opm-builder
LABEL operators.operatorframework.io.index.database.v1=/database/index.db
ADD database/index.db /database/index.db
EXPOSE 50051
ENTRYPOINT ["/bin/opm"]
CMD ["registry", "serve", "--database", "/database/index.db"]
I built the images as is however it was still complaining with exec errors.
# podman build -t 192.168.25.171:4000/olm-mirror-ppc64le/redhat-operator-index:v4.6 -f index.Dockerfile
STEP 1: FROM quay.io/operator-framework/upstream-opm-builder
STEP 2: LABEL operators.operatorframework.io.index.database.v1=/database/index.db
--> 606aad04d9b
STEP 3: ADD database/index.db /database/index.db
--> 8e33c3fd510
STEP 4: EXPOSE 50051
--> 8738fc8b0e6
STEP 5: ENTRYPOINT ["/bin/opm"]
--> ab9d6892ffc
STEP 6: CMD ["registry", "serve", "--database", "/database/index.db"]
STEP 7: COMMIT 192.168.25.171:4000/olm-mirror-ppc64le/redhat-operator-index:v4.6
--> ff8cc964d6a
ff8cc964d6a60871c55a1e069981965c8d010676dce02ba5cd4f24003df85a30
# podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
192.168.25.171:4000/olm-mirror-ppc64le/redhat-operator-index v4.6 ff8cc964d6a6 10 seconds ago 76.5 MB
The image was still giving me exec erors as seen below
# podman run --rm -it 192.168.25.171:4000/olm-mirror-ppc64le/redhat-operator-index:v4.6 version
standard_init_linux.go:211: exec user process caused "exec format error"
In above dockerfile - "quay.io/operator-framework/upstream-opm-builder" isn't multi-arch , so had to replace it with - "registry.redhat.io/openshift4/ose-operator-registry:v4.6" which is multi-arch
Using above change , am able to build an image("192.168.25.171:4000/olm-mirror-ppc64le/redhat-operator-index:v4.6") for power and it seems to have the correct power binaries now...
# podman run --rm -it 192.168.25.171:4000/olm-mirror-ppc64le/redhat-operator-index:v4.6 version
Version: version.Version{OpmVersion:"v1.14.3-5-gf6e5d92", GitCommit:"f6e5d9281f335472dda7110fca2c710794c97fb5", BuildDate:"2020-10-06T13:14:18Z", GoOs:"linux", GoArch:"ppc64le"}
Thanks @kevin Rizza(krizza) for the valuable inputs
Dear Ankita,
Can the openshift docs be updated accordingly so that restricted networks steps exists for Power , S390x(IBM arches) . ?
Regards,
Amit
Using this multi-arch operator registry image - https://catalog.redhat.com/software/containers/openshift4/ose-operator-registry/5cddd0bed70cc57c44b2e1f3 helped. Hi All, As was mentioned here - https://bugzilla.redhat.com/show_bug.cgi?id=1894382#c1 have confirmed using --binary-image flag able to get the pruned images for Power. # opm index prune -f brew.registry.redhat.io/rh-osbs/iib:39813 -i registry.redhat.io/openshift4/ose-operator-registry:v4.6 -p openshift-pipelines-operator-rh -t registry.ghatwala-addon04-70b4.161.156.139.117.nip.io:5000/openshift-pipelines-rh/redhat-operator-index:v4.6 INFO[0000] pruning the index packages="[openshift-pipelines-operator-rh]" INFO[0000] Pulling previous image brew.registry.redhat.io/rh-osbs/iib:39813 to get metadata packages="[openshift-pipelines-operator-rh]" INFO[0000] running /usr/bin/podman pull brew.registry.redhat.io/rh-osbs/iib:39813 packages="[openshift-pipelines-operator-rh]" INFO[0007] running /usr/bin/podman pull brew.registry.redhat.io/rh-osbs/iib:39813 packages="[openshift-pipelines-operator-rh]" INFO[0014] Getting label data from previous image packages="[openshift-pipelines-operator-rh]" INFO[0014] running podman inspect packages="[openshift-pipelines-operator-rh]" INFO[0014] running podman create packages="[openshift-pipelines-operator-rh]" INFO[0014] running podman cp packages="[openshift-pipelines-operator-rh]" INFO[0022] running podman rm packages="[openshift-pipelines-operator-rh]" INFO[0023] deleting packages pkg=3scale-operator INFO[0023] input has been sanitized pkg=3scale-operator INFO[0023] packages: [3scale-operator] pkg=3scale-operator INFO[0023] deleting packages pkg=advanced-cluster-management INFO[0023] input has been sanitized pkg=advanced-cluster-management INFO[0023] packages: [advanced-cluster-management] pkg=advanced-cluster-management INFO[0024] deleting packages pkg=amq-broker INFO[0024] input has been sanitized pkg=amq-broker INFO[0024] packages: [amq-broker] pkg=amq-broker INFO[0024] deleting packages pkg=amq-broker-lts INFO[0024] input has been sanitized pkg=amq-broker-lts INFO[0024] packages: [amq-broker-lts] pkg=amq-broker-lts INFO[0024] deleting packages pkg=amq-online INFO[0024] input has been sanitized pkg=amq-online INFO[0024] packages: [amq-online] pkg=amq-online INFO[0025] deleting packages pkg=amq-streams INFO[0025] input has been sanitized pkg=amq-streams INFO[0025] packages: [amq-streams] pkg=amq-streams INFO[0025] deleting packages pkg=amq7-interconnect-operator INFO[0025] input has been sanitized pkg=amq7-interconnect-operator INFO[0025] packages: [amq7-interconnect-operator] pkg=amq7-interconnect-operator INFO[0025] deleting packages pkg=apicast-operator INFO[0025] input has been sanitized pkg=apicast-operator INFO[0025] packages: [apicast-operator] pkg=apicast-operator INFO[0025] deleting packages pkg=awx-resource-operator INFO[0025] input has been sanitized pkg=awx-resource-operator INFO[0025] packages: [awx-resource-operator] pkg=awx-resource-operator INFO[0026] deleting packages pkg=businessautomation-operator INFO[0026] input has been sanitized pkg=businessautomation-operator INFO[0026] packages: [businessautomation-operator] pkg=businessautomation-operator INFO[0026] deleting packages pkg=cluster-kube-descheduler-operator INFO[0026] input has been sanitized pkg=cluster-kube-descheduler-operator INFO[0026] packages: [cluster-kube-descheduler-operator] pkg=cluster-kube-descheduler-operator INFO[0026] deleting packages pkg=cluster-logging INFO[0026] input has been sanitized pkg=cluster-logging INFO[0026] packages: [cluster-logging] pkg=cluster-logging INFO[0026] deleting packages pkg=clusterresourceoverride INFO[0026] input has been sanitized pkg=clusterresourceoverride INFO[0026] packages: [clusterresourceoverride] pkg=clusterresourceoverride INFO[0026] deleting packages pkg=codeready-workspaces INFO[0026] input has been sanitized pkg=codeready-workspaces INFO[0026] packages: [codeready-workspaces] pkg=codeready-workspaces INFO[0026] deleting packages pkg=compliance-operator INFO[0026] input has been sanitized pkg=compliance-operator INFO[0026] packages: [compliance-operator] pkg=compliance-operator INFO[0026] deleting packages pkg=container-security-operator INFO[0026] input has been sanitized pkg=container-security-operator INFO[0026] packages: [container-security-operator] pkg=container-security-operator INFO[0026] deleting packages pkg=datagrid INFO[0026] input has been sanitized pkg=datagrid INFO[0026] packages: [datagrid] pkg=datagrid INFO[0026] deleting packages pkg=eap INFO[0026] input has been sanitized pkg=eap INFO[0026] packages: [eap] pkg=eap INFO[0026] deleting packages pkg=elasticsearch-operator INFO[0026] input has been sanitized pkg=elasticsearch-operator INFO[0026] packages: [elasticsearch-operator] pkg=elasticsearch-operator INFO[0026] deleting packages pkg=file-integrity-operator INFO[0026] input has been sanitized pkg=file-integrity-operator INFO[0026] packages: [file-integrity-operator] pkg=file-integrity-operator INFO[0026] deleting packages pkg=fuse-apicurito INFO[0026] input has been sanitized pkg=fuse-apicurito INFO[0026] packages: [fuse-apicurito] pkg=fuse-apicurito INFO[0026] deleting packages pkg=fuse-console INFO[0026] input has been sanitized pkg=fuse-console INFO[0026] packages: [fuse-console] pkg=fuse-console INFO[0026] deleting packages pkg=fuse-online INFO[0026] input has been sanitized pkg=fuse-online INFO[0026] packages: [fuse-online] pkg=fuse-online INFO[0026] deleting packages pkg=jaeger-product INFO[0026] input has been sanitized pkg=jaeger-product INFO[0026] packages: [jaeger-product] pkg=jaeger-product INFO[0026] deleting packages pkg=jws1 INFO[0026] input has been sanitized pkg=jws1 INFO[0026] packages: [jws1] pkg=jws1 INFO[0026] deleting packages pkg=kiali-ossm INFO[0026] input has been sanitized pkg=kiali-ossm INFO[0026] packages: [kiali-ossm] pkg=kiali-ossm INFO[0026] deleting packages pkg=kubevirt-hyperconverged INFO[0026] input has been sanitized pkg=kubevirt-hyperconverged INFO[0026] packages: [kubevirt-hyperconverged] pkg=kubevirt-hyperconverged INFO[0026] deleting packages pkg=local-storage-operator INFO[0026] input has been sanitized pkg=local-storage-operator INFO[0026] packages: [local-storage-operator] pkg=local-storage-operator INFO[0026] deleting packages pkg=metering-ocp INFO[0026] input has been sanitized pkg=metering-ocp INFO[0026] packages: [metering-ocp] pkg=metering-ocp INFO[0026] deleting packages pkg=mtc-operator INFO[0026] input has been sanitized pkg=mtc-operator INFO[0026] packages: [mtc-operator] pkg=mtc-operator INFO[0026] deleting packages pkg=nfd INFO[0026] input has been sanitized pkg=nfd INFO[0026] packages: [nfd] pkg=nfd INFO[0026] deleting packages pkg=ocs-operator INFO[0026] input has been sanitized pkg=ocs-operator INFO[0026] packages: [ocs-operator] pkg=ocs-operator INFO[0027] deleting packages pkg=openshift-jenkins-operator INFO[0027] input has been sanitized pkg=openshift-jenkins-operator INFO[0027] packages: [openshift-jenkins-operator] pkg=openshift-jenkins-operator INFO[0027] deleting packages pkg=performance-addon-operator INFO[0027] input has been sanitized pkg=performance-addon-operator INFO[0027] packages: [performance-addon-operator] pkg=performance-addon-operator INFO[0027] deleting packages pkg=ptp-operator INFO[0027] input has been sanitized pkg=ptp-operator INFO[0027] packages: [ptp-operator] pkg=ptp-operator INFO[0027] deleting packages pkg=quay-bridge-operator INFO[0027] input has been sanitized pkg=quay-bridge-operator INFO[0027] packages: [quay-bridge-operator] pkg=quay-bridge-operator INFO[0027] deleting packages pkg=quay-operator INFO[0027] input has been sanitized pkg=quay-operator INFO[0027] packages: [quay-operator] pkg=quay-operator INFO[0027] deleting packages pkg=red-hat-camel-k INFO[0027] input has been sanitized pkg=red-hat-camel-k INFO[0027] packages: [red-hat-camel-k] pkg=red-hat-camel-k INFO[0027] deleting packages pkg=rh-service-binding-operator INFO[0027] input has been sanitized pkg=rh-service-binding-operator INFO[0027] packages: [rh-service-binding-operator] pkg=rh-service-binding-operator INFO[0027] deleting packages pkg=rhsso-operator INFO[0027] input has been sanitized pkg=rhsso-operator INFO[0027] packages: [rhsso-operator] pkg=rhsso-operator INFO[0027] deleting packages pkg=serverless-operator INFO[0027] input has been sanitized pkg=serverless-operator INFO[0027] packages: [serverless-operator] pkg=serverless-operator INFO[0027] deleting packages pkg=service-registry-operator INFO[0027] input has been sanitized pkg=service-registry-operator INFO[0027] packages: [service-registry-operator] pkg=service-registry-operator INFO[0027] deleting packages pkg=servicemeshoperator INFO[0027] input has been sanitized pkg=servicemeshoperator INFO[0027] packages: [servicemeshoperator] pkg=servicemeshoperator INFO[0027] deleting packages pkg=sriov-network-operator INFO[0027] input has been sanitized pkg=sriov-network-operator INFO[0027] packages: [sriov-network-operator] pkg=sriov-network-operator INFO[0027] deleting packages pkg=vertical-pod-autoscaler INFO[0027] input has been sanitized pkg=vertical-pod-autoscaler INFO[0027] packages: [vertical-pod-autoscaler] pkg=vertical-pod-autoscaler INFO[0027] deleting packages pkg=web-terminal INFO[0027] input has been sanitized pkg=web-terminal INFO[0027] packages: [web-terminal] pkg=web-terminal INFO[0027] deleting packages pkg=windows-machine-config-operator INFO[0027] input has been sanitized pkg=windows-machine-config-operator INFO[0027] packages: [windows-machine-config-operator] pkg=windows-machine-config-operator INFO[0027] Generating dockerfile packages="[openshift-pipelines-operator-rh]" INFO[0027] writing dockerfile: index.Dockerfile898575371 packages="[openshift-pipelines-operator-rh]" INFO[0027] running podman build packages="[openshift-pipelines-operator-rh]" INFO[0027] [podman build --format docker -f index.Dockerfile898575371 -t registry.ghatwala-addon04-70b4.161.156.139.117.nip.io:5000/openshift-pipelines-rh/redhat-operator-index:v4.6 .] packages="[openshift-pipelines-operator-rh]" # podman images | grep openshift-pipelines-rh registry.ghatwala-addon04-70b4.161.156.139.117.nip.io:5000/openshift-pipelines-rh/redhat-operator-index v4.6 26a389b4f135 9 minutes ago 769 MB # podman run --rm -it registry.ghatwala-addon04-70b4.161.156.139.117.nip.io:5000/openshift-pipelines-rh/redhat-operator-index:v4.6 version Version: version.Version{OpmVersion:"v1.14.3-22-ge86c799b", GitCommit:"e86c799beecfbba0b2d679702248e3ef526ae0ee", BuildDate:"2020-12-16T07:03:34Z", GoOs:"linux", GoArch:"ppc64le"} So confirmed that using "--binary-image" flag , able to get pruned images for power (4.6). # opm index prune --help | grep binary -i, --binary-image opm container image for on-image opm command Thank you, ` -i registry.redhat.io/openshift4/ose-operator-registry:v4.6` also needed for opm index prune on s390x. Any idea when we can get this added to the docs? Hey Tom, The doc PE have already created a PR - https://github.com/openshift/openshift-docs/pull/28642 for this , can you please post there about validation on Z too using above in disconnected/restricted Z environment. This BZ can be closed. The PR has been merged and update will be reflected in 4.6 and later docs. Following up on this via https://bugzilla.redhat.com/show_bug.cgi?id=1943150. |