Bug 1988976 - pkgman-to-bundle will exit with flag "--build-cmd"
Summary: pkgman-to-bundle will exit with flag "--build-cmd"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Operator SDK
Version: 4.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.9.0
Assignee: Varsha
QA Contact: Fan Jia
URL:
Whiteboard:
Depends On: 1992405
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-02 08:19 UTC by Fan Jia
Modified: 2021-10-18 17:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1967369
Environment:
Last Closed: 2021-10-18 17:43:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ocp-release-operator-sdk pull 141 0 None None None 2021-08-20 04:23:45 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:43:58 UTC

Description Fan Jia 2021-08-02 08:19:06 UTC
Description of problem:
THe command will exit when the command `operator-sdk pkgman-to-bundle` run with flag "--build-cmd".

Version-Release number of selected component (if applicable):
operator-sdk version: "v1.8.0-ocp", commit: "280f5d34954df1cb8176dafc35551feaa8ff9e1b", kubernetes version: "v1.20.2", go version: "go1.15.5", GOOS: "linux", GOARCH: "amd64"

How reproducible:
always

Steps to Reproduce:
use the etcd packagemanifest: https://github.com/operator-framework/community-operators/tree/master/community-operators/etcd  

1.# operator-sdk pkgman-to-bundle etcd/ --output-dir ./etcdbundle --build-cmd "docker"  --image-tag-base quay.io/jfan/etcdddd
INFO[0000] Packagemanifests will be migrated to bundles in ./etcdbundle directory 
INFO[0000] Creating etcdbundle/bundle-0.6.1/bundle.Dockerfile 
INFO[0000] Creating etcdbundle/bundle-0.6.1/metadata/annotations.yaml 
INFO[0000] Bundle metadata generated suceessfully       
INFO[0000] Using the specified command to build image quay.io/jfan/etcdddd:0.6.1 
Error: exit status 1

2. operator-sdk pkgman-to-bundle etcd/ --output-dir ./etcdbundle --build-cmd "podman"  --image-tag-base quay.io/jfan/etcdddd
INFO[0000] Packagemanifests will be migrated to bundles in ./etcdbundle directory 
INFO[0000] Creating etcdbundle/bundle-0.6.1/bundle.Dockerfile 
INFO[0000] Creating etcdbundle/bundle-0.6.1/metadata/annotations.yaml 
INFO[0000] Bundle metadata generated suceessfully       
INFO[0000] Using the specified command to build image quay.io/jfan/etcdddd:0.6.1 
Error: exit status 125


3. the PATH
# echo $PATH
/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/root/bin:/usr/bin/docker

Actual results:
The command will exit status 1 with `--build-cmd "docker" `
and exit status 125 with `--build-cmd "podman"`

Expected results:
The command could success with the flag --build-cmd

Additional info:
The command can build the image success without flag "--build-cmd"
# operator-sdk pkgman-to-bundle etcd/ --output-dir ./etcdbundle   --image-tag-base quay.io/jfan/etcdddd
INFO[0000] Packagemanifests will be migrated to bundles in ./etcdbundle directory 
INFO[0000] Creating etcdbundle/bundle-0.6.1/bundle.Dockerfile 
INFO[0000] Creating etcdbundle/bundle-0.6.1/metadata/annotations.yaml 
INFO[0000] Bundle metadata generated suceessfully       
INFO[0000] Successfully built image quay.io/jfan/etcdddd:0.6.1 
INFO[0000] Supported channels cannot be identified from CSV etcdoperator.v0.9.0, using default channel 'preview' 
INFO[0000] Creating etcdbundle/bundle-0.9.0/metadata/annotations.yaml 
INFO[0000] Creating etcdbundle/bundle-0.9.0/bundle.Dockerfile 
INFO[0000] Bundle metadata generated suceessfully       
INFO[0001] Successfully built image quay.io/jfan/etcdddd:0.9.0 
INFO[0001] Supported channels cannot be identified from CSV etcdoperator.v0.9.2, using default channel 'preview' 
INFO[0001] Creating etcdbundle/bundle-0.9.2/bundle.Dockerfile 
INFO[0001] Creating etcdbundle/bundle-0.9.2/metadata/annotations.yaml 
INFO[0001] Bundle metadata generated suceessfully       
INFO[0002] Successfully built image quay.io/jfan/etcdddd:0.9.2 
INFO[0002] Supported channels cannot be identified from CSV etcdoperator.v0.9.2-clusterwide, using default channel 'preview' 
INFO[0002] Creating etcdbundle/bundle-0.9.2-clusterwide/bundle.Dockerfile 
INFO[0002] Creating etcdbundle/bundle-0.9.2-clusterwide/metadata/annotations.yaml 
INFO[0002] Bundle metadata generated suceessfully       
INFO[0003] Successfully built image quay.io/jfan/etcdddd:0.9.2-clusterwide 
INFO[0003] Creating etcdbundle/bundle-0.9.4/bundle.Dockerfile 
INFO[0003] Creating etcdbundle/bundle-0.9.4/metadata/annotations.yaml 
INFO[0003] Bundle metadata generated suceessfully       
INFO[0004] Successfully built image quay.io/jfan/etcdddd:0.9.4 
INFO[0004] Creating etcdbundle/bundle-0.9.4-clusterwide/bundle.Dockerfile 
INFO[0004] Creating etcdbundle/bundle-0.9.4-clusterwide/metadata/annotations.yaml 
INFO[0004] Bundle metadata generated suceessfully       
INFO[0004] Successfully built image quay.io/jfan/etcdddd:0.9.4-clusterwide

Comment 1 Jesus M. Rodriguez 2021-08-10 20:32:17 UTC
This was fixed upstream, pending a downstream sync this week.

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

Comment 4 Jesus M. Rodriguez 2021-08-26 01:50:42 UTC
Fixed in v1.10.1-ocp

Comment 9 errata-xmlrpc 2021-10-18 17:43:46 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 (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


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