Bug 2082763 - Cluster install stuck on the applying for operatorhub "cluster"
Summary: Cluster install stuck on the applying for operatorhub "cluster"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.11
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.11.0
Assignee: Per da Silva
QA Contact: Jian Zhang
URL:
Whiteboard:
: 2073288 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-07 05:02 UTC by Yang Yang
Modified: 2022-08-10 11:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:10:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-config-operator pull 245 0 None open Bug 2082763: Drop the OperatorHub CR instance 2022-05-08 05:36:40 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:10:59 UTC

Description Yang Yang 2022-05-07 05:02:24 UTC
Description of problem:

Cluster install failed with marketplace disabled.

Cap set in the install-config:
...
capabilities:
  baselineCapabilitySet: None
  additionalEnabledCapabilities:
  - openshift-samples

CVO log:
...
E0507 03:03:55.594556       1 task.go:112] error running apply for operatorhub "cluster" (31 of 884): failed to get resource type: no matches for kind "OperatorHub" in version "config.openshift.io/v1"
E0507 03:03:59.559372       1 task.go:112] error running apply for operatorhub "cluster" (31 of 884): failed to get resource type: no matches for kind "OperatorHub" in version "config.openshift.io/v1"
I0507 03:04:02.351746       1 task_graph.go:546] Result of work: [Could not update operatorhub "cluster" (31 of 884): the server does not recognize this resource, check extension API servers]
I0507 03:04:02.351779       1 sync_worker.go:1098] Update error 31 of 884: UpdatePayloadResourceTypeMissing Could not update operatorhub "cluster" (31 of 884): the server does not recognize this resource, check extension API servers (*errors.withStack: failed to get resource type: no matches for kind "OperatorHub" in version "config.openshift.io/v1")
E0507 03:04:02.351835       1 sync_worker.go:586] unable to synchronize image (waiting 2m33.733884988s): Could not update operatorhub "cluster" (31 of 884): the server does not recognize this resource, check extension API servers
I0507 03:06:45.082254       1 sync_worker.go:926] Running sync for customresourcedefinition "operatorhubs.config.openshift.io" (15 of 884)
I0507 03:06:45.082278       1 sync_worker.go:934] Skipping precreation of customresourcedefinition "operatorhubs.config.openshift.io" (15 of 884): disabled capabilities: marketplace
I0507 03:06:45.082300       1 sync_worker.go:926] Running sync for operatorhub "cluster" (16 of 884)
I0507 03:06:45.082313       1 sync_worker.go:934] Skipping precreation of operatorhub "cluster" (16 of 884): disabled capabilities: marketplace
I0507 03:06:45.109535       1 sync_worker.go:926] Running sync for clusterrole "operatorhub-config-reader" (703 of 884)
I0507 03:06:45.109546       1 sync_worker.go:934] Skipping precreation of clusterrole "operatorhub-config-reader" (703 of 884): disabled capabilities: marketplace
I0507 03:06:57.480301       1 sync_worker.go:926] Running sync for operatorhub "cluster" (31 of 884)
E0507 03:07:01.405524       1 task.go:112] error running apply for operatorhub "cluster" (31 of 884): failed to get resource type: no matches for kind "OperatorHub" in version "config.openshift.io/v1"
...

Get the OperatorHub/cluster resource:

# oc adm release extract --to manifests

# grep -r10 OperatorHub manifests/ | grep "name: cluster"
manifests/0000_05_config-operator_02_operatorhub.cr.yaml-  name: cluster
manifests/0000_03_marketplace-operator_02_operatorhub.cr.yaml-  name: cluster

# cat manifests/0000_05_config-operator_02_operatorhub.cr.yaml
apiVersion: config.openshift.io/v1
kind: OperatorHub
metadata:
  name: cluster
  annotations:
    include.release.openshift.io/ibm-cloud-managed: "true"
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
    release.openshift.io/create-only: "true"
spec: {}

# cat manifests/0000_03_marketplace-operator_02_operatorhub.cr.yaml
# This name of this file must appear after that of the file containing the OperatorHub CRD when ordered lexicographically.
# The OperatorHub CRD file is sourced from the following vendor directory: ./vendor/github.com/openshift/api/config/v1
apiVersion: config.openshift.io/v1
kind: OperatorHub
metadata:
  name: cluster
  annotations:
    include.release.openshift.io/ibm-cloud-managed: "true"
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
    release.openshift.io/create-only: "true"
    capability.openshift.io/name: "marketplace"
spec: {}

Hmm, seems like OLM makes OperatorHub optional while config-operator still requires it.

Version-Release number of the following components:
4.11.0-0.nightly-2022-05-06-180112

How reproducible:
Always

Steps to Reproduce:
1. Install a cluster with marketplace disabled
2.
3.

Actual results:
Install failed due to error running apply for operatorhub "cluster"

Expected results:
Install passed

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 2 W. Trevor King 2022-05-08 05:36:00 UTC
$ oc adm release info --commits registry.ci.openshift.org/ocp/release:4.11.0-0.nightly-2022-05-06-180112 | grep 'marketplace\|cluster-config'
  cluster-config-operator                        https://github.com/openshift/cluster-config-operator                        2b71e950adb3c6d59c84ab1d5f75725dc85f0618
  operator-marketplace                           https://github.com/operator-framework/operator-marketplace                  12a51a2a8d34e870ceeded4da791096b0b7f478e

Still needs [1] to land?

[1]: https://github.com/openshift/cluster-config-operator/pull/245

Comment 3 W. Trevor King 2022-05-08 05:48:22 UTC
*** Bug 2073288 has been marked as a duplicate of this bug. ***

Comment 7 Jian Zhang 2022-05-14 01:55:09 UTC
Change it to VERIFIED based on comment 5.

Comment 9 errata-xmlrpc 2022-08-10 11:10:43 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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/RHSA-2022:5069


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