Bug 1837936 - Failed to create wmco catalogsource
Summary: Failed to create wmco catalogsource
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Windows Containers
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.5.0
Assignee: Pratik Mahajan
QA Contact: gaoshang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-20 08:51 UTC by gaoshang
Modified: 2020-07-13 17:40 UTC (History)
4 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift windows-machine-config-operator pull 54 0 None closed Bug 1837936: Failed to create wmco catalogsource 2020-08-03 03:35:02 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:40:56 UTC

Description gaoshang 2020-05-20 08:51:32 UTC
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:

Comment 1 Pratik Mahajan 2020-05-26 20:24:58 UTC
catalog source should pull the index image in place of bundle image

Comment 2 Pratik Mahajan 2020-05-27 18:30:00 UTC
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

Comment 5 gaoshang 2020-06-01 11:12:42 UTC
(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>

Comment 6 errata-xmlrpc 2020-07-13 17:40:28 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.