-
Bug
-
Resolution: Obsolete
-
Normal
-
None
-
4.8
-
Quality / Stability / Reliability
-
None
-
None
-
None
-
Moderate
-
None
-
Unspecified
-
None
-
None
-
Rejected
-
None
-
None
-
If docs needed, set a value
-
None
-
None
-
None
-
None
-
None
Description of problem:
When operator is installed with manual approval, OLM can generate multiple installplans over time with two or more new versions. Upon approval - upgrade will fail with 'Conflicting CRD owner' error.
Additional information (not sure if relevant) - operators (with cluster scope) are installed along with several other operators in the same namespace.
Version-Release number of selected component (if applicable):
OCP v.4.8.35
How reproducible:
Multilpe clusters and multiple operators exhibit this behavior.
E.g.:
kiali-ossm
servicemeshoperator
serverless-operator
Steps to Reproduce:
1. Install operator with manual approval (e.g. servicemesh.v2.1.2-1)
2. Wait for OLM to detect two new versions for an operator (e.g. servicemesh.v2.1.3-0 and servicemesh.v2.2.0-0)
3. Approve installplans for new servicemesh versions
Actual results:
CSV's with new servicemesh versions will report 'Conflicting CRD owner error'
Expected results:
CSV's (or just most recent CSV) are installed successfully
Additional info:
It seems that issue is caused by spec.replaces field which will be set to the following values for both pending CSV's:
servicemeshoperator.v2.1.3 – replaces servicemeshoperator.v2.1.2.1
servicemeshoperator.v2.2.0 – replaces servicemeshoperator.v2.1.2.1
OLM operator logic processes servicemeshoperator.v2.2.0 CSV - finds that it replaces servicemeshoperator.v2.1.2.1 and also finds that there is servicemeshoperator.v2.1.3 which is listed as CRD owner as well - then it will report ErrCRDOwnerConflict
The error I believe is raised by the following code in OLM:
https://github.com/operator-framework/operator-lifecycle-manager/blob/e08415d1228d095d0238dcf7264d3b70464e805b/pkg/controller/operators/olm/operator.go#L2409