Bug 1986932

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: akanekar, anbhatta, andbartl, ankithom, bluddy, bparees, jiazha, jlanford, kliberti, krizza, mnunes, mokumar, nhale, skrenger, tflannag
Version: 4.7Keywords: Triaged
Target Milestone: ---   
Target Release: 4.7.z   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1986476 Environment:
Last Closed: 2021-11-17 21:27:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1986476    
Bug Blocks:    

Comment 9 Jian Zhang 2021-10-27 07:43:08 UTC
[cloud-user@preserve-olm-env jian]$ oc adm release info  registry.ci.openshift.org/ocp/release:4.7.0-0.nightly-2021-10-27-045831 --commits|grep lifecycle
  operator-lifecycle-manager                     https://github.com/operator-framework/operator-lifecycle-manager            6bc6b9cf9c6357b94eee8ceb057260bb0b4a3fd7

1.  Install an OCP4.7 that contains this fixed PR.
[cloud-user@preserve-olm-env jian]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2021-10-27-045831   True        False         6m24s   Cluster version is 4.7.0-0.nightly-2021-10-27-045831

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
metadata:
  name: bug-operators
  namespace: openshift-marketplace
spec:
  displayName: Bug Operators
  image: quay.io/olmqe/index:bug-1969902
  priority: -100
  publisher: Bug
  sourceType: grpc
  updateStrategy:
    registryPoll:
      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
tman-operator                                        Bug Operators         41s
icp-metal-operator                                   Bug Operators         41s
icp-inventory-operator                               Bug Operators         41s
icp-migration-operator                               Bug Operators         41s
operational-health-operator                          Bug Operators         41s
jesse-operator                                       Bug Operators         41s
icp-gpu-operator                                     Bug Operators         41s
icp-trident-monitoring-operator                      Bug Operators         41s
icp-logforwarder-operator                            Bug Operators         41s
resource-idling-operator                             Bug Operators         41s
icp-eventrouter-operator                             Bug Operators         41s
loop-operator                                        Bug Operators         41s
windmaker-operator                                   Bug Operators         41s
cargoshipper-operator                                Bug Operators         41s
cro-operator                                         Bug Operators         41s
icp-ipam-operator                                    Bug Operators         41s
opp-operator                                         Bug Operators         41s

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
metadata:
  name: icp-inventory-operator
  namespace: default
spec:
  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 og.yaml 
operatorgroup.operators.coreos.com/default-og2 created
[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 sub -n default
NAME                     PACKAGE                  SOURCE          CHANNEL
icp-inventory-operator   icp-inventory-operator   bug-operators   beta
[cloud-user@preserve-olm-env jian]$ oc get ip -n default
NAME            CSV                             APPROVAL   APPROVED
install-pftgs   icp-inventory-operator.v1.1.5   Manual     false

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-779b5868f5-znfr5|grep "found multiple channel heads"
[cloud-user@preserve-olm-env jian]$

Comment 12 errata-xmlrpc 2021-11-17 21:27:56 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.7.37 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.

https://access.redhat.com/errata/RHBA-2021:4572

Comment 15 Red Hat Bugzilla 2023-09-18 00:28:46 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days