Bug 1967369

Summary: pkgman-to-bundle will exit with flag "--build-cmd"
Product: OpenShift Container Platform Reporter: Fan Jia <jfan>
Component: Operator SDKAssignee: Varsha <vnarsing>
Status: CLOSED ERRATA QA Contact: Fan Jia <jfan>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.8CC: aos-bugs, jesusr, jlanford, memodi
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1988976 (view as bug list) Environment:
Last Closed: 2021-10-12 06:01:19 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:
Bug Depends On: 1992405    
Bug Blocks:    

Comment 1 Fan Jia 2021-06-08 10:02:20 UTC
Test still failed, the "docker build will search the docker file Dockerfile that doesn't exist, the bundle.Dockerfile is created :

operator-sdk version: "v1.8.0-3-gad3a4f2b", commit: "ad3a4f2bab45d0a8ce0dfb552efb2680f09906d7", kubernetes version: "v1.20.2", go version: "go1.16.5", GOOS: "linux", GOARCH: "amd64"
$ operator-sdk pkgman-to-bundle etcd --build-cmd 'docker build' --image-tag-base quay.io/xxxx/etcddddd --output-dir kakabundles
INFO[0000] Packagemanifests will be migrated to bundles in kakabundles directory
INFO[0000] Creating kakabundles/bundle-0.6.1/bundle.Dockerfile
INFO[0000] Creating kakabundles/bundle-0.6.1/bundle/metadata/annotations.yaml
INFO[0000] Bundle metadata generated suceessfully
INFO[0000] Using the specified command to build image
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/jfan/projects/src/github.com/community-operators/community-operators/kakabundles/bundle-0.6.1/Dockerfile: no such file or directory
Error: exit status 1

$tree kakabundles/
kakabundles/
└── bundle-0.6.1
├── bundle
│   ├── manifests
│   │   ├── etcdclusters.etcd.database.coreos.com.crd.yaml
│   │   └── etcdoperator.v0.6.1.clusterserviceversion.yaml
│   └── metadata
│   └── annotations.yaml
└── bundle.Dockerfile

Comment 2 Varsha 2021-06-10 17:05:01 UTC
The PR to address this upstream is merged (https://github.com/operator-framework/operator-sdk/pull/4964). Keeping this open till this is pulled downstream.

Comment 4 Fan Jia 2021-08-02 08:15:26 UTC
passed in the upstream.

Comment 5 Jesus M. Rodriguez 2021-08-17 13:50:30 UTC
Waiting on downstream PR to merge. https://github.com/openshift/ocp-release-operator-sdk/pull/141

Comment 6 Jesus M. Rodriguez 2021-09-07 14:18:50 UTC
Not a blocker for OCP z-stream; only affects SDK release.

Comment 8 Fan Jia 2021-09-24 02:36:14 UTC
verified
operator-sdk version: "v1.8.2-ocp", commit: "402e3ed53ab60d0632b8f08a74d4df104e673698", kubernetes version: "v1.20.2", go version: "go1.16.6", GOOS: "linux", GOARCH: "amd64"
operator-sdk pkgman-to-bundle etcd --build-cmd 'docker build -f bundle.Dockerfile . -t' --image-tag-base quay.io/xxxxx/etcd-bundle --output-dir kakabundles
INFO[0000] Packagemanifests will be migrated to bundles in kakabundles directory 
INFO[0000] Creating kakabundles/bundle-0.6.1/bundle.Dockerfile 
INFO[0000] Creating kakabundles/bundle-0.6.1/bundle/metadata/annotations.yaml 
INFO[0000] Bundle metadata generated suceessfully       
INFO[0000] Using the specified command to build image   
INFO[0000] Successfully built image quay.io/xxxxx/etcd-bundle:0.6.1 
INFO[0000] Supported channels cannot be identified from CSV etcdoperator.v0.9.0, using default channel singlenamespace-alpha 
INFO[0000] Creating kakabundles/bundle-0.9.0/bundle.Dockerfile 
INFO[0000] Creating kakabundles/bundle-0.9.0/bundle/metadata/annotations.yaml 
INFO[0000] Bundle metadata generated suceessfully       
INFO[0000] Using the specified command to build image   
INFO[0001] Successfully built image quay.io/xxxxx/etcd-bundle:0.9.0 
INFO[0001] Supported channels cannot be identified from CSV etcdoperator.v0.9.2, using default channel singlenamespace-alpha 
INFO[0001] Creating kakabundles/bundle-0.9.2/bundle.Dockerfile 
INFO[0001] Creating kakabundles/bundle-0.9.2/bundle/metadata/annotations.yaml 
INFO[0001] Bundle metadata generated suceessfully       
INFO[0001] Using the specified command to build image   
INFO[0001] Successfully built image quay.io/xxxxx/etcd-bundle:0.9.2 
INFO[0001] Supported channels cannot be identified from CSV etcdoperator.v0.9.2-clusterwide, using default channel singlenamespace-alpha 
INFO[0001] Creating kakabundles/bundle-0.9.2-clusterwide/bundle.Dockerfile 
INFO[0001] Creating kakabundles/bundle-0.9.2-clusterwide/bundle/metadata/annotations.yaml 
INFO[0001] Bundle metadata generated suceessfully       
INFO[0001] Using the specified command to build image   
INFO[0002] Successfully built image quay.io/xxxxx/etcd-bundle:0.9.2-clusterwide 
INFO[0002] Creating kakabundles/bundle-0.9.4/bundle.Dockerfile 
INFO[0002] Creating kakabundles/bundle-0.9.4/bundle/metadata/annotations.yaml 
INFO[0002] Bundle metadata generated suceessfully       
INFO[0002] Using the specified command to build image   
INFO[0002] Successfully built image quay.io/xxxxx/etcd-bundle:0.9.4 
INFO[0002] Creating kakabundles/bundle-0.9.4-clusterwide/bundle.Dockerfile 
INFO[0002] Creating kakabundles/bundle-0.9.4-clusterwide/bundle/metadata/annotations.yaml 
INFO[0002] Bundle metadata generated suceessfully       
INFO[0002] Using the specified command to build image   
INFO[0003] Successfully built image quay.io/xxxxx/etcd-bundle:0.9.4-clusterwide

Comment 11 errata-xmlrpc 2021-10-12 06:01:19 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 (OpenShift Container Platform 4.8.14 bug fix 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/RHBA-2021:3682