Bug 1986476

Summary: OLM fails with 'ResolutionFailed' found more than one head for channel
Product: OpenShift Container Platform Reporter: Joe Lanford <jlanford>
Component: OLMAssignee: Joe Lanford <jlanford>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: anbhatta, andbartl, bluddy, bparees, jiazha, jlanford, kliberti, krizza, mokumar, nhale, skrenger, tflannag
Version: 4.7Keywords: Triaged
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1969902
: 1986932 (view as bug list) Environment:
Last Closed: 2021-09-21 08:02:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1969902    
Bug Blocks: 1986932    

Comment 3 Jian Zhang 2021-09-07 08:13:03 UTC
1, Install a cluster with the fixed PR via cluster-bot.
[cloud-user@preserve-olm-env jian]$ oc  -n openshift-operator-lifecycle-manager exec deployment/catalog-operator -- olm --version
OLM version: 0.17.0
git commit: df6f2edd8983b55686b1f8b0a91aca8e4f869176

[cloud-user@preserve-olm-env jian]$ oc get clusterversion
NAME      VERSION                                                  AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.ci.test-2021-09-07-053814-ci-ln-it6zbgb-latest   True        False         74m     Cluster version is 4.8.0-0.ci.test-2021-09-07-053814-ci-ln-it6zbgb-latest

2, Create a CatalogSource object that consumes the index image that contains the issued operator.
[cloud-user@preserve-olm-env jian]$ cat cs-bug.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
  name: bug-operators
  namespace: openshift-marketplace
  displayName: Bug Operators
  image: quay.io/olmqe/index:bug-1969902
  priority: -100
  publisher: Bug
  sourceType: grpc
      interval: 10m0s
[cloud-user@preserve-olm-env jian]$ oc create -f cs-bug.yaml 
catalogsource.operators.coreos.com/bug-operators created

[cloud-user@preserve-olm-env jian]$ oc get packagemanifests|grep Bug
operational-health-operator                          Bug Operators         73s
icp-inventory-operator                               Bug Operators         73s
icp-gpu-operator                                     Bug Operators         73s

3, Install the icp-inventory-operator v1.1.5 version.
[cloud-user@preserve-olm-env jian]$ cat bug/sub-bug.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
  name: icp-inventory-operator
  namespace: default
  channel: beta
  installPlanApproval: Manual
  name: icp-inventory-operator
  source: bug-operators
  sourceNamespace: openshift-marketplace
  startingCSV: icp-inventory-operator.v1.1.5
[cloud-user@preserve-olm-env jian]$ oc create -f bug/sub-bug.yaml
subscription.operators.coreos.com/icp-inventory-operator created

4, Approve the InstallPlan
[cloud-user@preserve-olm-env jian]$ oc get ip -n default
NAME            CSV                             APPROVAL   APPROVED
install-q2sws   icp-inventory-operator.v1.1.5   Manual     true

5, Upgrade it to the 1.1.14 version and check the OLM logs. No issue found, LGTM, verify it.
[cloud-user@preserve-olm-env jian]$ oc logs catalog-operator-6774c799bc-2wgff -n openshift-operator-lifecycle-manager|grep "found multiple channel heads"

Comment 7 errata-xmlrpc 2021-09-21 08:02:08 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 (OpenShift Container Platform 4.8.12 bug fix 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.