Description of problem:
As per the following document, we should be able to install specific z-version by setting startingCSV and setting installPlanApproval to Manual in subscription resources:
- https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/operators/administrator-tasks#olm-installing-operator-from-operatorhub-using-cli_olm-adding-operators-to-a-cluster
If you want to subscribe to a specific version of an Operator, set the startingCSV field to the desired version and set the installPlanApproval field to Manual to prevent the Operator from automatically upgrading if a later version exists in the catalog. For details, see the following "Example Subscription object with a specific starting Operator version".
However, this doesn't work in OCP/ODF 4.18.
When I installed ODF 4.18.5, it was automatically updated to 4.18.6.
The same behavior was observed on a customer's environment, not only my lab.
The issue issue also occurs when I install ODF on GUI, not only when installing it on CLI.
[quickcluster@upi-0 ~]$ cat << END | oc create -f - apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: generateName: openshift-storage- namespace: openshift-storage spec: targetNamespaces: - openshift-storage END [quickcluster@upi-0 ~]$ cat <<END | oc create -f - apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: odf-operator namespace: openshift-storage spec: channel: stable-4.18 installPlanApproval: Manual name: odf-operator source: redhat-operators sourceNamespace: openshift-marketplace startingCSV: odf-operator.v4.18.5-rhodf END [quickcluster@upi-0 ~]$ oc patch installplan install-sxmfz --type merge --patch '{"spec":{"approved":true}}' ==> Install 4.18.5 [quickcluster@upi-0 ~]$ oc get subscription NAME PACKAGE SOURCE CHANNEL cephcsi-operator-stable-4.18-redhat-operators-openshift-marketplace cephcsi-operator redhat-operators stable-4.18 mcg-operator-stable-4.18-redhat-operators-openshift-marketplace mcg-operator redhat-operators stable-4.18 ocs-client-operator-stable-4.18-redhat-operators-openshift-marketplace ocs-client-operator redhat-operators stable-4.18 ocs-operator-stable-4.18-redhat-operators-openshift-marketplace ocs-operator redhat-operators stable-4.18 odf-csi-addons-operator-stable-4.18-redhat-operators-openshift-marketplace odf-csi-addons-operator redhat-operators stable-4.18 odf-dependencies odf-dependencies redhat-operators stable-4.18 odf-operator odf-operator redhat-operators stable-4.18 odf-prometheus-operator-stable-4.18-redhat-operators-openshift-marketplace odf-prometheus-operator redhat-operators stable-4.18 recipe-stable-4.18-redhat-operators-openshift-marketplace recipe redhat-operators stable-4.18 rook-ceph-operator-stable-4.18-redhat-operators-openshift-marketplace rook-ceph-operator redhat-operators stable-4.18 [quickcluster@upi-0 ~]$ oc get installplan NAME CSV APPROVAL APPROVED install-728kh odf-prometheus-operator.v4.18.5-rhodf Manual true install-8lkrt odf-operator.v4.18.6-rhodf Manual false install-9d4ln ocs-operator.v4.18.6-rhodf Manual true install-sxmfz odf-operator.v4.18.5-rhodf Manual true [quickcluster@upi-0 ~]$ oc get csv NAME DISPLAY VERSION REPLACES PHASE cephcsi-operator.v4.18.6-rhodf CephCSI operator 4.18.6-rhodf cephcsi-operator.v4.18.5-rhodf Succeeded mcg-operator.v4.18.6-rhodf NooBaa Operator 4.18.6-rhodf mcg-operator.v4.18.5-rhodf Succeeded ocs-client-operator.v4.18.5-rhodf OpenShift Data Foundation Client 4.18.5-rhodf ocs-client-operator.v4.18.4-rhodf Failed ocs-client-operator.v4.18.6-rhodf OpenShift Data Foundation Client 4.18.6-rhodf ocs-client-operator.v4.18.5-rhodf Pending ocs-operator.v4.18.6-rhodf OpenShift Container Storage 4.18.6-rhodf ocs-operator.v4.18.5-rhodf Succeeded odf-csi-addons-operator.v4.18.6-rhodf CSI Addons 4.18.6-rhodf odf-csi-addons-operator.v4.18.5-rhodf Succeeded odf-dependencies.v4.18.6-rhodf Data Foundation Dependencies 4.18.6-rhodf odf-dependencies.v4.18.5-rhodf Succeeded odf-operator.v4.18.6-rhodf OpenShift Data Foundation 4.18.6-rhodf odf-operator.v4.18.5-rhodf Succeeded odf-prometheus-operator.v4.18.6-rhodf Prometheus Operator 4.18.6-rhodf odf-prometheus-operator.v4.18.5-rhodf Succeeded recipe.v4.18.6-rhodf Recipe 4.18.6-rhodf recipe.v4.18.5-rhodf Succeeded rook-ceph-operator.v4.18.6-rhodf Rook-Ceph 4.18.6-rhodf rook-ceph-operator.v4.18.5-rhodf Succeeded ===> Initially, 4.18.5 was installed, but it was updated to 4.18.6 immediately. ===> Please ignore that ocs-client-operator.v4.18.5-rhodf is marked as Failed. It's not relevant to this reported issue. I suppose my lab has some problems.
This issue doesn't occur on OCP/ODF 4.14.
[quickcluster@upi-0 ~]$ cat << END | oc create -f - apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: generateName: openshift-storage- namespace: openshift-storage spec: targetNamespaces: - openshift-storage END [quickcluster@upi-0 ~]$ cat <<END | oc create -f - apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: odf-operator namespace: openshift-storage spec: channel: stable-4.14 installPlanApproval: Manual name: odf-operator source: redhat-operators sourceNamespace: openshift-marketplace startingCSV: odf-operator.v4.14.18-rhodf END [quickcluster@upi-0 ~]$ oc patch installplan install-6ccpq --type merge --patch '{"spec":{"approved":true}}' ===> install 4.14.18 [quickcluster@upi-0 ~]$ oc get subscription NAME PACKAGE SOURCE CHANNEL mcg-operator-stable-4.14-redhat-operators-openshift-marketplace mcg-operator redhat-operators stable-4.14 ocs-operator-stable-4.14-redhat-operators-openshift-marketplace ocs-operator redhat-operators stable-4.14 odf-csi-addons-operator-stable-4.14-redhat-operators-openshift-marketplace odf-csi-addons-operator redhat-operators stable-4.14 odf-operator odf-operator redhat-operators stable-4.14 [quickcluster@upi-0 ~]$ oc get installplan NAME CSV APPROVAL APPROVED install-6ccpq mcg-operator.v4.14.18-rhodf Manual true install-wcqtv odf-operator.v4.14.19-rhodf Manual false [quickcluster@upi-0 ~]$ oc get csv NAME DISPLAY VERSION REPLACES PHASE mcg-operator.v4.14.18-rhodf NooBaa Operator 4.14.18-rhodf mcg-operator.v4.14.17-rhodf Succeeded ocs-operator.v4.14.18-rhodf OpenShift Container Storage 4.14.18-rhodf ocs-operator.v4.14.17-rhodf Succeeded odf-csi-addons-operator.v4.14.18-rhodf CSI Addons 4.14.18-rhodf odf-csi-addons-operator.v4.14.17-rhodf Succeeded odf-operator.v4.14.18-rhodf OpenShift Data Foundation 4.14.18-rhodf odf-operator.v4.14.17-rhodf Succeeded ===> 4.14.18 was installed ===> It was not updated to 4.14.19 automatically.
I'm wondering if it's a new bug on ODF 4.18 or some new versions.
At least, we need a workaround to install a specific old ODF z-version.
Version-Release number of selected component (if applicable):
OCP 4.18, ODF 4.18
How reproducible:
Try installing a specific old ODF z-version
Steps to Reproduce:
Please take a look at the above logs
Actual results:
Even if we try installing a specific old ODF z-version such as ODF 4.18.5, it is automatically and immediately updated to the latest z-version even though we don't approve the installplan of the latest z-version
Expected results:
A specific old ODF z-version can be installed
Additional info:
This issue was originally reported as the following ODF bug: https://issues.redhat.com/browse/DFBUGS-3657 I'm opening this new OLM bug ticket as per the discussion of the above ticket.
- links to