-
Bug
-
Resolution: Done
-
Normal
-
None
-
4.18
-
None
-
Quality / Stability / Reliability
-
False
-
-
2
-
Important
-
None
-
None
-
None
-
Rejected
-
OSDOCS Sprint 262, OSDOCS Sprint 263, OSDOCS Sprint 264, OSDOCS Sprint 265
-
4
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
The upgradable status of co olm is incorrect. clusterextension is installed with olm.maxOpenShiftVersion is 4.18, and cluster is 4.18.0-0.nightly-2024-10-08-075347, the Upgradeable status of co olm is False, it should be True
Version-Release number of selected component (if applicable):
4.18.0-0.nightly-2024-10-08-075347
How reproducible:
always
Steps to Reproduce:
1. create clustercatalog ns sa clusterextension
xzha@xzha1-mac OCP-76668 % cat catalog.yaml
apiVersion: olm.operatorframework.io/v1alpha1
kind: ClusterCatalog
metadata:
name: catalog-76668
labels:
example.com/support: "true"
test-cases: ocp-76668
spec:
priority: 1000
source:
type: Image
image:
ref: quay.io/olmqe/olmtest-operator-index:nginx76668
xzha@xzha1-mac OCP-76668 % cat sa.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: "test-76668-installer-admin-clusterrole"
rules:
- apiGroups:
- "*"
resources:
- "*"
verbs:
- "*"
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: "test-76668"
namespace: "ns-76668"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: "test-76668-installer-admin-clusterrole-binding"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: "test-76668-installer-admin-clusterrole"
subjects:
- kind: ServiceAccount
name: "test-76668"
namespace: "ns-76668"
xzha@xzha1-mac OCP-76668 % cat extension.yaml
apiVersion: olm.operatorframework.io/v1alpha1
kind: ClusterExtension
metadata:
name: "extension-76668"
spec:
install:
namespace: "ns-76668"
serviceAccount:
name: "test-76668"
source:
sourceType: "Catalog"
catalog:
packageName: "nginx76668"
version: "1.0.1"
selector:
matchLabels:
"test-cases": "ocp-76668"
upgradeConstraintPolicy: "CatalogProvided"
2. nginx76668.v1.0.1, olm.maxOpenShiftVersion is 4.17,
check co olm
- lastTransitionTime: "2024-10-09T06:42:57Z"
message: 'InstalledOLMOperatorsUpgradeable: Found ClusterExtensions that require
upgrades prior to upgrading cluster to version 4.19: bundle "nginx76668.v1.0.1"
for ClusterExtension "extension-76668".'
reason: InstalledOLMOperators_IncompatibleOperatorsInstalled
status: "False"
type: Upgradeable
the status is correct.
3. upgrade clusterextension to nginx76668.v2.0.0, olm.maxOpenShiftVersion is 4.18
check co olm status
- lastTransitionTime: "2024-10-09T06:42:57Z"
message: 'InstalledOLMOperatorsUpgradeable: Found ClusterExtensions that require
upgrades prior to upgrading cluster to version 4.19: bundle "nginx76668.v2.0.0"
for ClusterExtension "extension-76668".'
reason: InstalledOLMOperators_IncompatibleOperatorsInstalled
status: "False"
type: Upgradeable
4.18.0-0.nightly-2024-10-08-075347 < 4.18, the Upgradeable should be True
4, upgrade clusterextension to be nginx76668.v3.0.0, olm.maxOpenShiftVersion is 4.19
- lastTransitionTime: "2024-10-09T06:48:32Z"
message: All is well
reason: AsExpected
status: "True"
type: Upgradeable
The status is correct.
Actual results:
Install clusterextension nginx76668.v2.0.0, olm.maxOpenShiftVersion is 4.18, the Upgradeable is False
Expected results:
Install clusterextension nginx76668.v2.0.0, olm.maxOpenShiftVersion is 4.18, the Upgradeable is True
Additional info:
I test it on using olmv0, install csv nginx76668.v2.0.0, the Upgradeable status of co operator-lifecycle-manager is True.
xzha@xzha1-mac v0 % oc get co operator-lifecycle-manager -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
annotations:
capability.openshift.io/name: OperatorLifecycleManager
include.release.openshift.io/hypershift: "true"
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
creationTimestamp: "2024-10-08T23:35:06Z"
generation: 1
name: operator-lifecycle-manager
ownerReferences:
- apiVersion: config.openshift.io/v1
controller: true
kind: ClusterVersion
name: version
uid: ba372a96-77a8-493f-ba74-688e63773191
resourceVersion: "135825"
uid: 57a2c759-fb0f-4dbc-9423-f53de5cd48a1
spec: {}
status:
conditions:
- lastTransitionTime: "2024-10-08T23:38:57Z"
message: Deployed 4.18.0-202410011141.p0.gfbd0078.assembly.stream.el9-fbd0078
status: "False"
type: Progressing
- lastTransitionTime: "2024-10-08T23:38:57Z"
status: "True"
type: Available
- lastTransitionTime: "2024-10-08T23:38:57Z"
status: "False"
type: Degraded
- lastTransitionTime: "2024-10-09T03:18:33Z"
status: "True"
type: Upgradeable
extension: null