Bug 1937295
| Summary: | Upgrade from 1.3.2 to 1.4.2 fails because existing CRs are incompatible with new CRD schema | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Migration Toolkit for Containers | Reporter: | Xin jiang <xjiang> | ||||
| Component: | Operator | Assignee: | Pranav Gaikwad <pgaikwad> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Xin jiang <xjiang> | ||||
| Severity: | urgent | Docs Contact: | Avital Pinnick <apinnick> | ||||
| Priority: | unspecified | ||||||
| Version: | 1.4.2 | CC: | ernelson, jiazha, rjohnson, sregidor, whu, xjiang | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 1.4.2 | ||||||
| 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: | 2021-03-15 08:15:38 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
I guess the root cause is here, the new CRD schema doesn’t compatible with the existing old CR, hence leads the "constraints not satisfiable" when upgrading.
E0310 03:57:57.503921 1 queueinformer_operator.go:290] sync {"update" "openshift-migration/install-8x4cf"} failed: error transitionin g InstallPlan: error validating existing CRs against new CRD's schema: migplans.migration.openshift.io: error validating custom resource ag ainst new schema &apiextensions.CustomResourceValidation{OpenAPIV3Schema:(*apiextensions.JSONSchemaProps)(0xc001ba5400)}: [].spec.persisten tVolumes.capacityConfirmed: Required value and error updating InstallPlan status: error updating InstallPlan status: Operation cannot be fu lfilled on installplans.operators.coreos.com "install-8x4cf": the object has been modified; please apply your changes to the latest version and try again
The "constraints not satisfiable" indicate two operators may provide the same GVK or Package in a namespace.
I found some message from the csv of new version
status:
conditions:
- lastTransitionTime: "2021-03-10T03:57:56Z"
lastUpdateTime: "2021-03-10T03:57:56Z"
message: requirements not yet checked
phase: Pending
reason: RequirementsUnknown
- lastTransitionTime: "2021-03-10T03:57:56Z"
lastUpdateTime: "2021-03-10T03:57:56Z"
message: one or more requirements couldn't be found
phase: Pending
reason: RequirementsNotMet
lastTransitionTime: "2021-03-10T03:57:56Z"
requirementStatus:
.....
- group: apiextensions.k8s.io
kind: CustomResourceDefinition
message: CRD is not present
name: directimagestreammigrations.migration.openshift.io
status: NotPresent
version: v1
- group: apiextensions.k8s.io
kind: CustomResourceDefinition
message: CRD is not present
name: directvolumemigrationprogresses.migration.openshift.io
status: NotPresent
version: v1
It seems a problem in the CRDs, we can find this in the installplan
Status:
Catalog Sources:
quay-applications
Conditions:
Last Transition Time: 2021-03-10T10:06:27Z
Last Update Time: 2021-03-10T10:06:27Z
Message: error validating existing CRs agains new CRD's schema: migplans.migration.openshift.io: error validating custom resource against new schema &apiextensions.CustomResourceValidation{OpenAPIV3Schema:(*apiextensions.JSONSchemaProps)(0xc00474a000)}: [].spec.persistentVolumes.capacityConfirmed: Required value
In order to reproduce the issue we need to create a migplan with PVC before the upgrade. *** Bug 1937291 has been marked as a duplicate of this bug. *** *** Bug 1937290 has been marked as a duplicate of this bug. *** Cherry-picked into release 1.4.2 branches here: https://github.com/konveyor/mig-controller/pull/995 https://github.com/konveyor/mig-operator/pull/609 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 (Migration Toolkit for Containers (MTC) image release advisory 1.4.2), 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:0814 |
Created attachment 1762247 [details] upgrade Description of problem: I installed MTC 1.3.2 on OCP4.8 by selecting channel "release-v1.3". When MTC 1.3.2 is ready on cluster, and then selecting channel "release-v1.4", waiting for it to upgrade to 1.4.2.But it was stuck there. The new operator is showing "Pending". The old version is showing "Canot update, Catalog Source was removed". see the screen. Version-Release number of selected component (if applicable): MTC 1.4.2 stage How reproducible: Always Steps to Reproduce: 1. installed MTC 1.3.2 on OCP4.8 by selecting channel "release-v1.3". 2. Create MigController instance 3. Selecting channel "release-v1.4" wand waiting for upgrade to 1.4.2 Actual results: The upgrade is stuck. The new operator is showing "Pending". The old version is showing "Canot update, Catalog Source was removed". see the screen. Expected results: The upgrade should be complete automatically Additional info: