-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.5
-
Quality / Stability / Reliability
-
None
-
None
-
None
-
Moderate
-
None
-
x86_64
-
None
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
None
-
None
-
None
-
None
-
None
Description of problem:
When I execute "opm index add" to add bundle to index image, it failed with the error "error loading bundle from image: Invalid bundle etcdoperator.v0.9.4, bundle specifies a non-existent replacement etcdoperator.v0.9.2".
This conflicts with the new feature https://issues.redhat.com/browse/OLM-1406. In the new feature, the spec.replaces will be invalid from 4.5. So the spec.replaces should not be validated.
Version-Release number of selected component (if applicable):
With the latest master branch opm
[root@preserve-olm-env operator-registry]# git log
commit 6e6a14d111f9ffbcff0935fb8d394bc4a0e0182b
Merge: 2191b65 ea6c6a4
Author: OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>
Date: Sat Apr 25 14:42:37 2020 +0200
Merge pull request #243 from djzager/filtercmd
bug 1827748: feature: opm (index|registry) prune command
How reproducible:
always
Steps to Reproduce:
1. make etcd-bundle:0.9.0 and push it to quay
$ opm alpha bundle build -d /root/hui/community-operators/community-operators/etcd/0.9.0 -t quay.io/yuhui12/etcd-bundle:0.9.0 -c alpha -p etcd
$ docker push quay.io/yuhui12/etcd-bundle:0.9.0
2. make etcd-bundle:0.9.4 and push it to quay
$ opm alpha bundle build -d /root/hui/community-operators/community-operators/etcd/0.9.4 -t quay.io/yuhui12/etcd-bundle:0.9.4 -c alpha -p etcd
$ docker push quay.io/yuhui12/etcd-bundle:0.9.4
3. make etcd-index:0.9.0
$ opm index add -b quay.io/yuhui12/etcd-bundle:0.9.0 -t quay.io/yuhui12/etcd-index:0.9.0 -c docker
INFO[0000] building the index bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"
INFO[0000] running /usr/bin/docker pull quay.io/yuhui12/etcd-bundle:0.9.0 bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"
INFO[0000] running /usr/bin/docker pull quay.io/yuhui12/etcd-bundle:0.9.0 bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"
INFO[0001] running docker save bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"
INFO[0001] Could not find dependencies file dir=bundle_tmp705381820 file=bundle_tmp705381820/metadata load=annotations
INFO[0001] skipping hidden file dir=bundle_tmp705381820 file=.wh..wh..opq find=csv
INFO[0001] found csv, loading bundle dir=bundle_tmp705381820 file=bundle_tmp705381820/manifests load=bundle
INFO[0001] skipping hidden file dir=bundle_tmp705381820/manifests file=.wh..wh..opq load=bundle
INFO[0001] loading bundle file dir=bundle_tmp705381820/manifests file=etcdbackups.etcd.database.coreos.com.crd.yaml load=bundle
INFO[0001] loading bundle file dir=bundle_tmp705381820/manifests file=etcdclusters.etcd.database.coreos.com.crd.yaml load=bundle
INFO[0001] loading bundle file dir=bundle_tmp705381820/manifests file=etcdoperator.v0.9.0.clusterserviceversion.yaml load=bundle
INFO[0001] loading bundle file dir=bundle_tmp705381820/manifests file=etcdrestores.etcd.database.coreos.com.crd.yaml load=bundle
INFO[0001] Generating dockerfile bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"
INFO[0001] writing dockerfile: index.Dockerfile096973946 bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"
INFO[0001] running docker build bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"
INFO[0001] [docker build -f index.Dockerfile096973946 -t quay.io/yuhui12/etcd-index:0.9.0 .] bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"
4.make etcd-index: 0.9.4
- /root/hui/operator-registry/opm index add --bundles quay.io/yuhui12/etcd-bundle:0.9.4 --from-index quay.io/yuhui12/etcd-index:0.9.0 --tag quay.io/yuhui12/etcd-index:0.9.4 -c docker --permissive
INFO[0000] building the index bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0000] Pulling previous image quay.io/yuhui12/etcd-index:0.9.0 to get metadata bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0000] running /usr/bin/docker pull quay.io/yuhui12/etcd-index:0.9.0 bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0000] running /usr/bin/docker pull quay.io/yuhui12/etcd-index:0.9.0 bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0001] Getting label data from previous image bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0001] running docker inspect bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0001] running /usr/bin/docker pull quay.io/yuhui12/etcd-index:0.9.0 bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0001] running docker save bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0002] running /usr/bin/docker pull quay.io/yuhui12/etcd-bundle:0.9.4 bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0003] running /usr/bin/docker pull quay.io/yuhui12/etcd-bundle:0.9.4 bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0003] running docker save bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0003] Could not find dependencies file dir=bundle_tmp124162563 file=bundle_tmp124162563/metadata load=annotations
INFO[0003] skipping hidden file dir=bundle_tmp124162563 file=.wh..wh..opq find=csv
INFO[0003] found csv, loading bundle dir=bundle_tmp124162563 file=bundle_tmp124162563/manifests load=bundle
INFO[0003] skipping hidden file dir=bundle_tmp124162563/manifests file=.wh..wh..opq load=bundle
INFO[0003] loading bundle file dir=bundle_tmp124162563/manifests file=bundle.Dockerfile load=bundle
INFO[0003] loading bundle file dir=bundle_tmp124162563/manifests file=etcdbackups.etcd.database.coreos.com.crd.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp124162563/manifests file=etcdclusters.etcd.database.coreos.com.crd.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp124162563/manifests file=etcdoperator.v0.9.4.clusterserviceversion.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp124162563/manifests file=etcdrestores.etcd.database.coreos.com.crd.yaml load=bundle
WARN[0003] permissive mode enabled bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]" error="error loading bundle from image: Invalid bundle etcdoperator.v0.9.4, bundle specifies a non-existent replacement etcdoperator.v0.9.2"
INFO[0003] Generating dockerfile bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0003] writing dockerfile: index.Dockerfile612819506 bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0003] running docker build bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
INFO[0003] [docker build -f index.Dockerfile612819506 -t quay.io/yuhui12/etcd-index:0.9.4 .] bundles="[quay.io/yuhui12/etcd-bundle:0.9.4]"
Actual results:
Create the index image of etcd 0.9.0 and 0.9.4 without any error.
Expected results:
error="error loading bundle from image: Invalid bundle etcdoperator.v0.9.4, bundle specifies a non-existent replacement etcdoperator.v0.9.2"
Additional info: