Bug 1827992 - opm index add succeed but there is error info "Could not find dependencies file"
Summary: opm index add succeed but there is error info "Could not find dependencies file"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.5
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Evan Cordell
QA Contact: yhui
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-26 07:43 UTC by yhui
Modified: 2020-07-13 17:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:31:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-registry pull 312 0 None closed Bug 1827992: Clarify log message to indicate that dependencies.yaml is optional. 2020-07-15 09:28:23 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:31:56 UTC

Description yhui 2020-04-26 07:43:30 UTC
Description of problem:
When I execute "opm index add" to build index image, it succeed but there is error info "Could not find dependencies file".


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.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]"


Actual results:
It succeed without error info.


Expected results:
It succeed but there is error info "Could not find dependencies file".


Additional info:

Comment 1 Ben Luddy 2020-04-30 04:51:19 UTC
This is part of the dependency resolution work that we are hoping to complete for 4.6. The message in question is logged at the "INFO" level, and doesn't indicate that an error occurred, since the dependencies file is optional. More background information about bundle dependencies is at https://github.com/operator-framework/operator-registry/blob/master/docs/design/operator-bundle.md#bundle-dependencies.

I've opened a minor PR to adjust the message to clarify.

Comment 4 yhui 2020-04-30 09:54:17 UTC
Version-Release number of selected component (if applicable):
With the latest master branch opm
[root@preserve-olm-env operator-registry]# git log
commit 5c21e0f3b9b2f6b07ee1e08322199abd54475dd8
Merge: bf0c8f1 dc99201
Author: OpenShift Merge Robot <openshift-merge-robot.github.com>
Date:   Thu Apr 30 08:16:22 2020 +0200

    Merge pull request #312 from benluddy/deps-not-found-optional
    
    Bug 1827992: Clarify log message to indicate that dependencies.yaml is optional.


Steps to test:
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 optional dependencies file     dir=bundle_tmp418775558 file=bundle_tmp418775558/metadata load=annotations
INFO[0001] skipping hidden file                          dir=bundle_tmp418775558 file=.wh..wh..opq find=csv
INFO[0001] found csv, loading bundle                     dir=bundle_tmp418775558 file=bundle_tmp418775558/manifests load=bundle
INFO[0001] skipping hidden file                          dir=bundle_tmp418775558/manifests file=.wh..wh..opq load=bundle
INFO[0001] loading bundle file                           dir=bundle_tmp418775558/manifests file=configmap.yaml load=bundle
INFO[0001] loading bundle file                           dir=bundle_tmp418775558/manifests file=etcdbackups.etcd.database.coreos.com.crd.yaml load=bundle
INFO[0001] loading bundle file                           dir=bundle_tmp418775558/manifests file=etcdclusters.etcd.database.coreos.com.crd.yaml load=bundle
INFO[0001] loading bundle file                           dir=bundle_tmp418775558/manifests file=etcdoperator.v0.9.0.clusterserviceversion.yaml load=bundle
INFO[0001] loading bundle file                           dir=bundle_tmp418775558/manifests file=etcdrestores.etcd.database.coreos.com.crd.yaml load=bundle
INFO[0001] loading bundle file                           dir=bundle_tmp418775558/manifests file=secrets.yaml load=bundle
INFO[0001] Generating dockerfile                         bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"
INFO[0001] writing dockerfile: index.Dockerfile194051252  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.Dockerfile194051252 -t quay.io/yuhui12/etcd-index:0.9.0 .]  bundles="[quay.io/yuhui12/etcd-bundle:0.9.0]"

There is "optional" added into the INFO.
Could not find dependencies file  ->  Could not find optional dependencies file

Comment 5 errata-xmlrpc 2020-07-13 17:31:39 UTC
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, 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/RHBA-2020:2409


Note You need to log in before you can comment on or make changes to this bug.