Description of problem: When creating catalogsource wmco in openshift-marketplace namespace(https://github.com/openshift/windows-machine-config-operator/blob/master/README.md#bundling-the-windows-machine-config-operator), catalogsource's status.connectionState.lastObservedState field is always "TRANSIENT_FAILURE", check pod in openshift-marketplace, found "Error: no command specified". # oc get pod -n openshift-marketplace NAME READY STATUS RESTARTS AGE ... wmco-c5vr2 0/1 CreateContainerError 0 11m wmco-qbshr 0/1 CreateContainerError 0 4m44s # oc describe pod wmco-c5vr2 -n openshift-marketplace ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 12m default-scheduler Successfully assigned openshift-marketplace/wmco-c5vr2 to ip-10-0-159-61.us-east-2.compute.internal Normal AddedInterface 12m multus Add eth0 [10.128.2.11/23] Normal Pulled 11m (x8 over 12m) kubelet, ip-10-0-159-61.us-east-2.compute.internal Successfully pulled image "quay.io/sgaoshang/wmco-bundle:1.0.0" Warning Failed 11m (x8 over 12m) kubelet, ip-10-0-159-61.us-east-2.compute.internal Error: no command specified Normal Pulling 2m7s (x51 over 12m) kubelet, ip-10-0-159-61.us-east-2.compute.internal Pulling image "quay.io/sgaoshang/wmco-bundle:1.0.0" Version-Release number of selected component (if applicable): # oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.5.0-0.nightly-2020-05-19-021142 True False 24h Cluster version is 4.5.0-0.nightly-2020-05-19-021142 # operator-sdk version operator-sdk version: "v0.17.0", commit: "2fd7019f856cdb6f6618e2c3c80d15c3c79d1b6c", kubernetes version: "unknown", go version: "go1.13.10 linux/amd64" # windows-machine-config-operator commit: a98129c0b8ff42762f7e9dcd4b3a33f671c953ac How reproducible: always Steps to Reproduce: 1. Build wmco operator image and push to quay.io $ operator-sdk build quay.io/sgaoshang/wmco:latest $ docker push quay.io/sgaoshang/wmco 2. Create a bundle image and push to quay.io, verify that the new bundle is valid Replace REPLACE_IMAGE to quay.io/sgaoshang/wmco in deploy/olm-catalog/windows-machine-config-operator/0.0.0/windows-machine-config-operator.v0.0.0.clusterserviceversion.yaml $ sed -i "s/REPLACE_IMAGE/quay.io\/sgaoshang\/wmco/g" deploy/olm-catalog/windows-machine-config-operator/0.0.0/windows-machine-config-operator.v0.0.0.clusterserviceversion.yaml $ operator-sdk bundle create quay.io/sgaoshang/wmco-bundle:1.0.0 -d deploy/olm-catalog/windows-machine-config-operator/0.0.0 --channels alpha --default-channel alpha --image-builder podman $ podman push quay.io/sgaoshang/wmco-bundle:1.0.0 3. Create a new operator index and push to quay.io $ ./opm index add --bundles quay.io/sgaoshang/wmco-bundle:1.0.0 --tag quay.io/sgaoshang/wmco-index:1.0.0 $ podman push quay.io/sgaoshang/wmco-index:1.0.0 4. Create catalogsource wmco in openshift-marketplace namespace Replace REPLACE_IMAGE to quay.io/sgaoshang/wmco-index:1.0.0 in deploy/olm-catalog/catalogsource.yaml $ sed -i "s/REPLACE_IMAGE/quay.io\/sgaoshang\/wmco-bundle:1.0.0/g" deploy/olm-catalog/catalogsource.yaml $ oc apply -f deploy/olm-catalog/catalogsource.yaml $ oc describe catalogsource wmco -n openshift-marketplace Actual results: Catalogsource's status.connectionState.lastObservedState field always TRANSIENT_FAILURE Expected results: Catalogsource's status.connectionState.lastObservedState field should be set to READY Additional info:
catalog source should pull the index image in place of bundle image
in step 4 ``` sed -i "s/REPLACE_IMAGE/quay.io\/sgaoshang\/wmco-bundle:1.0.0/g" deploy/olm-catalog/catalogsource.yaml ``` it needs to be `wmco-index` but is `wmco-bundle` PR is up to make readme more clear to understand
(In reply to Pratik Mahajan from comment #2) > in step 4 > ``` > sed -i "s/REPLACE_IMAGE/quay.io\/sgaoshang\/wmco-bundle:1.0.0/g" > deploy/olm-catalog/catalogsource.yaml > ``` > > it needs to be `wmco-index` but is `wmco-bundle` > PR is up to make readme more clear to understand Thanks for your notice and update on readme, create wmco catalogsource succeed now. Version: # oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.5.0-0.nightly-2020-06-01-043833 True False 48m Cluster version is 4.5.0-0.nightly-2020-06-01-043833 Step 4. # oc apply -f deploy/olm-catalog/catalogsource.yaml catalogsource.operators.coreos.com/wmco created # oc describe catalogsource wmco -n openshift-marketplace Name: wmco Namespace: openshift-marketplace Labels: <none> Annotations: kubectl.kubernetes.io/last-applied-configuration: {"apiVersion":"operators.coreos.com/v1alpha1","kind":"CatalogSource","metadata":{"annotations":{},"name":"wmco","namespace":"openshift-mar... API Version: operators.coreos.com/v1alpha1 Kind: CatalogSource Metadata: Creation Timestamp: 2020-06-01T11:03:51Z Generation: 1 Managed Fields: API Version: operators.coreos.com/v1alpha1 Fields Type: FieldsV1 fieldsV1: f:metadata: f:annotations: .: f:kubectl.kubernetes.io/last-applied-configuration: f:spec: .: f:displayName: f:image: f:sourceType: f:updateStrategy: .: f:registryPoll: Manager: oc Operation: Update Time: 2020-06-01T11:03:51Z API Version: operators.coreos.com/v1alpha1 Fields Type: FieldsV1 fieldsV1: f:spec: f:icon: .: f:base64data: f:mediatype: f:updateStrategy: f:registryPoll: f:interval: f:status: .: f:connectionState: .: f:address: f:lastConnect: f:lastObservedState: f:latestImageRegistryPoll: f:registryService: .: f:createdAt: f:port: f:protocol: f:serviceName: f:serviceNamespace: Manager: catalog Operation: Update Time: 2020-06-01T11:09:11Z Resource Version: 38144 Self Link: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-marketplace/catalogsources/wmco UID: ee987f86-940c-42e7-bf41-f8cd13bc11c9 Spec: Display Name: Windows Machine Config operators Image: quay.io/sgaoshang/wmco-index:1.0.0 Source Type: grpc Update Strategy: Registry Poll: Interval: 5m Status: Connection State: Address: wmco.openshift-marketplace.svc:50051 Last Connect: 2020-06-01T11:09:11Z Last Observed State: READY Latest Image Registry Poll: 2020-06-01T11:08:54Z Registry Service: Created At: 2020-06-01T11:03:51Z Port: 50051 Protocol: grpc Service Name: wmco Service Namespace: openshift-marketplace Events: <none>
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