Bug 1835887 - The catalogsource pod created by the bundle index image built with 'opm index add' can not use "oc rsh" to interact.
Summary: The catalogsource pod created by the bundle index image built with 'opm index...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.5
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.5.0
Assignee: Evan Cordell
QA Contact: yhui
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-14 16:56 UTC by yhui
Modified: 2020-07-13 17:39 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:39:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-registry pull 320 0 None closed Bug 1835887: upstream-opm-builder.Dockerfile: add ca-certificates 2020-11-27 05:41:43 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:39:19 UTC

Description yhui 2020-05-14 16:56:13 UTC
Description of problem:
The catalogsource pod created by the bundle index image built with 'opm index add' can not use "oc rsh" to interact.

[root@preserve-olm-env new-feature]# oc rsh cockroachdb-catalog-kjj26
ERRO[0000] exec failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory" 
exec failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory"
command terminated with exit code 1


Version-Release number of selected component (if applicable):
[root@preserve-olm-env ~]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.nightly-2020-05-13-221558   True        False         13h     Cluster version is 4.5.0-0.nightly-2020-05-13-221558


How reproducible:
always


Steps to Reproduce:
1. Create cockroachdb bundle image using 'opm alpha bundle build'
[root@preserve-olm-env ~]# opm alpha bundle build -d /root/hui/community-operators/community-operators/cockroachdb/2.0.9 -t quay.io/yuhui12/cockroachdb-bundle:2.0.9 -c alpha -p cockroachdb
[root@preserve-olm-env ~]# opm alpha bundle build -d /root/hui/community-operators/community-operators/cockroachdb/2.1.1 -t quay.io/yuhui12/cockroachdb-bundle:2.1.1 -c alpha -p cockroachdb
[root@preserve-olm-env ~]# opm alpha bundle build -d /root/hui/community-operators/community-operators/cockroachdb/2.1.11 -t quay.io/yuhui12/cockroachdb-bundle:2.1.11 -c alpha -p cockroachdb

[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-bundle:2.0.9
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-bundle:2.1.1
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-bundle:2.1.11

2.Create the bundle index image using 'opm index add'
[root@preserve-olm-env ~]# opm index add -b quay.io/yuhui12/cockroachdb-bundle:2.0.9 -t quay.io/yuhui12/cockroachdb-index:2.0.9 -c docker
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-index:2.0.9
[root@preserve-olm-env ~]# opm index add --bundles quay.io/yuhui12/cockroachdb-bundle:2.1.1 --from-index quay.io/yuhui12/cockroachdb-index:2.0.9 --tag quay.io/yuhui12/cockroachdb-index:2.1.1
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-index:2.1.1
[root@preserve-olm-env ~]# opm index add --bundles quay.io/yuhui12/cockroachdb-bundle:2.1.11 --from-index quay.io/yuhui12/cockroachdb-index:2.1.1 --tag quay.io/yuhui12/cockroachdb-index:2.1.11 -c docker
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-index:2.1.11

3.Create catalogsource using the bundle index image.
[root@preserve-olm-env new-feature]# cat catsrc.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: cockroachdb-catalog
  namespace: openshift-marketplace
spec:
  displayName: cockroachdb Operator Catalog
  image: quay.io/yuhui12/cockroachdb-index:2.1.11
  publisher: QE
  sourceType: grpc
[root@preserve-olm-env new-feature]# oc apply -f catsrc.yaml

[root@preserve-olm-env new-feature]# oc get catsrc -n openshift-marketplace
NAME                  DISPLAY                        TYPE   PUBLISHER   AGE
certified-operators   Certified Operators            grpc   Red Hat     13h
cockroachdb-catalog   cockroachdb Operator Catalog   grpc   QE          8h
community-operators   Community Operators            grpc   Red Hat     13h
etcd-catalog          Etcd Operator                  grpc   QE          8h
qe-app-registry                                      grpc               13h
redhat-marketplace    Red Hat Marketplace            grpc   Red Hat     13h
redhat-operators      Red Hat Operators              grpc   Red Hat     13h
[root@preserve-olm-env new-feature]# oc get pod -n openshift-marketplace
NAME                                   READY   STATUS    RESTARTS   AGE
certified-operators-76dcb7679-cgldm    1/1     Running   0          13h
cockroachdb-catalog-kjj26              1/1     Running   0          9h
community-operators-76cbcd48f6-9b8td   1/1     Running   0          13h
etcd-catalog-6mbqk                     1/1     Running   0          8h
marketplace-operator-85fbdccd7-fzz8g   1/1     Running   0          13h
qe-app-registry-6d877786d4-vnxml       1/1     Running   0          13h
redhat-marketplace-8574d7bcc4-dqngr    1/1     Running   0          13h
redhat-operators-7bf444b88d-jgwzc      1/1     Running   0          13h

[root@preserve-olm-env new-feature]# oc rsh cockroachdb-catalog-kjj26
ERRO[0000] exec failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory" 
exec failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory"
command terminated with exit code 1

Actual results:
The pod cannot be interacted by 'oc rsh' or 'kubectl exec -ti'.


Expected results:
The pod can be interacted by 'oc rsh'


Additional info:
The OCP cluster to debug is https://mastern-jenkins-csb-openshift-qe.cloud.paas.psi.redhat.com/job/Launch%20Environment%20Flexy/93055/artifact/workdir/install-dir/auth/kubeconfig/*view*/.

Comment 3 yhui 2020-05-18 09:50:52 UTC
[root@preserve-olm-env 1835887]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.nightly-2020-05-17-220731   True        False         8m33s   Cluster version is 4.5.0-0.nightly-2020-05-17-220731

Steps to test:
1. Create cockroachdb bundle image using 'opm alpha bundle build'
[root@preserve-olm-env ~]# opm alpha bundle build -d /root/hui/community-operators/community-operators/cockroachdb/2.0.9 -t quay.io/yuhui12/cockroachdb-bundle:2.0.9 -c alpha -p cockroachdb
[root@preserve-olm-env ~]# opm alpha bundle build -d /root/hui/community-operators/community-operators/cockroachdb/2.1.1 -t quay.io/yuhui12/cockroachdb-bundle:2.1.1 -c alpha -p cockroachdb
[root@preserve-olm-env ~]# opm alpha bundle build -d /root/hui/community-operators/community-operators/cockroachdb/2.1.11 -t quay.io/yuhui12/cockroachdb-bundle:2.1.11 -c alpha -p cockroachdb

[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-bundle:2.0.9
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-bundle:2.1.1
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-bundle:2.1.11

2.Create the bundle index image using 'opm index add'
[root@preserve-olm-env ~]# opm index add -b quay.io/yuhui12/cockroachdb-bundle:2.0.9 -t quay.io/yuhui12/cockroachdb-index:2.0.9 -c docker
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-index:2.0.9
[root@preserve-olm-env ~]# opm index add --bundles quay.io/yuhui12/cockroachdb-bundle:2.1.1 --from-index quay.io/yuhui12/cockroachdb-index:2.0.9 --tag quay.io/yuhui12/cockroachdb-index:2.1.1
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-index:2.1.1
[root@preserve-olm-env ~]# opm index add --bundles quay.io/yuhui12/cockroachdb-bundle:2.1.11 --from-index quay.io/yuhui12/cockroachdb-index:2.1.1 --tag quay.io/yuhui12/cockroachdb-index:2.1.11 -c docker
[root@preserve-olm-env ~]# docker push quay.io/yuhui12/cockroachdb-index:2.1.11

3.Create catalogsource using the bundle index image.
[root@preserve-olm-env new-feature]# cat catsrc.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: cockroachdb-catalog
  namespace: openshift-marketplace
spec:
  displayName: cockroachdb Operator Catalog
  image: quay.io/yuhui12/cockroachdb-index:2.1.11
  publisher: QE
  sourceType: grpc
[root@preserve-olm-env new-feature]# oc apply -f catsrc.yaml

[root@preserve-olm-env 1835887]# oc get catsrc -n openshift-marketplace
NAME                  DISPLAY                        TYPE   PUBLISHER   AGE
certified-operators   Certified Operators            grpc   Red Hat     18m
cockroachdb-catalog   cockroachdb Operator Catalog   grpc   QE          3m
community-operators   Community Operators            grpc   Red Hat     18m
qe-app-registry                                      grpc               6m2s
redhat-marketplace    Red Hat Marketplace            grpc   Red Hat     18m
redhat-operators      Red Hat Operators              grpc   Red Hat     18m
[root@preserve-olm-env 1835887]# oc get pod -n openshift-marketplace
NAME                                   READY   STATUS    RESTARTS   AGE
certified-operators-85c74dbdc4-wvbh6   1/1     Running   0          19m
cockroachdb-catalog-p58cl              1/1     Running   0          2m
community-operators-5c4d9c8ccc-fvpfx   1/1     Running   0          19m
marketplace-operator-9d7c8cd7-k7656    1/1     Running   0          21m
qe-app-registry-54577dfc87-7br79       1/1     Running   0          6m21s
redhat-marketplace-5c44494455-jwdmk    1/1     Running   0          19m
redhat-operators-779cc96dd7-8ddsp      1/1     Running   0          19m


[root@preserve-olm-env 1835887]# oc rsh cockroachdb-catalog-p58cl
/ # ls
bin       dev       home      media     opt       root      sbin      sys       usr
database  etc       lib       mnt       proc      run       srv       tmp       var

Verify the bug.

Comment 4 errata-xmlrpc 2020-07-13 17:39:04 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.