Bug 1979525 - OLM should block the OCP 4.8 upgrade to 4.9 when the operator installed with `olm.openShiftMaxVersion` annotation
Summary: OLM should block the OCP 4.8 upgrade to 4.9 when the operator installed with ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.8.z
Assignee: Nick Hale
QA Contact: Bruno Andrade
URL:
Whiteboard:
Depends On: 1982274
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-06 10:02 UTC by Jian Zhang
Modified: 2021-08-03 06:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1982274 (view as bug list)
Environment:
Last Closed: 2021-08-03 06:09:58 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift operator-framework-olm pull 120 0 None open Bug 1979525: OLM blocks minor OpenShift upgrades when incompatible optional operators are installed 2021-07-15 13:46:05 UTC
Red Hat Product Errata RHBA-2021:2896 0 None None None 2021-08-03 06:10:11 UTC

Comment 8 Bruno Andrade 2021-07-28 21:25:01 UTC
4.8.0-0.nightly-2021-07-28-153234
OLM version: 0.17.0
git commit: e1ceb8eecd87e1ace272b18b2041a191b8e91533

cat cs.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: bug-operators
  namespace: openshift-marketplace
spec:
  displayName: Bug Operators
  image: quay.io/olmqe/deprecated:api
  priority: -100
  publisher: Bug
  sourceType: grpc
  updateStrategy:
    registryPoll:
      interval: 10m0s

oc create -f cs.yaml                                                                                                                                                                                                                  
     catalogsource.operators.coreos.com/bug-operators created

oc create -f og.yaml
     operatorgroup.operators.coreos.com/default-og created

cat sub-deprecatedAPI.yaml 
     apiVersion: operators.coreos.com/v1alpha1
     kind: Subscription
     metadata:
       name: datagrid
       namespace: default
     spec:
       channel: 8.2.x
       installPlanApproval: Automatic
       name: datagrid
       source: bug-operators
       sourceNamespace: openshift-marketplace
       startingCSV: datagrid-operator.v8.2.0

oc get csv -n default
     NAME                       DISPLAY     VERSION   REPLACES                   PHASE
     datagrid-operator.v8.2.0   Data Grid   8.2.0     datagrid-operator.v8.1.7   Succeeded

oc get events --sort-by='.lastTimestamp' | grep -i AppliedWithWarnings                                                                                                                                                                1 ↵
     5m          Warning   AppliedWithWarnings                          installplan/install-qz7mt                              1 warning(s) generated during installation of operator "datagrid-operator.v8.2.0" (CustomResourceDefinition "restores.infinispan.org"): apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
     5m          Warning   AppliedWithWarnings                          installplan/install-qz7mt                              1 warning(s) generated during installation of operator "datagrid-operator.v8.2.0" (CustomResourceDefinition "infinispans.infinispan.org"): apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
     5m          Warning   AppliedWithWarnings                          installplan/install-qz7mt                              1 warning(s) generated during installation of operator "datagrid-operator.v8.2.0" (CustomResourceDefinition "caches.infinispan.org"): apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
     5m          Warning   AppliedWithWarnings                          installplan/install-qz7mt                              1 warning(s) generated during installation of operator "datagrid-operator.v8.2.0" (CustomResourceDefinition "batches.infinispan.org"): apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
     5m          Warning   AppliedWithWarnings                          installplan/install-qz7mt                              1 warning(s) generated during installation of operator "datagrid-operator.v8.2.0" (CustomResourceDefinition "backups.infinispan.org"): apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition

oc get csv -n default datagrid-operator.v8.2.0 -o yaml|grep maxOpenShiftVersion
         operatorframework.io/properties: '{"properties":[{"type":"olm.gvk","value":{"group":"infinispan.org","kind":"Backup","version":"v2alpha1"}},{"type":"olm.gvk","value":{"group":"infinispan.org","kind":"Batch","version":"v2alpha1"}},{"type":"olm.gvk","value":{"group":"infinispan.org","kind":"Cache","version":"v2alpha1"}},{"type":"olm.gvk","value":{"group":"infinispan.org","kind":"Infinispan","version":"v1"}},{"type":"olm.gvk","value":{"group":"infinispan.org","kind":"Restore","version":"v2alpha1"}},{"type":"olm.maxOpenShiftVersion","value":4.8},{"type":"olm.package","value":{"packageName":"datagrid","version":"8.2.0"}}]}'

oc patch clusterversion/version --patch '{"spec":{"upstream":"https://openshift-release.apps.ci.l2s4.p1.openshiftapps.com/graph"}}' --type=merge
         clusterversion.config.openshift.io/version patched

oc patch clusterversion/version --patch '{"spec":{"channel":"nightly-4.9"}}' --type=merge
         clusterversion.config.openshift.io/version patched

User is warned about the compatibility of the deprecated operator. Marking as VERIFIED

oc adm upgrade
        Cluster version is 4.8.0-0.nightly-2021-07-28-153234

        Upgradeable=False

          Reason: IncompatibleOperatorsInstalled
          Message: Cluster operator operator-lifecycle-manager cannot be upgraded between minor versions: The following operators block OpenShift upgrades: Operator datagrid-operator.v8.2.0 in namespace default is not compatible with OpenShift versions greater than 4.8.0

        No updates available. You may force an upgrade to a specific release image, but doing so may not be supported and result in downtime or data loss.

Comment 10 errata-xmlrpc 2021-08-03 06:09:58 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.8.3 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:2896


Note You need to log in before you can comment on or make changes to this bug.