Uploaded image for project: 'OpenShift Migration Toolkit for Containers'
  1. OpenShift Migration Toolkit for Containers
  2. MIG-1594

Migration fails with error: no matches for kind "Virtual machine" in version "kubevirt/v1"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • MTC 1.8.4
    • MTC 1.8.4
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • ToDo

      Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2299668

      Description of problem:
      On performing any migration of an application, all the steps including the backup, Dvm, restore get completed but migration is marked Failed with the error: no matches for kind "Virtual machine" in version "kubevirt/v1"

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

      How reproducible:
      Always

      Steps to Reproduce:
      1. Deployed an application with PVCs, ex- django , in the source cluster
      2. Triggered a cutover migration from the backend (as UI is stuck)

      Actual results:

      Migration fails in UI with error: no matches for kind "Virtual machine" in version "kubevirt/v1"

      Restore is marked as Failed in the UI, while in the cluster it is marked as Completed

      Expected results:
      Migration should be Completed

      Additional info:

      $ oc get restore -n openshift-migration ocp-24730-django-mig-1721793498-final-r8kcb -o yaml
      apiVersion: velero.io/v1
      kind: Restore
      metadata:
      annotations:
      migration.openshift.io/migmigration-type: final
      creationTimestamp: "2024-07-24T04:00:33Z"
      finalizers:

      • restores.velero.io/external-resources-finalizer
        generateName: ocp-24730-django-mig-1721793498-final-
        generation: 8
        labels:
        app.kubernetes.io/part-of: openshift-migration
        migmigration: 765da8bc-5689-4a6d-8d76-4ab0fcdfe7b6
        migration-final-restore: 765da8bc-5689-4a6d-8d76-4ab0fcdfe7b6
        migration.openshift.io/migmigration-name: ocp-24730-django-mig-1721793498
        migration.openshift.io/migplan-name: ocp-24730-django-migplan-1721793498
        migration.openshift.io/migrated-by-migmigration: 765da8bc-5689-4a6d-8d76-4ab0fcdfe7b6
        migration.openshift.io/migrated-by-migplan: 610f0279-3b13-407c-8842-27c952b2e4b7
        name: ocp-24730-django-mig-1721793498-final-r8kcb
        namespace: openshift-migration
        resourceVersion: "56283"
        uid: d91552f1-7e1b-47b5-b52e-9bb4d8f29d18
        spec:
        backupName: ocp-24730-django-mig-1721793498-initial-tszfh
        excludedResources:
      • nodes
      • events
      • events.events.k8s.io
      • backups.velero.io
      • restores.velero.io
      • resticrepositories.velero.io
      • csinodes.storage.k8s.io
      • volumeattachments.storage.k8s.io
      • backuprepositories.velero.io
        hooks: {}
        itemOperationTimeout: 4h0m0s
        restorePVs: true
        status:
        completionTimestamp: "2024-07-24T04:00:39Z"
        hookStatus: {}
        phase: Completed
        progress:
        itemsRestored: 36
        totalItems: 36
        startTimestamp: "2024-07-24T04:00:33Z"
        warnings: 6

      --------------------------------------------------------------

      MigMigration CR status completed, but errors are there

      $ oc get migmigration -n openshift-migration ocp-24730-django-mig-1721793498 -o yaml
      apiVersion: migration.openshift.io/v1alpha1
      kind: MigMigration
      metadata:
      annotations:
      openshift.io/touch: 4a948411-4971-11ef-947f-0a580a83020c
      creationTimestamp: "2024-07-24T03:58:41Z"
      generation: 43
      labels:
      controller-tools.k8s.io: "1.0"
      migration.openshift.io/migplan-name: ocp-24730-django-migplan-1721793498
      migration.openshift.io/migration-uid: 765da8bc-5689-4a6d-8d76-4ab0fcdfe7b6
      name: ocp-24730-django-mig-1721793498
      namespace: openshift-migration
      ownerReferences:

      • apiVersion: migration.openshift.io/v1alpha1
        kind: MigPlan
        name: ocp-24730-django-migplan-1721793498
        uid: 610f0279-3b13-407c-8842-27c952b2e4b7
        resourceVersion: "56295"
        uid: 765da8bc-5689-4a6d-8d76-4ab0fcdfe7b6
        spec:
        migPlanRef:
        name: ocp-24730-django-migplan-1721793498
        namespace: openshift-migration
        stage: false
        status:
        conditions:
      • category: Advisory
        durable: true
        lastTransitionTime: "2024-07-24T04:00:40Z"
        message: 'The migration has failed. See: Errors.'
        reason: UnQuiesceDestApplications
        status: "True"
        type: Failed
        errors:
      • no matches for kind "VirtualMachine" in version "kubevirt.io/v1"
        itinerary: Failed
        observedDigest: 6e636d8ef65fc00bd5bd330b3d3f40e4efcb83a045705249cd37257f263d5cdc
        phase: Completed
        pipeline:
      • completed: "2024-07-24T03:58:48Z"
        message: Completed
        name: Prepare
        started: "2024-07-24T03:58:41Z"
      • completed: "2024-07-24T03:58:55Z"
        message: Completed
        name: Backup
        progress:
      • 'Backup openshift-migration/ocp-24730-django-mig-1721793498-initial-tszfh: 40
        out of estimated total of 40 objects backed up (4s)'
        started: "2024-07-24T03:58:48Z"
      • completed: "2024-07-24T03:58:55Z"
        message: Completed
        name: StageBackup
        started: "2024-07-24T03:58:55Z"
      • completed: "2024-07-24T03:58:58Z"
        message: Completed
        name: DirectImage
        progress:
      • 1 total ImageStreams; 0 running; 1 successful; 0 failed
      • 'ImageStream ocp-24730-django/django-psql-persistent (dism openshift-migration/ocp-24730-django-mig-1721793498-k2dnb-ndzpn):
        Completed '
        started: "2024-07-24T03:58:55Z"
      • completed: "2024-07-24T03:59:32Z"
        message: Completed
        name: DirectVolume
        progress:
      • '[postgresql] ocp-24730-django/rsync-8vv7c: Completed 100% (1s)'
        started: "2024-07-24T03:58:58Z"
      • completed: "2024-07-24T04:00:40Z"
        failed: true
        message: Failed
        name: Restore
        progress:
      • 'Restore openshift-migration/ocp-24730-django-mig-1721793498-final-r8kcb: 36
        out of estimated total of 36 objects restored (6s)'
      • All the stage pods are restored, waiting for restore to Complete
        started: "2024-07-24T03:59:32Z"
      • completed: "2024-07-24T04:00:40Z"
        message: Completed
        name: Cleanup
        started: "2024-07-24T04:00:40Z"
      • completed: "2024-07-24T04:00:40Z"
        message: Completed
        name: CleanupHelpers
        started: "2024-07-24T04:00:40Z"
        startTimestamp: "2024-07-24T03:58:41Z"

            rhn-support-awels Alexander Wels
            rhn-support-ssingla Sachin Singla
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: