Bug 1978561 - MigMigration CR with "spec.verify=true" fails with apiVersion error
Summary: MigMigration CR with "spec.verify=true" fails with apiVersion error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: General
Version: 1.5.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 1.5.0
Assignee: John Matthews
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-02 07:52 UTC by Sergio
Modified: 2021-07-28 04:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-28 04:08:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-controller pull 1144 0 None open Bug 1978561: fix pod manager bug for verify, wrap errors 2021-07-02 13:21:38 UTC
Github konveyor mig-controller pull 1145 0 None open Bug 1978561: fix pod manager bug for verify, wrap errors 2021-07-02 13:22:03 UTC
Red Hat Product Errata RHEA-2021:2929 0 None None None 2021-07-28 04:08:28 UTC

Description Sergio 2021-07-02 07:52:51 UTC
Description of problem:
When we execute a migration setting `verify: true` in the migmigration resource the migration fails.

Version-Release number of selected component (if applicable):
MTC 1.5.0

How reproducible:
Always

Steps to Reproduce:
1. Create an empty namespace

2. Create a migration plan to migrate this empty namespace. Use this name for the plan "empty-validate"

3. Create the migmigratoin resource using the CLI instead of the UI in order to add the `verify: true` attribute:

apiVersion: migration.openshift.io/v1alpha1
kind: MigMigration
metadata:
  labels:
    migration.openshift.io/migplan-name: empty-validate
  name: migration-1
  namespace: openshift-migration
spec:
  migPlanRef:
    name: empty-validate
    namespace: openshift-migration
  stage: false
  verify: true



Actual results:
The migration fails and we can see this error in the migmigration resource
oc get migmigration -o yaml migration-1
....
status:
  conditions:
  - category: Advisory
    durable: true
    lastTransitionTime: "2021-07-01T15:19:57Z"
    message: 'The migration has failed.  See: Errors.'
    reason: Verification
    status: "True"
    type: Failed
  errors:
  - Object 'apiVersion' is missing in 'unstructured object has no version'
  itinerary: Failed


Expected results:
The migration should have been executed without problems and the empty namespace should have been migrated to the destination cluster

Additional info:

Comment 4 whu 2021-07-07 09:37:17 UTC
Have verified in MTC 1.5.0 build
image: registry.stage.redhat.io/rhmtc/openshift-migration-rhel7-operator@sha256:76298d198e3a862df18d56495978bb90ab134546c32e717038d6d50e699404e7


$ oc get migmigration migration-1 -o yaml
apiVersion: migration.openshift.io/v1alpha1
kind: MigMigration
metadata:
 ......
  name: migration-1
  namespace: openshift-migration
spec:
  migPlanRef:
    name: empty-validate
    namespace: openshift-migration
  stage: false
  verify: true
status:
  conditions:
  - category: Advisory
    durable: true
    lastTransitionTime: "2021-07-07T09:28:56Z"
    message: The migration has completed successfully.
    reason: Completed
    status: "True"
    type: Succeeded
  itinerary: Final
  observedDigest: 5cf0669eaf54a4c5392509595bd2efbf0031314c1863b26c4fee75e7bb843b4d
  phase: Completed
  pipeline:
  - completed: "2021-07-07T09:28:36Z"
    message: Completed
    name: Prepare
    started: "2021-07-07T09:28:31Z"
  - completed: "2021-07-07T09:28:40Z"
    message: Completed
    name: Backup
    progress:
    - 'Backup openshift-migration/migration-1-initial-6p6r7: 19 out of estimated total of 19 objects backed up (3s)'
    started: "2021-07-07T09:28:36Z"
  - completed: "2021-07-07T09:28:40Z"
    message: Completed
    name: DirectImage
    progress:
    - 0 total ImageStreams; 0 running; 0 successful; 0 failed
    started: "2021-07-07T09:28:40Z"
  - completed: "2021-07-07T09:28:56Z"
    message: Completed
    name: Restore
    progress:
    - 'Restore openshift-migration/migration-1-final-54gg4: Completed'
    started: "2021-07-07T09:28:40Z"
  - completed: "2021-07-07T09:28:56Z"
    message: Completed
    name: Cleanup
    started: "2021-07-07T09:28:56Z"
  startTimestamp: "2021-07-07T09:28:31Z"

Comment 10 errata-xmlrpc 2021-07-28 04:08:21 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 (Migration Toolkit for Containers (MTC) image release advisory 1.5.0), 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/RHEA-2021:2929


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