Bug 1761887

Summary: Cluster upgrade fails due to UpdatingPrometheusOperatorFailed problem
Product: OpenShift Container Platform Reporter: Frederic Branczyk <fbranczy>
Component: MonitoringAssignee: Frederic Branczyk <fbranczy>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.0CC: alegrand, anpicker, erooth, kakkoyun, lcosic, mloibl, pkrupa, surbania
Target Milestone: ---   
Target Release: 4.2.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-13 18:55:51 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: 1761721    
Bug Blocks:    

Description Frederic Branczyk 2019-10-15 13:56:55 UTC
This bug was initially created as a copy of Bug #1761721

I am copying this bug because: 



Description of problem:
Upgrading 4.1 cluster to 4.2 fails as it cannot reconcile Prometheus Operator Deployment due to invalid value in spec.selector field:

```
Oct 14 18:32:25.357 E clusteroperator/monitoring changed Degraded to True: UpdatingPrometheusOperatorFailed: Failed to rollout the stack. Error: running task Updating Prometheus Operator failed: reconciling Prometheus Operator Deployment failed: updating deployment object failed: Deployment.apps "prometheus-operator" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/component":"controller", "app.kubernetes.io/name":"prometheus-operator"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
```

More in:
https://ci-search-ci-search-next.svc.ci.openshift.org/?search=reconciling+Prometheus+Operator+Deployment+failed&maxAge=336h&context=2&type=all
https://ci-search-ci-search-next.svc.ci.openshift.org/?search=field+is+immutable&maxAge=336h&context=2&type=all


Version-Release number of selected component (if applicable):
4.2


How reproducible:
Upgrade cluster from 4.1 to 4.2

Steps to Reproduce:
1. Create a 4.1 cluster
2. Do the upgrade

Actual results:
Cluster is not upgraded due to problems with CMO

Expected results:
Cluster is upgraded or CMO is not degraded.


Additional info:

Comment 8 errata-xmlrpc 2019-11-13 18:55:51 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, 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-2019:3303