Skip to content

olm install fails in some clusters #6489

@nunnatsa

Description

@nunnatsa

Bug Report

In my cluster, kubevirtci cluster, I'm trying to install olm using operator-sdk install and it constantly fails. The CRDs are not ready on time when creating the OLM resources.

What did you do?

kubevirtci is a cluster for kubevirt testing.

I'm trying to deploy an operator on this cluster and as first step, I'm trying to install olm.

What did you expect to see?

olm is installed, as done on a kind cluster, for instance

What did you see instead? Under which circumstances?

$ operator-sdk olm install --verbose
DEBU[0000] Debug logging is set                         
INFO[0000] Fetching CRDs for version "latest"           
INFO[0000] Fetching resources for resolved version "latest" 
INFO[0001] Creating CRDs and resources                  
INFO[0001]   Creating CustomResourceDefinition "catalogsources.operators.coreos.com" 
INFO[0001]   Creating CustomResourceDefinition "clusterserviceversions.operators.coreos.com" 
INFO[0001]   Creating CustomResourceDefinition "installplans.operators.coreos.com" 
INFO[0001]   Creating CustomResourceDefinition "olmconfigs.operators.coreos.com" 
INFO[0001]   Creating CustomResourceDefinition "operatorconditions.operators.coreos.com" 
INFO[0001]   Creating CustomResourceDefinition "operatorgroups.operators.coreos.com" 
INFO[0001]   Creating CustomResourceDefinition "operators.operators.coreos.com" 
INFO[0001]   Creating CustomResourceDefinition "subscriptions.operators.coreos.com" 
INFO[0001]   Creating Namespace "olm"                   
INFO[0001]   Creating Namespace "operators"             
INFO[0001]   Creating ServiceAccount "olm/olm-operator-serviceaccount" 
INFO[0001]   Creating ClusterRole "system:controller:operator-lifecycle-manager" 
INFO[0001]   Creating ClusterRoleBinding "olm-operator-binding-olm" 
INFO[0001]   Creating OLMConfig "cluster"               
FATA[0001] Failed to install OLM version "latest": failed to create CRDs and resources: no matches for kind "OLMConfig" in version "operators.coreos.com/v1" 

Environment

Kubernetes cluster type:
kubevirtci

$ operator-sdk version

v1.30.0

$ kubectl version

v1.27.1

Possible Solution

Check the error code when creating the resource. If it "NoMatch" - retry; PR: #6490

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions