Bug 1879917 - Get the `context deadline exceeded` error when installing/uninstalling the opm
Summary: Get the `context deadline exceeded` error when installing/uninstalling the opm
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Operator SDK
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.7.0
Assignee: Joe Lanford
QA Contact: Fan Jia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-17 10:53 UTC by Jian Zhang
Modified: 2021-01-04 18:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-04 18:09:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-sdk pull 3897 0 None open Bug 1879917: increase waiting time and add logs 2021-02-03 00:03:27 UTC

Description Jian Zhang 2020-09-17 10:53:56 UTC
Description of problem:
Get the `context deadline exceeded` error when installing/uninstalling the opm.

FATA[0127] Failed to install OLM version "latest": failed to create CRDs and resources: Post "https://api.weinliu466.qe.devcluster.openshift.com:6443/apis/operators.coreos.com/v1alpha1/namespaces/olm/catalogsources": context deadline exceeded

INFO[0125]   Deleting Deployment "olm/olm-operator"    
FATA[0126] Failed to uninstall OLM: Delete "https://api.weinliu466.qe.devcluster.openshift.com:6443/apis/apps/v1/namespaces/olm/deployments/olm-operator": context deadline exceeded


Version-Release number of selected component (if applicable):
The master branch of the https://github.com/operator-framework/operator-sdk

How reproducible:
always

Steps to Reproduce:
1. Compile the operator-sdk binary.
2. Install an OCP.
3. Remove the default OLM.
4, Install the OLM by using the `operator-sdk olm install` command.

Actual results:
mac:operator-sdk jianzhang$ operator-sdk olm install
I0917 16:53:19.708492    2138 request.go:621] Throttling request took 1.001896986s, request: GET:https://api.weinliu466.qe.devcluster.openshift.com:6443/apis/migration.k8s.io/v1alpha1?timeout=32s
...
INFO[0126]   Creating OperatorGroup "olm/olm-operators"
INFO[0126]   Creating ClusterServiceVersion "olm/packageserver"
INFO[0127]   Creating CatalogSource "olm/operatorhubio-catalog"
FATA[0127] Failed to install OLM version "latest": failed to create CRDs and resources: Post "https://api.weinliu466.qe.devcluster.openshift.com:6443/apis/operators.coreos.com/v1alpha1/namespaces/olm/catalogsources": context deadline exceeded


Expected results:
Install the OLM successfully, and no error.

Additional info:
The OLM did was installed even if get the above error.
mac:operator-sdk jianzhang$ oc get catalogsource -n olm
NAME                    DISPLAY               TYPE   PUBLISHER        AGE
operatorhubio-catalog   Community Operators   grpc   OperatorHub.io   6m28s
mac:operator-sdk jianzhang$ oc get pod -n olm
NAME                                READY   STATUS    RESTARTS   AGE
catalog-operator-54bbdffc6b-v92ph   1/1     Running   0          6m47s
olm-operator-6bfbd74fb8-66x6s       1/1     Running   0          6m47s
operatorhubio-catalog-842mt         1/1     Running   0          6m24s
packageserver-ccdd6dcd8-dnq4c       1/1     Running   0          6m28s
packageserver-ccdd6dcd8-z8d62       1/1     Running   0          6m28s
 
mac:operator-sdk jianzhang$ oc get packagemanifest
NAME                                       CATALOG               AGE
hazelcast-jet-operator                     Community Operators   7m9s
prometheus-exporter-operator               Community Operators   7m9s
instana-agent                              Community Operators   7m9s
planetscale                                Community Operators   7m9s
kubestone                                  Community Operators   7m9s
jaeger                                     Community Operators   7m9s
noobaa-operator                            Community Operators   7m9s
prisma-cloud-compute-console-operator      Community Operators   7m9s
hazelcast-jet-enterprise-operator          Community Operators   7m9s
postgres-operator                          Community Operators   7m9s
wildfly                                    Community Operators   7m9s
tidb-ope
...

Comment 1 Jian Zhang 2020-09-17 11:06:13 UTC
Submit a fixed PR: https://github.com/operator-framework/operator-sdk/pull/3897

Comment 3 Jesus M. Rodriguez 2021-01-04 18:09:39 UTC
Closing won't fix. The olm install command has a --timeout flag that can be used in these situations.

$ operator-sdk olm install --help
Install Operator Lifecycle Manager in your cluster

Usage:
  operator-sdk olm install [flags]

Flags:
  -h, --help               help for install
      --timeout duration   time to wait for the command to complete before failing (default 2m0s)
      --version string     version of OLM resources to install (default "latest")

Global Flags:
      --verbose   Enable verbose logging


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